From d209d772826264260e564148c8ef28f0c4fb43b8 Mon Sep 17 00:00:00 2001 From: neokry Date: Thu, 16 Nov 2023 17:26:48 +0700 Subject: [PATCH] Add ownership renounced event --- deploys/84531.version2_new.txt | 4 ++-- package.json | 2 +- script/GetInterfaceIds.s.sol | 22 +++++++++++++++++++--- src/deployers/L2MigrationDeployer.sol | 6 ++++++ 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/deploys/84531.version2_new.txt b/deploys/84531.version2_new.txt index 5078937..4d06e92 100644 --- a/deploys/84531.version2_new.txt +++ b/deploys/84531.version2_new.txt @@ -1,2 +1,2 @@ -Merkle Reserve Minter: 0x411a7476b2a197a3b3d5576040b1111f560a8b57 -Migration Deployer: 0x1f94beb2656c02a3c367023ffeabc5c2673e8247 +Merkle Reserve Minter: 0x7cbbaa784f62cf6bc7a060398a768863d6b8cc70 +Migration Deployer: 0xda55b6a4c132ff29a5c396a8a0eb4db22c78c45a diff --git a/package.json b/package.json index b68be6c..104aec3 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "build": "forge build && rm -rf ./dist/artifacts/*/*.metadata.json", "clean": "forge clean && rm -rf ./dist", "prepublishOnly": "rm -rf ./dist && forge clean && mkdir -p ./dist/artifacts && yarn build && cp -R src dist && cp -R addresses dist", - "generate:interfaces": "forge script script/GetInterfaceIds.s.sol:GetInterfaceIds -vvvv", + "generate:interfaces": "forge script script/GetInterfaceIds.s.sol:GetInterfaceIds -vvvvv", "deploy:dao": "source .env && forge script script/DeployNewDAO.s.sol:SetupDaoScript --private-key $PRIVATE_KEY --broadcast --rpc-url $RPC_URL -vvvv", "deploy:local": "source .env && forge script script/DeployContracts.s.sol:DeployContracts --private-key $PRIVATE_KEY --broadcast --rpc-url $RPC_URL", "deploy:v2-local": "source .env && forge script script/DeployContractsV2.s.sol:DeployContracts --private-key $PRIVATE_KEY --broadcast --rpc-url $RPC_URL", diff --git a/script/GetInterfaceIds.s.sol b/script/GetInterfaceIds.s.sol index d39a872..b99226b 100644 --- a/script/GetInterfaceIds.s.sol +++ b/script/GetInterfaceIds.s.sol @@ -7,11 +7,27 @@ import "forge-std/console2.sol"; import { OPAddressAliasHelper } from "../src/lib/utils/OPAddressAliasHelper.sol"; import { IBaseMetadata } from "../src/token/metadata/interfaces/IBaseMetadata.sol"; import { IPropertyIPFSMetadataRenderer } from "../src/token/metadata/interfaces/IPropertyIPFSMetadataRenderer.sol"; +import { IToken, Token } from "../src/token/Token.sol"; +import { MerkleReserveMinter } from "../src/minters/MerkleReserveMinter.sol"; contract GetInterfaceIds is Script { - function run() public view { - console2.logAddress(OPAddressAliasHelper.applyL1ToL2Alias(0x7498e6e471f31e869f038D8DBffbDFdf650c3F95)); + function run() public { + //console2.logAddress(OPAddressAliasHelper.applyL1ToL2Alias(0x7498e6e471f31e869f038D8DBffbDFdf650c3F95)); //console2.logBytes4(type(IBaseMetadata).interfaceId); - //console2.logBytes4(type(IPropertyIPFSMetadataRenderer).interfaceId); + console2.logBytes4(type(IPropertyIPFSMetadataRenderer).interfaceId); + + bytes32[] memory proof = new bytes32[](6); + proof[0] = bytes32(0xe4ea50005878141497528e3da7a85b34149af4aa83a170b61245a302a81e53aa); + proof[1] = bytes32(0xec2634a7019358ddb4d452b7ab001749267712bcd41879e1066ad208973336e0); + proof[2] = bytes32(0x7831906a696828681160a4f491f910bd2e6198d7daca53b099516f5a9a247366); + proof[3] = bytes32(0xc76ae6aa4d55b08facb83bd7b390d1aea947cdcea5ae3ec5fc24ee9f66ebd126); + proof[4] = bytes32(0x703c891cf5a587e7e8fbe59cc475fd3e7a0161da940143b5859039946f6a82da); + proof[5] = bytes32(0x5166ccdc1ec7b8e737c8bd8e27bce80f6aefc1c7a4ee80161e5ff0408adacebf); + + MerkleReserveMinter.MerkleClaim[] memory claims = new MerkleReserveMinter.MerkleClaim[](1); + claims[0] = MerkleReserveMinter.MerkleClaim({ mintTo: 0x27B4a2eB472C280b17B79c315F79C522B038aFCF, tokenId: 11, merkleProof: proof }); + + MerkleReserveMinter(0x411A7476b2A197a3b3D5576040B1111F560a8b57).mintFromReserve(0xCa226cDf9f9E27B09dd873f69FD2d0aF33A46a07, claims); + //Token(0xCa226cDf9f9E27B09dd873f69FD2d0aF33A46a07).mintFromReserveTo(0x27B4a2eB472C280b17B79c315F79C522B038aFCF, 11); } } diff --git a/src/deployers/L2MigrationDeployer.sol b/src/deployers/L2MigrationDeployer.sol index f5fec58..ded126f 100644 --- a/src/deployers/L2MigrationDeployer.sol +++ b/src/deployers/L2MigrationDeployer.sol @@ -22,6 +22,9 @@ contract L2MigrationDeployer { /// @notice Deployer has been set event DeployerSet(address indexed token, address indexed deployer); + /// @notice Ownership has been renounced + event OwnershipRenounced(address indexed token, address indexed deployer); + /// /// /// ERRORS /// /// /// @@ -170,6 +173,9 @@ contract L2MigrationDeployer { // Transfer ownership of auction contract Ownable(auction).transferOwnership(treasury); + + address deployer = _xMsgSender(); + emit OwnershipRenounced(token, deployer); } /// ///