-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add click name service #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…fferent versions of forge
| ); | ||
| } else if (functionSelector == ADDR_MULTICHAIN_SELECTOR) { | ||
| (, uint256 coinType) = abi.decode(_data[4:], (bytes32, uint256)); | ||
| if (coinType != ZKSYNC_MAINNET_COIN_TYPE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(discussed today, adding here for tracking) Shouldn't we have a coin type for testnet too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ADDR_MULTICHAIN_SELECTOR path is not used for us now. So no need to do anything for testnet at the moment.
|
|
||
| import { HardhatUserConfig } from "hardhat/config"; | ||
|
|
||
| import "hardhat-storage-layout"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will enable producing the storage layout for our contracts from which I verified the slot 2 is what needs to be checked for ClickNameService for storage proofs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command it enables is npx hardhat storage-layout
| if (expires[tokenId] <= block.timestamp) { | ||
| revert NameExpired(owner, expires[tokenId]); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, names should be permanent unless we enable expiry via an admin function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed we will set a super long default expiry during deployment instead
| const sub = data.name.split(".")[0]; | ||
| const owner = getAddress(data.owner); | ||
|
|
||
| const response = await clickNameServiceContract.register(owner, sub); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where we might want to do manual nonce management (future ticket?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No manual nonce management just buffering the request and batching them to reduce the likelihood of concurrent registers. I will create a ticket for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useful info:
clk.ethname info is:clk.ethin NameWrapper is51296995595488636425956155272184315314353991018314322163154949517603913214272equal to0x71691213bee783e965b983e04ea3aac38f8277868655e40363711821e5422940clickapp.ethboth are currently resolved to0xaD56AaCEb54407803dDA93D6b1ba6b85676A2226. This name is registered and controlled by0xD4416b13d2b3a9aBae7AcD5D6C2BbDBE25686401PublicResolverat 0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E630x9A6DE0f62Aa270A8bCB1e2610078650D539B1Ef90x5490D0FE20E9F93a847c1907f7Fd2adF217bF5340x32400084C286CF3E17e7B677ea9583e60a000324TODO:
clkorclickapp) on ZkSync, approve our backend as operator for subdomains.aliXsed.ethon L1 NameWrapper