From f7677b98d6e52284cf77d4a79674f72b4699792f Mon Sep 17 00:00:00 2001 From: Jacob Homanics Date: Wed, 29 May 2024 00:31:15 -0500 Subject: [PATCH] latest --- packages/foundry/lib/reputation | 2 +- packages/foundry/script/DeployFactory.s.sol | 14 ++- .../nextjs/contracts/deployedContracts.ts | 105 ++++++++++++++++-- 3 files changed, 108 insertions(+), 13 deletions(-) diff --git a/packages/foundry/lib/reputation b/packages/foundry/lib/reputation index 93f8029..e7d8895 160000 --- a/packages/foundry/lib/reputation +++ b/packages/foundry/lib/reputation @@ -1 +1 @@ -Subproject commit 93f802971b5b875caf6d8aa9884ff1a1d02559b8 +Subproject commit e7d8895c7b9d0746598fd2bdadce3fab71821313 diff --git a/packages/foundry/script/DeployFactory.s.sol b/packages/foundry/script/DeployFactory.s.sol index f197532..0fd69b5 100644 --- a/packages/foundry/script/DeployFactory.s.sol +++ b/packages/foundry/script/DeployFactory.s.sol @@ -26,10 +26,22 @@ contract DeployFactoryScript is ScaffoldETHDeploy { admins[0] = deployerPubKey; admins[1] = controller; + address tokensAddr = address(0); + + uint256 chainId; + assembly { + chainId := chainid() + } + + if (chainId == 10) { + tokensAddr = 0x4200000000000000000000000000000000000042; + } + ReputationTokensUpgradeable implementation = new ReputationTokensUpgradeable(); ReputationTokensFactory factory = new ReputationTokensFactory( admins, - address(implementation) + address(implementation), + address(0) ); } } diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 2c1a316..62216e6 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -7,7 +7,7 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; const deployedContracts = { 31337: { ReputationTokens: { - address: "0xe6e340d132b5f46d1e472debcd681b2abc16e57e", + address: "0x7bc06c482dead17c0e297afbc32f6e63d3846650", abi: [ { type: "constructor", @@ -1370,10 +1370,47 @@ const deployedContracts = { inputs: [], }, ], - inheritedFunctions: {}, + inheritedFunctions: { + owner: "lib/reputation/lib/solidstate-solidity/contracts/access/ownable/Ownable.sol", + transferOwnership: "lib/reputation/lib/solidstate-solidity/contracts/access/ownable/Ownable.sol", + MINTER_ROLE: "lib/reputation/contracts/ReputationTokensBase.sol", + TOKEN_MIGRATOR_ROLE: "lib/reputation/contracts/ReputationTokensBase.sol", + TOKEN_UPDATER_ROLE: "lib/reputation/contracts/ReputationTokensBase.sol", + accountsByToken: "lib/reputation/contracts/ReputationTokensBase.sol", + balanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", + balanceOfBatch: "lib/reputation/contracts/ReputationTokensBase.sol", + burnedBalanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", + distributableBalanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", + distribute: "lib/reputation/contracts/ReputationTokensBase.sol", + distributeBatch: "lib/reputation/contracts/ReputationTokensBase.sol", + getRoleAdmin: "lib/reputation/contracts/ReputationTokensBase.sol", + getRoleMember: "lib/reputation/contracts/ReputationTokensBase.sol", + getRoleMemberCount: "lib/reputation/contracts/ReputationTokensBase.sol", + getTokenType: "lib/reputation/contracts/ReputationTokensBase.sol", + grantRole: "lib/reputation/contracts/ReputationTokensBase.sol", + hasRole: "lib/reputation/contracts/ReputationTokensBase.sol", + honestBalanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", + isApprovedForAll: "lib/reputation/contracts/ReputationTokensBase.sol", + migrate: "lib/reputation/contracts/ReputationTokensBase.sol", + migrateBatch: "lib/reputation/contracts/ReputationTokensBase.sol", + mint: "lib/reputation/contracts/ReputationTokensBase.sol", + mintBatch: "lib/reputation/contracts/ReputationTokensBase.sol", + renounceRole: "lib/reputation/contracts/ReputationTokensBase.sol", + revokeRole: "lib/reputation/contracts/ReputationTokensBase.sol", + safeBatchTransferFrom: "lib/reputation/contracts/ReputationTokensBase.sol", + safeTransferFrom: "lib/reputation/contracts/ReputationTokensBase.sol", + setApprovalForAll: "lib/reputation/contracts/ReputationTokensBase.sol", + supportsInterface: "lib/reputation/contracts/ReputationTokensBase.sol", + tokensByAccount: "lib/reputation/contracts/ReputationTokensBase.sol", + totalHolders: "lib/reputation/contracts/ReputationTokensBase.sol", + totalSupply: "lib/reputation/contracts/ReputationTokensBase.sol", + updateToken: "lib/reputation/contracts/ReputationTokensBase.sol", + updateTokenBatch: "lib/reputation/contracts/ReputationTokensBase.sol", + uri: "lib/reputation/contracts/ReputationTokensBase.sol", + }, }, ReputationFaucet: { - address: "0xf5059a5d33d5853360d16c683c16e67980206f36", + address: "0x922d6956c99e12dfeb3224dea977d0939758a1fe", abi: [ { type: "constructor", @@ -1491,10 +1528,14 @@ const deployedContracts = { stateMutability: "view", }, ], - inheritedFunctions: {}, + inheritedFunctions: { + onERC1155BatchReceived: "lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol", + onERC1155Received: "lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol", + supportsInterface: "lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol", + }, }, Hats: { - address: "0x0e801d84fa97b50751dbf25036d067dcf18858bf", + address: "0x21df544947ba3e8b3c32561399e88b52dc8b2823", abi: [ { type: "constructor", @@ -3455,7 +3496,7 @@ const deployedContracts = { }, }, MultiClaimsHatter: { - address: "0x5eb3bc0a489c5a8288765d2336659ebca68fcd00", + address: "0xdc11f7e700a4c898ae5caddb1082cffa76512add", abi: [ { type: "constructor", @@ -3781,7 +3822,7 @@ const deployedContracts = { }, }, ActiveModule: { - address: "0x809d550fca64d94bd9f66e60752a544199cfac3d", + address: "0x36b58f5c1969b7b6591d752ea6f5486d069010ab", abi: [ { type: "function", @@ -3811,7 +3852,7 @@ const deployedContracts = { inheritedFunctions: {}, }, ERC1155EligibiltiyModule: { - address: "0x5f3f1dbd7b74c6b46e8c44f98792a1daf8d69154", + address: "0x202cce504e04bed6fc0521238ddf04bc9e8e15ab", abi: [ { type: "constructor", @@ -3862,7 +3903,7 @@ const deployedContracts = { inheritedFunctions: {}, }, ReputationTokensUpgradeable: { - address: "0x2bdcc0de6be1f7d2ee689a0342d76f52e8efaba3", + address: "0xbec49fa140acaa83533fb00a2bb19bddd0290f25", abi: [ { type: "function", @@ -5245,10 +5286,47 @@ const deployedContracts = { inputs: [], }, ], - inheritedFunctions: {}, + inheritedFunctions: { + owner: "lib/reputation/lib/solidstate-solidity/contracts/access/ownable/Ownable.sol", + transferOwnership: "lib/reputation/lib/solidstate-solidity/contracts/access/ownable/Ownable.sol", + MINTER_ROLE: "lib/reputation/contracts/ReputationTokensBase.sol", + TOKEN_MIGRATOR_ROLE: "lib/reputation/contracts/ReputationTokensBase.sol", + TOKEN_UPDATER_ROLE: "lib/reputation/contracts/ReputationTokensBase.sol", + accountsByToken: "lib/reputation/contracts/ReputationTokensBase.sol", + balanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", + balanceOfBatch: "lib/reputation/contracts/ReputationTokensBase.sol", + burnedBalanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", + distributableBalanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", + distribute: "lib/reputation/contracts/ReputationTokensBase.sol", + distributeBatch: "lib/reputation/contracts/ReputationTokensBase.sol", + getRoleAdmin: "lib/reputation/contracts/ReputationTokensBase.sol", + getRoleMember: "lib/reputation/contracts/ReputationTokensBase.sol", + getRoleMemberCount: "lib/reputation/contracts/ReputationTokensBase.sol", + getTokenType: "lib/reputation/contracts/ReputationTokensBase.sol", + grantRole: "lib/reputation/contracts/ReputationTokensBase.sol", + hasRole: "lib/reputation/contracts/ReputationTokensBase.sol", + honestBalanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", + isApprovedForAll: "lib/reputation/contracts/ReputationTokensBase.sol", + migrate: "lib/reputation/contracts/ReputationTokensBase.sol", + migrateBatch: "lib/reputation/contracts/ReputationTokensBase.sol", + mint: "lib/reputation/contracts/ReputationTokensBase.sol", + mintBatch: "lib/reputation/contracts/ReputationTokensBase.sol", + renounceRole: "lib/reputation/contracts/ReputationTokensBase.sol", + revokeRole: "lib/reputation/contracts/ReputationTokensBase.sol", + safeBatchTransferFrom: "lib/reputation/contracts/ReputationTokensBase.sol", + safeTransferFrom: "lib/reputation/contracts/ReputationTokensBase.sol", + setApprovalForAll: "lib/reputation/contracts/ReputationTokensBase.sol", + supportsInterface: "lib/reputation/contracts/ReputationTokensBase.sol", + tokensByAccount: "lib/reputation/contracts/ReputationTokensBase.sol", + totalHolders: "lib/reputation/contracts/ReputationTokensBase.sol", + totalSupply: "lib/reputation/contracts/ReputationTokensBase.sol", + updateToken: "lib/reputation/contracts/ReputationTokensBase.sol", + updateTokenBatch: "lib/reputation/contracts/ReputationTokensBase.sol", + uri: "lib/reputation/contracts/ReputationTokensBase.sol", + }, }, ReputationTokensFactory: { - address: "0x7969c5ed335650692bc04293b07f5bf2e7a673c0", + address: "0xd84379ceae14aa33c123af12424a37803f885889", abi: [ { type: "constructor", @@ -5263,6 +5341,11 @@ const deployedContracts = { type: "address", internalType: "address", }, + { + name: "op", + type: "address", + internalType: "address", + }, ], stateMutability: "nonpayable", },