0x779195c53cc7c1a33bd2eea5f63f2c1da8798d61
0x36ffda909f941950a552011f2c50569fda14a169
Has registration role in RSK Owner.
approve() + register().1
transferAndCall().2
NamePrice contract.The registration must be performed as follows:
makeCommitment hash of the domain to be registered (off-chain).commit.minCommitmentAge seconds.Find
transferAndCall()encoder inutils/index.js
pricefunction price (string memory name, uint expires, uint duration) public view returns(uint);
Calculates the price of a name, denominated in RIF.
name not used. Pass ''
expires not used. Pass 0
duration to register the name for.makeCommitmentfunction makeCommitment (bytes32 label, address nameOwner, bytes32 secret) public pure returns (bytes32);
Create a commitment for register action.
Don’t use this method on-chain, as that will reveal your secret.
Instead run this method off-chain (note that it is pure), and save the return value.
label keccak256 of the name to be registered.nameOwner Owner of the name to be registered.secret Secret to protect the name to be registered.Returns the commitment hash.
commitfunction commit(bytes32 commitment) external;
Commit before registering a name.
A valid commitment can be calculated using makeCommitment off-chain.
commitment A valid commitment hash.canRevealfunction canReveal(bytes32 commitment) public view returns (bool);
Ensure the commitment is ready to be revealed.
This method can be polled to ensure registration.
commitment Commitment to be queried.Returns whether the commitment can be revealed or not.
registerfunction register(string calldata name, address nameOwner, bytes32 secret, uint duration);
Registers a .rsk name in RNS.
This method must be called after committing.
You must have previously executed approve() for the amount of tokens to be transferred.
name The name to register.nameOwner The owner of the name to register.secret The secret used to make the commitment.duration Time to register in years.Use RIF transferAndCall method with the following encoding to perform a RIF token transfer and domain registration in a single transaction
Encoding:
| parameter | size | offset |
|---|---|---|
| signature | 4 bytes | 0 bytes |
| owner | 20 bytes | 4 bytes |
| secret | 32 bytes | 24 bytes |
| duration | 32 bytes | 56 bytes |
| name | variable size | 88 bytes |
Parameters are used int he same manner as register. Use 0xc2c414c8 as the signature.
Go to top