Root repo for all 3DNS related smart contracts & on-chain logic
Code can be built and tested locally without an .env file, but to deploy or interact with any specific contracts, a permissioned user must set up the .env file and link their service to the internal management tool.
This project uses Foundry.
See the book for instructions on how to install and use Foundry.
forge build
forge test
The deployment scripts use CREATE2 to deploy a counterfactual, 3dns access controlled factory
// Authority contract address based on manager_
contractAuthority = new ThreeDNSAuthority{
salt: keccak256(Naming.THREE_DNS_AUTHORITY_NAME)
}(manager_);
// Factory based on authority with controller of manager_
factory = new ThreeDNSFactory{
salt: keccak256(Naming.DEPLOYER_NAME)
}(contractAuthority);
Contract Name | Contract Address | Mainnet | Optimism | OP Testnet |
---|---|---|---|---|
ThreeDNSAuthority | 0xe4CA879805120f1BD635d4ce5b646e308aA55fFc | ๐ข | ๐ข | ๐ข |
ThreeDNSFactory | 0x0AFE114C91348543844Ab790CCfA28909282f64B | ๐ข | ๐ข | ๐ข |
ThreeDNSAdministeredProxyAdmin | 0x1a4047ad1356305dBc4810A6af1Cbe81A8603dC9 | - | ๐ข | ๐ข |
ThreeDNSContractRegistry | 0xd3077FF69621Bb880b3c2655B8b301eD767bc2bb | - | ๐ข | ๐ข |
ThreeDNSRegControl | 0xBB7B805B257d7C76CA9435B3ffe780355E4C4B17 | - | ๐ข | ๐ข |
ThreeDNSResolver | 0xF97aAc6C8dbaEBCB54ff166d79706E3AF7a813c8 | - | ๐ข | ๐ข |
Symbol | Description |
---|---|
๐ข | Deployed |
๐ก | Coming Soon |
Controller | Manager Admin | Deployment Manager | Issuer Manager | Signer Manager | Deployer | Proxy Admin | Registrar Admin | Signer | Issuer | |
---|---|---|---|---|---|---|---|---|---|---|
Controller | ๐ต | ๐ด | ๐ด | ๐ด | ๐ด | ๐ด | ๐ด | ๐ด | ๐ด | ๐ด |
Manager Admin | - | - | ๐ด | ๐ด | ๐ด | ๐ด | ๐ก | ๐ด | ๐ก | ๐ก |
Deployment Manager | - | - | - | - | - | ๐ด | ๐ด | - | - | - |
Issuer Manager | - | - | - | - | - | - | - | - | - | ๐ด |
Signer Manager | - | - | - | - | - | - | - | - | ๐ด | - |
Symbol | Description |
---|---|
๐ต | only one can exist |
๐ด | full control (can set or remove) |
๐ก | indirect control (can set or remove that can control) |
The repo is divided into three main components: test
, scripts
, & src
. All internal logic and contracts are stored and written in src
, all tests are written in test
, and all deployment logic and managerial scripts are written in scripts
.