istest-eth

所属分类:以太坊
开发工具:Solidity
文件大小:604KB
下载次数:0
上传日期:2023-05-28 11:17:14
上 传 者sh-1993
说明:  测试网内容哈希→ 主网
(Testnet Contenthash → Mainnet)

文件列表:
EASYREAD.md (3456, 2023-05-28)
code4coffee (0, 2023-05-28)
code4coffee\.env.example (0, 2023-05-28)
code4coffee\index.js (4400, 2023-05-28)
code4coffee\package.json (441, 2023-05-28)
code4coffee\yarn.lock (39722, 2023-05-28)
contracts (0, 2023-05-28)
contracts\LICENSE (1063, 2023-05-28)
contracts\broadcast (0, 2023-05-28)
contracts\broadcast\Goerli.s.sol (0, 2023-05-28)
contracts\broadcast\Goerli.s.sol\5 (0, 2023-05-28)
contracts\broadcast\Goerli.s.sol\5\run-latest.json (26288, 2023-05-28)
contracts\broadcast\Mainnet.s.sol (0, 2023-05-28)
contracts\broadcast\Mainnet.s.sol\1 (0, 2023-05-28)
contracts\broadcast\Mainnet.s.sol\1\run-latest.json (20486, 2023-05-28)
contracts\foundry.toml (267, 2023-05-28)
contracts\lcov.info (4968, 2023-05-28)
contracts\lib (0, 2023-05-28)
contracts\lib\forge-std (0, 2023-05-28)
contracts\lib\forge-std\LICENSE-APACHE (10897, 2023-05-28)
contracts\lib\forge-std\LICENSE-MIT (1073, 2023-05-28)
contracts\lib\forge-std\foundry.toml (739, 2023-05-28)
contracts\lib\forge-std\lib (0, 2023-05-28)
contracts\lib\forge-std\lib\ds-test (0, 2023-05-28)
contracts\lib\forge-std\lib\ds-test\LICENSE (35147, 2023-05-28)
contracts\lib\forge-std\lib\ds-test\Makefile (277, 2023-05-28)
contracts\lib\forge-std\lib\ds-test\default.nix (85, 2023-05-28)
contracts\lib\forge-std\lib\ds-test\demo (0, 2023-05-28)
... ...

# `IsTest.eth` Developer Tool #### author(s): `sshmatrix`, `0xc0de4c0ffee` Resolve your testnet ENS on mainnet (or vice-versa) with CCIP-Read. # Description `istest.eth` is a lightweight implementation of CCIP-Read 'Off-chain Lookup' that allows resolution of your testnet ENS name on mainnet. For example, users with an ENS name `name.eth` on a testnet (say Goerli) can now gaslessly resolve all records of `name.eth` on mainnet subdomain `name.istest.eth`. The testnet is mapped to mainnet by the CCIP-Read Resolver contract deployed on `istest.eth` mediated by a HTTP gateway. `istest.eth` is proof-of-concept of a contract that maps ENS records from one network to another. Naturally, the two participating networks can also be mainnet and an Ethereum L2 for example, or any pair of compatible networks. For instance, `istest.eth` has also been deployed on Goerli where it maps mainnet ENS records to testnet. # Why `istest.eth`? We realised the need of testnet → mainnet name resolution when building a subdomain-based community project. For instance, imagine a subdomain membership club built on `vitalik.eth` where subdomain holders can access their membership page at `nick.vitalik.eth` and interact with other members of the club through their subdomain page. Such an architecture will ideally consist of a common default contenthash deployment for all holders, with individual pages accessing the `window.location.href` property of subdomain hosts (i.e. `nick.vitalik.eth`) and rendering content accordingly. Testing such an architecture turned out to be an unecessary challenge since we couldn't resolve testnet contenthashes on ETH.LIMO gateway (since ETH.LIMO only supports mainnet). This led to the idea of a testnet → mainnet mapper which would allow us to resolve testnet contenthashes on ETH.LIMO for testing. Similar situation arose in another project where it was necessary to import the rich registry of ENS from mainnet to testnet for appropriate test environment recreation. ## Schema `istest.eth` CCIP architecture has signature verification feature built in, meaning that all responses from the gateway are authenticated by the contract before resolving the requested name. The underlying resolver contract is fully modular, meaning anyone can 'blindly' fork their own version on mainnet and change configurations post hoc according to their needs. A summary of the workstream is as follows: - Client makes a request to resolve `name.istest.eth` on mainnet - Resolver initiates a CCIP-Read call to the gateway - Gateway responds with signed records of `name.eth` on testnet - Resolver collects gateway's response and verifies the signature - If verified, `name.istest.eth` emits testnet records of `name.eth` The schematic of the algorithm with Goerli as testnet is shown below: ![](https://raw.githubusercontent.com/bensyc/istest-eth/master/resources/schematic.png) ## Contracts Testnet (Mainnet → Goerli): [`0x1EA6EFb27f4013D3A16E2***a69C869C73CDB3479`](https://goerli.etherscan.io/address/0x1EA6EFb27f4013D3A16E2***a69C869C73CDB3479#code) Mainnet (Goerli → Mainnet): [`0x0Db7E56BFE3cbCD7B952F750c303CbF809585C6b`](https://etherscan.io/address/0x0Db7E56BFE3cbCD7B952F750c303CbF809585C6b#code) ## Source Codes Node.js scripts for running multi-threaded gateways as well as source code for the contract are available on [GitHub](https://github.com/bensyc/istest-eth) ## Current State Devs are working on a v2 of this CCIP DevTool that supports multiple .eth TLD gateways (other than ETH.LIMO). ~~There is currently [a bug in ethers.js](https://github.com/ethers-io/ethers.js/issues/3341) implementation in Node environment which is prohibiting contenthashes from getting mapped. This bug had previously been reported to ricmoo.eth & ETH.LIMO and fixed at that time, but it seems to have reappeared. We are in touch with ETH.LIMO about this issue and expect this to be resolved soon.~~

近期下载者

相关文件


收藏者