You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do folks feel about adding ABI support to ethers-ens? I think it would help my project out tremendously.
Rationale
I have 25 contracts and addresses I would like to register with ENS. I would also like to store ABIs for contracts in ENS. I am not aware of any scripts or UI that permit me to register ABIs with my ENS nodes. Therefore I've written two scripts, one to idempotently register sub nodes and ABIs and another to verify ABI records. These are rote tasks, anyone seeking to use ENS ABI features will have to do similar work. The lack of a formalized tool seems like an unnecessary barrier.
Implementation
ENS ABI contracts make use of two methods, ABI and setABI. Exposing these in ethers-ens would be very useful.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
How do folks feel about adding ABI support to ethers-ens? I think it would help my project out tremendously.
Rationale
I have 25 contracts and addresses I would like to register with ENS. I would also like to store ABIs for contracts in ENS. I am not aware of any scripts or UI that permit me to register ABIs with my ENS nodes. Therefore I've written two scripts, one to idempotently register sub nodes and ABIs and another to verify ABI records. These are rote tasks, anyone seeking to use ENS ABI features will have to do similar work. The lack of a formalized tool seems like an unnecessary barrier.
Implementation
ENS ABI contracts make use of two methods,
ABI
andsetABI
. Exposing these in ethers-ens would be very useful.Lookup
https://github.com/ensdomains/ens-contracts/blob/master/contracts/resolvers/profiles/ABIResolver.sol#L35
ABI(bytes32, uint256) returns (uint256, bytes)
ethers-ens lookup-abi [--raw] --content-type=[string|int] [NAME|ADDRESS [...]]
Lookup an ABI entry, decoding the result to a string
--raw
flag is set, return the bytes stored, do not decode--content type
can be a string of constant names or user provided integer value* How can the tool differentiate between gzip, zip, and compress?
Set ABI
https://github.com/ensdomains/ens-contracts/blob/master/contracts/resolvers/profiles/ABIResolver.sol#L19
setABI(bytes32, uint256, bytes)
ethers-ens set-abi --compression-type=[gzip|zip|compress]] [--abi=[-|PATH|string]] --content-type=[string|int] NAME
Set the ABI for a node name
--content-type
is ABI_JSON or ABI_ZLIB validate JSON input--content-type
is ABI_ZLIB compress--abi
input--content-type
is ABI_ZLIB, require--compression-type
Beta Was this translation helpful? Give feedback.
All reactions