From f9a3e8e5463601ec890f09cb8aac90488288546f Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 25 Oct 2023 10:58:05 -0700 Subject: [PATCH] feat(deployment): deploys Portfolio v1.5.0-beta to mainnet --- README.md | 25 ++++++++++++++++++------- lib/nugu | 2 +- scripts/Prepare.s.sol | 17 +++++++++-------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index fe860e4b..9a64775a 100644 --- a/README.md +++ b/README.md @@ -30,16 +30,27 @@ Read the local [docs](./docs/src/), hosted docs [docs.primitive.xyz](https://doc | Contract | Canonical cross-chain address | | -------------------- | -------------------------------------------- | | Portfolio 1.3.0-beta | `0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1` | -| Portfolio 1.4.0-beta | `todo` | -| Portfolio 1.5.0-beta | `n/a` | +| Portfolio 1.4.0-beta | `n/a` | +| Portfolio 1.5.0-beta | `0x0000a37Fd680Ab248119b448545eF72C51Bf7530` | ### Deployments by Chain -| Network | Portfolio 1.3.0-beta | Portfolio v1.4.0-beta | Portfolio v1.5.0-beta | -| -------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------- | --------------------- | -| Ethereum | [0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1](https://etherscan.io/address/0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1 ) | n/a |n/a | -| Base | n/a | n/a |n/a | -| Sepolia | [0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1](https://sepolia.etherscan.io/address/0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1) | n/a |n/a | +| Network | Portfolio 1.3.0-beta | Portfolio v1.4.0-beta | Portfolio v1.5.0-beta | +| -------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------- | +| Ethereum | [0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1](https://etherscan.io/address/0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1 ) | n/a | [0x0000a37Fd680Ab248119b448545eF72C51Bf7530](https://etherscan.io/address/0x0000a37fd680ab248119b448545ef72c51bf7530) | +| Base | n/a | n/a | n/a | +| Sepolia | [0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1](https://sepolia.etherscan.io/address/0x82360b9a2076a09ea8abe2b3e11aed89de3a02d1) | n/a | n/a | + +| Network | PortfolioRegistry v1.5.0-beta | +| -------- | --------------------------------------------------------------------------------------------------------------------- | +| Ethereum | [0x42776F58b6BC63492E0b7A7a937D1138DF716670](https://etherscan.io/address/0x42776f58b6bc63492e0b7a7a937d1138df716670) | + +| Network | PositionRenderer v1.5.0-beta | +| -------- | --------------------------------------------------------------------------------------------------------------------- | +| Ethereum | [0xdDA01E1d7684Cc35e6a3A5803736D32d012B8C99](https://etherscan.io/address/0xdDA01E1d7684Cc35e6a3A5803736D32d012B8C99) | + + + # Security diff --git a/lib/nugu b/lib/nugu index 71fbe1e7..4c456d07 160000 --- a/lib/nugu +++ b/lib/nugu @@ -1 +1 @@ -Subproject commit 71fbe1e7e1441147886e70425cbb4f6b645ee286 +Subproject commit 4c456d0745a88c7507977574fd5a037d6d5c10e1 diff --git a/scripts/Prepare.s.sol b/scripts/Prepare.s.sol index 1920ee32..f0947c0d 100644 --- a/scripts/Prepare.s.sol +++ b/scripts/Prepare.s.sol @@ -35,13 +35,14 @@ import "../contracts/PositionRenderer.sol"; // data that was generated and send the transaction. // 5. Repeat step 4 for all the data generated by this script (3 in total). -address constant MULTISIG_WALLET = 0x8cDb0095ceddb092aD592aCE2971e4f364b5E8eE; +address constant MULTISIG_WALLET = 0xD86872c94484abf03EA8F98ED8E91E9D943781CE; address constant NUGU_ADDRESS = 0xe50ea0e9849cb17829907Acaf764af8F37d4938E; -address constant WETH_ADDRESS = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; +address constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; bytes32 constant REGISTRY_SALT = keccak256("REGISTRY0"); bytes32 constant POSITION_RENDERER_SALT = keccak256("POSITION_RENDERER0"); -bytes32 constant PORTFOLIO_SALT = keccak256("PORTFOLIO0"); +bytes32 constant PORTFOLIO_SALT = + bytes32(0x0EB4AB9B29D4F1CFBCDB500D936BCD61BC941EFDBCD3141738F68F972CC15ED4); contract Deploy is Script { bytes internal constant PROXY_BYTECODE = @@ -56,14 +57,13 @@ contract Deploy is Script { abi.encodePacked( type(PortfolioRegistry).creationCode, abi.encode(MULTISIG_WALLET) - ), - 0 + ) ) ); bytes memory positionRendererDeployData = abi.encodeCall( NuguFactory.deploy, - (POSITION_RENDERER_SALT, type(PositionRenderer).creationCode, 0) + (POSITION_RENDERER_SALT, type(PositionRenderer).creationCode) ); address predictedRegistryAddress = @@ -83,8 +83,7 @@ contract Deploy is Script { predictedRegistryAddress, predictedPositionRendererAddress ) - ), - 0 + ) ) ); @@ -96,6 +95,8 @@ contract Deploy is Script { console.log("\nPortfolio deploy data:"); console.logBytes(portfolioDeployData); + console.log("\n Portfolio address:"); + console.log(getDeployed(NUGU_ADDRESS, MULTISIG_WALLET, PORTFOLIO_SALT)); } function getDeployed(