diff --git a/cross-chain/arbitrum/.gitignore b/cross-chain/arbitrum/.gitignore index b07695466..bc2e1841e 100644 --- a/cross-chain/arbitrum/.gitignore +++ b/cross-chain/arbitrum/.gitignore @@ -9,7 +9,9 @@ /deployments/* !/deployments/mainnet/ !/deployments/arbitrumOne/ +!/deployments/arbitrumGoerli/ # OZ /.openzeppelin/unknown-*.json !/.openzeppelin/unknown-42161.json +!/.openzeppelin/unknown-421613.json diff --git a/cross-chain/arbitrum/.openzeppelin/unknown-421613.json b/cross-chain/arbitrum/.openzeppelin/unknown-421613.json new file mode 100644 index 000000000..249610d04 --- /dev/null +++ b/cross-chain/arbitrum/.openzeppelin/unknown-421613.json @@ -0,0 +1,458 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x93acCF14d143132DA0F592552baad5AF0d14CDF2", + "txHash": "0xfc8fc644749794f2e05cdd4321e9ea03ad282383ab6486d1e3015319536c468d" + }, + "proxies": [ + { + "address": "0x85727F4725A4B2834e00Db1AA8e1b843a188162F", + "txHash": "0xfcdb8772ef8d6f2a749b01b98d8cd17425686944273d50196a09caa1a784de32", + "kind": "transparent" + }, + { + "address": "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2", + "txHash": "0xb4f37bb47aa50dfe41f0cd501e992f41e891759d6e938e0f3336f665b0e66b5b", + "kind": "transparent" + } + ], + "impls": { + "1eca3b29684e1fcc811e32be6ee7e72cd846a93f69838508595506ae72555f18": { + "address": "0x5fA3D34F6c1537A0393098F0e124064B66cE8E24", + "txHash": "0x675b6f658e4be2e8dd0546b92fc8260302b68de3222e5f00dc52659936b2a74e", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:400" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_HASHED_NAME", + "offset": 0, + "slot": "151", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:32" + }, + { + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "152", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:33" + }, + { + "label": "__gap", + "offset": 0, + "slot": "153", + "type": "t_array(t_uint256)50_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:120" + }, + { + "label": "_nonces", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_address,t_struct(Counter)3297_storage)", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:28" + }, + { + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "204", + "type": "t_bytes32", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:40", + "renamedFrom": "_PERMIT_TYPEHASH" + }, + { + "label": "__gap", + "offset": 0, + "slot": "205", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:108" + }, + { + "label": "_owner", + "offset": 0, + "slot": "254", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "255", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "304", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "isMinter", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_address,t_bool)", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:76" + }, + { + "label": "minters", + "offset": 0, + "slot": "355", + "type": "t_array(t_address)dyn_storage", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:77" + }, + { + "label": "isGuardian", + "offset": 0, + "slot": "356", + "type": "t_mapping(t_address,t_bool)", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:85" + }, + { + "label": "guardians", + "offset": 0, + "slot": "357", + "type": "t_array(t_address)dyn_storage", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:89" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Counter)3297_storage)": { + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3297_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "70974f3ab30d1010f875de7eebcbde08a1b6c71845f5272c23be8f95af866a64": { + "address": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "txHash": "0x16e5ff7e87f80d3f1ec4ac65ce36c13b5aa60e2f8dd8551e24c27532350c071b", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_status", + "offset": 0, + "slot": "101", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:80" + }, + { + "label": "bridge", + "offset": 0, + "slot": "151", + "type": "t_contract(IWormholeTokenBridge)518", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:122" + }, + { + "label": "bridgeToken", + "offset": 0, + "slot": "152", + "type": "t_contract(IERC20Upgradeable)2252", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:123" + }, + { + "label": "tbtc", + "offset": 0, + "slot": "153", + "type": "t_contract(L2TBTC)443", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:124" + }, + { + "label": "gateways", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_uint16,t_bytes32)", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:136" + }, + { + "label": "mintingLimit", + "offset": 0, + "slot": "155", + "type": "t_uint256", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:147" + }, + { + "label": "mintedAmount", + "offset": 0, + "slot": "156", + "type": "t_uint256", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:151" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20Upgradeable)2252": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IWormholeTokenBridge)518": { + "label": "contract IWormholeTokenBridge", + "numberOfBytes": "20" + }, + "t_contract(L2TBTC)443": { + "label": "contract L2TBTC", + "numberOfBytes": "20" + }, + "t_mapping(t_uint16,t_bytes32)": { + "label": "mapping(uint16 => bytes32)", + "numberOfBytes": "32" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/cross-chain/arbitrum/deployments/arbitrumGoerli/.chainId b/cross-chain/arbitrum/deployments/arbitrumGoerli/.chainId new file mode 100644 index 000000000..16be23a37 --- /dev/null +++ b/cross-chain/arbitrum/deployments/arbitrumGoerli/.chainId @@ -0,0 +1 @@ +421613 \ No newline at end of file diff --git a/cross-chain/arbitrum/deployments/arbitrumGoerli/ArbitrumTBTC.json b/cross-chain/arbitrum/deployments/arbitrumGoerli/ArbitrumTBTC.json new file mode 100644 index 000000000..d1a8d5362 --- /dev/null +++ b/cross-chain/arbitrum/deployments/arbitrumGoerli/ArbitrumTBTC.json @@ -0,0 +1,863 @@ +{ + "address": "0x85727F4725A4B2834e00Db1AA8e1b843a188162F", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "addMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getGuardians", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinters", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "guardians", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isMinter", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "minters", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "recoverERC721", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "removeMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xfcdb8772ef8d6f2a749b01b98d8cd17425686944273d50196a09caa1a784de32", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0x85727F4725A4B2834e00Db1AA8e1b843a188162F", + "transactionIndex": 2, + "gasUsed": "42396728", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000206000001000000800000000000000000000000000000020000000000000000000800000000800000000000000000000000400000000200000000000000000000000000020000000080000000000000800000000000000000000000000000000400000000000000000000000000000000000000000020000002000000000020040000000000000400000000000000000020040000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0333d5ea17ae5a01d65208ee67658638160f81eb0691df6119c942212cda0137", + "transactionHash": "0xfcdb8772ef8d6f2a749b01b98d8cd17425686944273d50196a09caa1a784de32", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 20175727, + "transactionHash": "0xfcdb8772ef8d6f2a749b01b98d8cd17425686944273d50196a09caa1a784de32", + "address": "0x85727F4725A4B2834e00Db1AA8e1b843a188162F", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000005fa3d34f6c1537a0393098f0e124064b66ce8e24" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x0333d5ea17ae5a01d65208ee67658638160f81eb0691df6119c942212cda0137" + }, + { + "transactionIndex": 2, + "blockNumber": 20175727, + "transactionHash": "0xfcdb8772ef8d6f2a749b01b98d8cd17425686944273d50196a09caa1a784de32", + "address": "0x85727F4725A4B2834e00Db1AA8e1b843a188162F", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x0333d5ea17ae5a01d65208ee67658638160f81eb0691df6119c942212cda0137" + }, + { + "transactionIndex": 2, + "blockNumber": 20175727, + "transactionHash": "0xfcdb8772ef8d6f2a749b01b98d8cd17425686944273d50196a09caa1a784de32", + "address": "0x85727F4725A4B2834e00Db1AA8e1b843a188162F", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 3, + "blockHash": "0x0333d5ea17ae5a01d65208ee67658638160f81eb0691df6119c942212cda0137" + }, + { + "transactionIndex": 2, + "blockNumber": 20175727, + "transactionHash": "0xfcdb8772ef8d6f2a749b01b98d8cd17425686944273d50196a09caa1a784de32", + "address": "0x85727F4725A4B2834e00Db1AA8e1b843a188162F", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000093accf14d143132da0f592552baad5af0d14cdf2", + "logIndex": 4, + "blockHash": "0x0333d5ea17ae5a01d65208ee67658638160f81eb0691df6119c942212cda0137" + } + ], + "blockNumber": 20175727, + "cumulativeGasUsed": "45671396", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x5fA3D34F6c1537A0393098F0e124064B66cE8E24", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file diff --git a/cross-chain/arbitrum/deployments/arbitrumGoerli/ArbitrumWormholeGateway.json b/cross-chain/arbitrum/deployments/arbitrumGoerli/ArbitrumWormholeGateway.json new file mode 100644 index 000000000..6a3edfdf3 --- /dev/null +++ b/cross-chain/arbitrum/deployments/arbitrumGoerli/ArbitrumWormholeGateway.json @@ -0,0 +1,495 @@ +{ + "address": "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + } + ], + "name": "GatewayAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "mintingLimit", + "type": "uint256" + } + ], + "name": "MintingLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WormholeTbtcDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WormholeTbtcReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "recipientChain", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "arbiterFee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "WormholeTbtcSent", + "type": "event" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridgeToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositWormholeTbtc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_address", + "type": "bytes32" + } + ], + "name": "fromWormholeAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "gateways", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "_bridgeToken", + "type": "address" + }, + { + "internalType": "contract L2TBTC", + "name": "_tbtc", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "mintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mintingLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "encodedVm", + "type": "bytes" + } + ], + "name": "receiveTbtc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "recipientChain", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "arbiterFee", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "sendTbtc", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "tbtc", + "outputs": [ + { + "internalType": "contract L2TBTC", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "toWormholeAddress", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + } + ], + "name": "updateGatewayAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_mintingLimit", + "type": "uint256" + } + ], + "name": "updateMintingLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xb4f37bb47aa50dfe41f0cd501e992f41e891759d6e938e0f3336f665b0e66b5b", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2", + "transactionIndex": 1, + "gasUsed": "42929206", + "logsBloom": "0x00000400000000000000000000000000400000000000000000800000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000202000001000000000000000000000000000000000000020000000000000000000800100000800000000000000000000000410000000200000000000000000000000000000000000080000000000000800000000000000000000000000000000400000000000000000000002000000000000000000020000000000000000020040000000000000400000000010000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x66eeee66744481e636707a084022a3c40807f189159c0c1f171bc89b244616d4", + "transactionHash": "0xb4f37bb47aa50dfe41f0cd501e992f41e891759d6e938e0f3336f665b0e66b5b", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 20175760, + "transactionHash": "0xb4f37bb47aa50dfe41f0cd501e992f41e891759d6e938e0f3336f665b0e66b5b", + "address": "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000004be8f183572ec802ad26756f3e9398098700e76" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x66eeee66744481e636707a084022a3c40807f189159c0c1f171bc89b244616d4" + }, + { + "transactionIndex": 1, + "blockNumber": 20175760, + "transactionHash": "0xb4f37bb47aa50dfe41f0cd501e992f41e891759d6e938e0f3336f665b0e66b5b", + "address": "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x66eeee66744481e636707a084022a3c40807f189159c0c1f171bc89b244616d4" + }, + { + "transactionIndex": 1, + "blockNumber": 20175760, + "transactionHash": "0xb4f37bb47aa50dfe41f0cd501e992f41e891759d6e938e0f3336f665b0e66b5b", + "address": "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0x66eeee66744481e636707a084022a3c40807f189159c0c1f171bc89b244616d4" + }, + { + "transactionIndex": 1, + "blockNumber": 20175760, + "transactionHash": "0xb4f37bb47aa50dfe41f0cd501e992f41e891759d6e938e0f3336f665b0e66b5b", + "address": "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000093accf14d143132da0f592552baad5af0d14cdf2", + "logIndex": 3, + "blockHash": "0x66eeee66744481e636707a084022a3c40807f189159c0c1f171bc89b244616d4" + } + ], + "blockNumber": 20175760, + "cumulativeGasUsed": "42929206", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file diff --git a/cross-chain/arbitrum/external/arbitrumGoerli/OptimismWormholeGateway.json b/cross-chain/arbitrum/external/arbitrumGoerli/OptimismWormholeGateway.json index 334fdb833..283665601 100644 --- a/cross-chain/arbitrum/external/arbitrumGoerli/OptimismWormholeGateway.json +++ b/cross-chain/arbitrum/external/arbitrumGoerli/OptimismWormholeGateway.json @@ -1,3 +1,3 @@ { - "address": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C" + "address": "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621" } diff --git a/cross-chain/arbitrum/external/arbitrumGoerli/PolygonWormholeGateway.json b/cross-chain/arbitrum/external/arbitrumGoerli/PolygonWormholeGateway.json index 334fdb833..c9c6cfe9a 100644 --- a/cross-chain/arbitrum/external/arbitrumGoerli/PolygonWormholeGateway.json +++ b/cross-chain/arbitrum/external/arbitrumGoerli/PolygonWormholeGateway.json @@ -1,3 +1,3 @@ { - "address": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C" + "address": "0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818" } diff --git a/cross-chain/optimism/.gitignore b/cross-chain/optimism/.gitignore index 9f67dca5f..64240eb35 100644 --- a/cross-chain/optimism/.gitignore +++ b/cross-chain/optimism/.gitignore @@ -9,6 +9,7 @@ /deployments/* !/deployments/mainnet/ !/deployments/optimism/ +!/deployments/optimismGoerli/ # OZ /.openzeppelin/unknown-*.json diff --git a/cross-chain/optimism/.openzeppelin/optimism-goerli.json b/cross-chain/optimism/.openzeppelin/optimism-goerli.json new file mode 100644 index 000000000..9564ecd39 --- /dev/null +++ b/cross-chain/optimism/.openzeppelin/optimism-goerli.json @@ -0,0 +1,458 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818", + "txHash": "0x0d7e2a225846fc0d467b6487c0eb724266fbee2b959fbbe1325269f43a454339" + }, + "proxies": [ + { + "address": "0x1a53759DE2eADf73bd0b05c07a4F1F5B7912dA3d", + "txHash": "0xdd6d13c09c3045099e9d6066cd1ebc1353714aee8d39a54599ab15a402854008", + "kind": "transparent" + }, + { + "address": "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621", + "txHash": "0x805d4430b11c0de578b14b17a0c92305d5f9bd158819e15c8969a12477861d41", + "kind": "transparent" + } + ], + "impls": { + "1eca3b29684e1fcc811e32be6ee7e72cd846a93f69838508595506ae72555f18": { + "address": "0x5D8e618f44A59dd528cce58d00801F4C8e5cfa8D", + "txHash": "0x12984eeac49aaf61b2c7195c37966d3124654fbc1974d2beec80e951ee8c7085", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:400" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_HASHED_NAME", + "offset": 0, + "slot": "151", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:32" + }, + { + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "152", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:33" + }, + { + "label": "__gap", + "offset": 0, + "slot": "153", + "type": "t_array(t_uint256)50_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:120" + }, + { + "label": "_nonces", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_address,t_struct(Counter)3297_storage)", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:28" + }, + { + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "204", + "type": "t_bytes32", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:40", + "renamedFrom": "_PERMIT_TYPEHASH" + }, + { + "label": "__gap", + "offset": 0, + "slot": "205", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:108" + }, + { + "label": "_owner", + "offset": 0, + "slot": "254", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "255", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "304", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "isMinter", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_address,t_bool)", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:76" + }, + { + "label": "minters", + "offset": 0, + "slot": "355", + "type": "t_array(t_address)dyn_storage", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:77" + }, + { + "label": "isGuardian", + "offset": 0, + "slot": "356", + "type": "t_mapping(t_address,t_bool)", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:85" + }, + { + "label": "guardians", + "offset": 0, + "slot": "357", + "type": "t_array(t_address)dyn_storage", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:89" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Counter)3297_storage)": { + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3297_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "70974f3ab30d1010f875de7eebcbde08a1b6c71845f5272c23be8f95af866a64": { + "address": "0x73A63e2Be2D911dc7eFAc189Bfdf48FbB6532B5b", + "txHash": "0x4d3bdde5365c63cceb585fc671be3d7ef92ef1b67a83dbb61440999515084659", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_status", + "offset": 0, + "slot": "101", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:80" + }, + { + "label": "bridge", + "offset": 0, + "slot": "151", + "type": "t_contract(IWormholeTokenBridge)518", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:122" + }, + { + "label": "bridgeToken", + "offset": 0, + "slot": "152", + "type": "t_contract(IERC20Upgradeable)2252", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:123" + }, + { + "label": "tbtc", + "offset": 0, + "slot": "153", + "type": "t_contract(L2TBTC)443", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:124" + }, + { + "label": "gateways", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_uint16,t_bytes32)", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:136" + }, + { + "label": "mintingLimit", + "offset": 0, + "slot": "155", + "type": "t_uint256", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:147" + }, + { + "label": "mintedAmount", + "offset": 0, + "slot": "156", + "type": "t_uint256", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:151" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20Upgradeable)2252": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IWormholeTokenBridge)518": { + "label": "contract IWormholeTokenBridge", + "numberOfBytes": "20" + }, + "t_contract(L2TBTC)443": { + "label": "contract L2TBTC", + "numberOfBytes": "20" + }, + "t_mapping(t_uint16,t_bytes32)": { + "label": "mapping(uint16 => bytes32)", + "numberOfBytes": "32" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/cross-chain/optimism/deployments/optimismGoerli/.chainId b/cross-chain/optimism/deployments/optimismGoerli/.chainId new file mode 100644 index 000000000..1e59c84a3 --- /dev/null +++ b/cross-chain/optimism/deployments/optimismGoerli/.chainId @@ -0,0 +1 @@ +420 \ No newline at end of file diff --git a/cross-chain/optimism/deployments/optimismGoerli/OptimismTBTC.json b/cross-chain/optimism/deployments/optimismGoerli/OptimismTBTC.json new file mode 100644 index 000000000..c712f5e0d --- /dev/null +++ b/cross-chain/optimism/deployments/optimismGoerli/OptimismTBTC.json @@ -0,0 +1,863 @@ +{ + "address": "0x1a53759DE2eADf73bd0b05c07a4F1F5B7912dA3d", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "addMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getGuardians", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinters", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "guardians", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isMinter", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "minters", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "recoverERC721", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "removeMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xdd6d13c09c3045099e9d6066cd1ebc1353714aee8d39a54599ab15a402854008", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0x1a53759DE2eADf73bd0b05c07a4F1F5B7912dA3d", + "transactionIndex": 1, + "gasUsed": "732126", + "logsBloom": "0x00000000000000000000000000004000400000000000000000800000100000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000401000000000000000000000000000000000000020000000000000000000800000000800000000000000000000000400000000200000000000000000000000000000000000080000002000000800000000000000000000000000000000400000000000000000100000000000000000000000020000000000000000020040000000000000400000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7dc35b7acca6c3095be3ef2ad981dfad945dbb973b9943e3b0b2c4d272fa56dc", + "transactionHash": "0xdd6d13c09c3045099e9d6066cd1ebc1353714aee8d39a54599ab15a402854008", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 9447251, + "transactionHash": "0xdd6d13c09c3045099e9d6066cd1ebc1353714aee8d39a54599ab15a402854008", + "address": "0x1a53759DE2eADf73bd0b05c07a4F1F5B7912dA3d", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000005d8e618f44a59dd528cce58d00801f4c8e5cfa8d" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x7dc35b7acca6c3095be3ef2ad981dfad945dbb973b9943e3b0b2c4d272fa56dc" + }, + { + "transactionIndex": 1, + "blockNumber": 9447251, + "transactionHash": "0xdd6d13c09c3045099e9d6066cd1ebc1353714aee8d39a54599ab15a402854008", + "address": "0x1a53759DE2eADf73bd0b05c07a4F1F5B7912dA3d", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x7dc35b7acca6c3095be3ef2ad981dfad945dbb973b9943e3b0b2c4d272fa56dc" + }, + { + "transactionIndex": 1, + "blockNumber": 9447251, + "transactionHash": "0xdd6d13c09c3045099e9d6066cd1ebc1353714aee8d39a54599ab15a402854008", + "address": "0x1a53759DE2eADf73bd0b05c07a4F1F5B7912dA3d", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0x7dc35b7acca6c3095be3ef2ad981dfad945dbb973b9943e3b0b2c4d272fa56dc" + }, + { + "transactionIndex": 1, + "blockNumber": 9447251, + "transactionHash": "0xdd6d13c09c3045099e9d6066cd1ebc1353714aee8d39a54599ab15a402854008", + "address": "0x1a53759DE2eADf73bd0b05c07a4F1F5B7912dA3d", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000091fe7128f74dbd4f031ea3d90fc5ea4dcfd81818", + "logIndex": 3, + "blockHash": "0x7dc35b7acca6c3095be3ef2ad981dfad945dbb973b9943e3b0b2c4d272fa56dc" + } + ], + "blockNumber": 9447251, + "cumulativeGasUsed": "796139", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x5D8e618f44A59dd528cce58d00801F4C8e5cfa8D", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file diff --git a/cross-chain/optimism/deployments/optimismGoerli/OptimismWormholeGateway.json b/cross-chain/optimism/deployments/optimismGoerli/OptimismWormholeGateway.json new file mode 100644 index 000000000..bd22bf443 --- /dev/null +++ b/cross-chain/optimism/deployments/optimismGoerli/OptimismWormholeGateway.json @@ -0,0 +1,495 @@ +{ + "address": "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + } + ], + "name": "GatewayAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "mintingLimit", + "type": "uint256" + } + ], + "name": "MintingLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WormholeTbtcDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WormholeTbtcReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "recipientChain", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "arbiterFee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "WormholeTbtcSent", + "type": "event" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridgeToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositWormholeTbtc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_address", + "type": "bytes32" + } + ], + "name": "fromWormholeAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "gateways", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "_bridgeToken", + "type": "address" + }, + { + "internalType": "contract L2TBTC", + "name": "_tbtc", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "mintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mintingLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "encodedVm", + "type": "bytes" + } + ], + "name": "receiveTbtc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "recipientChain", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "arbiterFee", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "sendTbtc", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "tbtc", + "outputs": [ + { + "internalType": "contract L2TBTC", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "toWormholeAddress", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + } + ], + "name": "updateGatewayAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_mintingLimit", + "type": "uint256" + } + ], + "name": "updateMintingLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x805d4430b11c0de578b14b17a0c92305d5f9bd158819e15c8969a12477861d41", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621", + "transactionIndex": 2, + "gasUsed": "749615", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000001000000000000000010000000000000000000020000000000000000000880000000800000000000000000000000400000000200000000000000000000000000000008000080000000000000800000000000000000000004000000000400000000000000000000000000000000000000000020000000002000000020040000000000400400000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x5d2e28bf9617f4bbc8dd4a45c278917a3fd4ae1301cda44d2d0322a5a9ecc202", + "transactionHash": "0x805d4430b11c0de578b14b17a0c92305d5f9bd158819e15c8969a12477861d41", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 9447269, + "transactionHash": "0x805d4430b11c0de578b14b17a0c92305d5f9bd158819e15c8969a12477861d41", + "address": "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000073a63e2be2d911dc7efac189bfdf48fbb6532b5b" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x5d2e28bf9617f4bbc8dd4a45c278917a3fd4ae1301cda44d2d0322a5a9ecc202" + }, + { + "transactionIndex": 2, + "blockNumber": 9447269, + "transactionHash": "0x805d4430b11c0de578b14b17a0c92305d5f9bd158819e15c8969a12477861d41", + "address": "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x5d2e28bf9617f4bbc8dd4a45c278917a3fd4ae1301cda44d2d0322a5a9ecc202" + }, + { + "transactionIndex": 2, + "blockNumber": 9447269, + "transactionHash": "0x805d4430b11c0de578b14b17a0c92305d5f9bd158819e15c8969a12477861d41", + "address": "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 5, + "blockHash": "0x5d2e28bf9617f4bbc8dd4a45c278917a3fd4ae1301cda44d2d0322a5a9ecc202" + }, + { + "transactionIndex": 2, + "blockNumber": 9447269, + "transactionHash": "0x805d4430b11c0de578b14b17a0c92305d5f9bd158819e15c8969a12477861d41", + "address": "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000091fe7128f74dbd4f031ea3d90fc5ea4dcfd81818", + "logIndex": 6, + "blockHash": "0x5d2e28bf9617f4bbc8dd4a45c278917a3fd4ae1301cda44d2d0322a5a9ecc202" + } + ], + "blockNumber": 9447269, + "cumulativeGasUsed": "942794", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x73A63e2Be2D911dc7eFAc189Bfdf48FbB6532B5b", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file diff --git a/cross-chain/optimism/external/optimismGoerli/ArbitrumWormholeGateway.json b/cross-chain/optimism/external/optimismGoerli/ArbitrumWormholeGateway.json index 74c39592d..ea8693dc5 100644 --- a/cross-chain/optimism/external/optimismGoerli/ArbitrumWormholeGateway.json +++ b/cross-chain/optimism/external/optimismGoerli/ArbitrumWormholeGateway.json @@ -1,3 +1,3 @@ { - "address": "0xe3e0511EEbD87F08FbaE4486419cb5dFB06e1343" + "address": "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2" } diff --git a/cross-chain/optimism/external/optimismGoerli/PolygonWormholeGateway.json b/cross-chain/optimism/external/optimismGoerli/PolygonWormholeGateway.json index 334fdb833..c9c6cfe9a 100644 --- a/cross-chain/optimism/external/optimismGoerli/PolygonWormholeGateway.json +++ b/cross-chain/optimism/external/optimismGoerli/PolygonWormholeGateway.json @@ -1,3 +1,3 @@ { - "address": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C" + "address": "0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818" } diff --git a/cross-chain/polygon/.gitignore b/cross-chain/polygon/.gitignore index 702b559a6..ae6c3fbe7 100644 --- a/cross-chain/polygon/.gitignore +++ b/cross-chain/polygon/.gitignore @@ -9,6 +9,7 @@ /deployments/* !/deployments/mainnet/ !/deployments/polygon/ +!/deployments/mumbai/ # OZ /.openzeppelin/unknown-*.json diff --git a/cross-chain/polygon/.openzeppelin/polygon-mumbai.json b/cross-chain/polygon/.openzeppelin/polygon-mumbai.json new file mode 100644 index 000000000..aa19cf3f4 --- /dev/null +++ b/cross-chain/polygon/.openzeppelin/polygon-mumbai.json @@ -0,0 +1,458 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x5FB63D9e076a314023F2D1aB5dBFd7045C281EbA", + "txHash": "0x2c13a93c270ba5f4d2090bf5d0a982a30fe2559cfeb2921d54a8e9a60595d191" + }, + "proxies": [ + { + "address": "0xBcD7917282E529BAA6f232DdDc75F3901245A492", + "txHash": "0xc61a4f40fe01779e489b085dd5dff22195ad0953f33bf38e624cb21cb0614012", + "kind": "transparent" + }, + { + "address": "0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818", + "txHash": "0x93354ead88174ecc97297c812b4b534be6d175ffe682cc1b1ee7c1a70fb1432b", + "kind": "transparent" + } + ], + "impls": { + "1eca3b29684e1fcc811e32be6ee7e72cd846a93f69838508595506ae72555f18": { + "address": "0x8420404dC5e9a9f920280B2e0e08988cc7008459", + "txHash": "0x470955a965f850dfc0d2bcd1e32116b71a9ced3fd59d56ddde77e1f4aeee303d", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:400" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_HASHED_NAME", + "offset": 0, + "slot": "151", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:32" + }, + { + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "152", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:33" + }, + { + "label": "__gap", + "offset": 0, + "slot": "153", + "type": "t_array(t_uint256)50_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:120" + }, + { + "label": "_nonces", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_address,t_struct(Counter)3297_storage)", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:28" + }, + { + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "204", + "type": "t_bytes32", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:40", + "renamedFrom": "_PERMIT_TYPEHASH" + }, + { + "label": "__gap", + "offset": 0, + "slot": "205", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:108" + }, + { + "label": "_owner", + "offset": 0, + "slot": "254", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "255", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "304", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "isMinter", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_address,t_bool)", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:76" + }, + { + "label": "minters", + "offset": 0, + "slot": "355", + "type": "t_array(t_address)dyn_storage", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:77" + }, + { + "label": "isGuardian", + "offset": 0, + "slot": "356", + "type": "t_mapping(t_address,t_bool)", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:85" + }, + { + "label": "guardians", + "offset": 0, + "slot": "357", + "type": "t_array(t_address)dyn_storage", + "contract": "L2TBTC", + "src": "@keep-network/tbtc-v2/contracts/l2/L2TBTC.sol:89" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Counter)3297_storage)": { + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3297_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "70974f3ab30d1010f875de7eebcbde08a1b6c71845f5272c23be8f95af866a64": { + "address": "0x5D8e618f44A59dd528cce58d00801F4C8e5cfa8D", + "txHash": "0x5ef2c43ac416e25e25bac712702c81787056a9cfcd0f9589be825911c284f503", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_status", + "offset": 0, + "slot": "101", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:80" + }, + { + "label": "bridge", + "offset": 0, + "slot": "151", + "type": "t_contract(IWormholeTokenBridge)518", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:122" + }, + { + "label": "bridgeToken", + "offset": 0, + "slot": "152", + "type": "t_contract(IERC20Upgradeable)2252", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:123" + }, + { + "label": "tbtc", + "offset": 0, + "slot": "153", + "type": "t_contract(L2TBTC)443", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:124" + }, + { + "label": "gateways", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_uint16,t_bytes32)", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:136" + }, + { + "label": "mintingLimit", + "offset": 0, + "slot": "155", + "type": "t_uint256", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:147" + }, + { + "label": "mintedAmount", + "offset": 0, + "slot": "156", + "type": "t_uint256", + "contract": "L2WormholeGateway", + "src": "@keep-network/tbtc-v2/contracts/l2/L2WormholeGateway.sol:151" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20Upgradeable)2252": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IWormholeTokenBridge)518": { + "label": "contract IWormholeTokenBridge", + "numberOfBytes": "20" + }, + "t_contract(L2TBTC)443": { + "label": "contract L2TBTC", + "numberOfBytes": "20" + }, + "t_mapping(t_uint16,t_bytes32)": { + "label": "mapping(uint16 => bytes32)", + "numberOfBytes": "32" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/cross-chain/polygon/deployments/mumbai/.chainId b/cross-chain/polygon/deployments/mumbai/.chainId new file mode 100644 index 000000000..d7e2f72ce --- /dev/null +++ b/cross-chain/polygon/deployments/mumbai/.chainId @@ -0,0 +1 @@ +80001 \ No newline at end of file diff --git a/cross-chain/polygon/deployments/mumbai/PolygonTBTC.json b/cross-chain/polygon/deployments/mumbai/PolygonTBTC.json new file mode 100644 index 000000000..6658f0c93 --- /dev/null +++ b/cross-chain/polygon/deployments/mumbai/PolygonTBTC.json @@ -0,0 +1,878 @@ +{ + "address": "0xBcD7917282E529BAA6f232DdDc75F3901245A492", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "addMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getGuardians", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinters", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "guardians", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isMinter", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "minters", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "recoverERC721", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "removeMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xc61a4f40fe01779e489b085dd5dff22195ad0953f33bf38e624cb21cb0614012", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0xBcD7917282E529BAA6f232DdDc75F3901245A492", + "transactionIndex": 3, + "gasUsed": "732114", + "logsBloom": "0x00000000008000000000000000000000400000000000000001800000000000000000000000000000000000000000000000008000000000400000000000018000000000000040000000000000000202800001000000000000000100000000000000000000020000000000800000000800000000800000000080000000000000400000000200000000000000000000000000000000000080000000000000800000200000000000000000080000000400000000000000000000000000000000004000000020000000000001000020040100000000000400000000100000000020000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x5a00a9867c8359700a982a0481250dd4c8170cebc63e9e6655fe00db17c510c5", + "transactionHash": "0xc61a4f40fe01779e489b085dd5dff22195ad0953f33bf38e624cb21cb0614012", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 35702944, + "transactionHash": "0xc61a4f40fe01779e489b085dd5dff22195ad0953f33bf38e624cb21cb0614012", + "address": "0xBcD7917282E529BAA6f232DdDc75F3901245A492", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000008420404dc5e9a9f920280b2e0e08988cc7008459" + ], + "data": "0x", + "logIndex": 24, + "blockHash": "0x5a00a9867c8359700a982a0481250dd4c8170cebc63e9e6655fe00db17c510c5" + }, + { + "transactionIndex": 3, + "blockNumber": 35702944, + "transactionHash": "0xc61a4f40fe01779e489b085dd5dff22195ad0953f33bf38e624cb21cb0614012", + "address": "0xBcD7917282E529BAA6f232DdDc75F3901245A492", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 25, + "blockHash": "0x5a00a9867c8359700a982a0481250dd4c8170cebc63e9e6655fe00db17c510c5" + }, + { + "transactionIndex": 3, + "blockNumber": 35702944, + "transactionHash": "0xc61a4f40fe01779e489b085dd5dff22195ad0953f33bf38e624cb21cb0614012", + "address": "0xBcD7917282E529BAA6f232DdDc75F3901245A492", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 26, + "blockHash": "0x5a00a9867c8359700a982a0481250dd4c8170cebc63e9e6655fe00db17c510c5" + }, + { + "transactionIndex": 3, + "blockNumber": 35702944, + "transactionHash": "0xc61a4f40fe01779e489b085dd5dff22195ad0953f33bf38e624cb21cb0614012", + "address": "0xBcD7917282E529BAA6f232DdDc75F3901245A492", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000005fb63d9e076a314023f2d1ab5dbfd7045c281eba", + "logIndex": 27, + "blockHash": "0x5a00a9867c8359700a982a0481250dd4c8170cebc63e9e6655fe00db17c510c5" + }, + { + "transactionIndex": 3, + "blockNumber": 35702944, + "transactionHash": "0xc61a4f40fe01779e489b085dd5dff22195ad0953f33bf38e624cb21cb0614012", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc", + "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" + ], + "data": "0x00000000000000000000000000000000000000000000000000061e412e1f324e00000000000000000000000000000000000000000000000001d2ad5745509c2400000000000000000000000000000000000000000000090d42157262a78aa24900000000000000000000000000000000000000000000000001cc8f16173169d600000000000000000000000000000000000000000000090d421b90a3d5a9d497", + "logIndex": 28, + "blockHash": "0x5a00a9867c8359700a982a0481250dd4c8170cebc63e9e6655fe00db17c510c5" + } + ], + "blockNumber": 35702944, + "cumulativeGasUsed": "1675677", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x8420404dC5e9a9f920280B2e0e08988cc7008459", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file diff --git a/cross-chain/polygon/deployments/mumbai/PolygonWormholeGateway.json b/cross-chain/polygon/deployments/mumbai/PolygonWormholeGateway.json new file mode 100644 index 000000000..1d5047767 --- /dev/null +++ b/cross-chain/polygon/deployments/mumbai/PolygonWormholeGateway.json @@ -0,0 +1,510 @@ +{ + "address": "0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + } + ], + "name": "GatewayAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "mintingLimit", + "type": "uint256" + } + ], + "name": "MintingLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WormholeTbtcDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WormholeTbtcReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "recipientChain", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "arbiterFee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "WormholeTbtcSent", + "type": "event" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridgeToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositWormholeTbtc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_address", + "type": "bytes32" + } + ], + "name": "fromWormholeAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "gateways", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "_bridgeToken", + "type": "address" + }, + { + "internalType": "contract L2TBTC", + "name": "_tbtc", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "mintedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mintingLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "encodedVm", + "type": "bytes" + } + ], + "name": "receiveTbtc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "recipientChain", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "arbiterFee", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "sendTbtc", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "tbtc", + "outputs": [ + { + "internalType": "contract L2TBTC", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "toWormholeAddress", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "chainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "gateway", + "type": "bytes32" + } + ], + "name": "updateGatewayAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_mintingLimit", + "type": "uint256" + } + ], + "name": "updateMintingLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x93354ead88174ecc97297c812b4b534be6d175ffe682cc1b1ee7c1a70fb1432b", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818", + "transactionIndex": 0, + "gasUsed": "749603", + "logsBloom": "0x08000000000000000000000000004000400001000000000000800010000000000000008000000020000000000000000000008000000000000000000000000000000000000000000000000000000202800001000000000000000100000000000000000000020000000000000000000800000000800000000080000000000000400000000200000000000000000000000000000000000080000000000000800000200000000000000000000000000400000000400000000100000000000000004000000020000000000001000020040000000000000400000000100000001020000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x34c1d04f7b53b2f74f51c4effb0678b583890a50ea767843c16be51cf2361663", + "transactionHash": "0x93354ead88174ecc97297c812b4b534be6d175ffe682cc1b1ee7c1a70fb1432b", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 35702972, + "transactionHash": "0x93354ead88174ecc97297c812b4b534be6d175ffe682cc1b1ee7c1a70fb1432b", + "address": "0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000005d8e618f44a59dd528cce58d00801f4c8e5cfa8d" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x34c1d04f7b53b2f74f51c4effb0678b583890a50ea767843c16be51cf2361663" + }, + { + "transactionIndex": 0, + "blockNumber": 35702972, + "transactionHash": "0x93354ead88174ecc97297c812b4b534be6d175ffe682cc1b1ee7c1a70fb1432b", + "address": "0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x34c1d04f7b53b2f74f51c4effb0678b583890a50ea767843c16be51cf2361663" + }, + { + "transactionIndex": 0, + "blockNumber": 35702972, + "transactionHash": "0x93354ead88174ecc97297c812b4b534be6d175ffe682cc1b1ee7c1a70fb1432b", + "address": "0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0x34c1d04f7b53b2f74f51c4effb0678b583890a50ea767843c16be51cf2361663" + }, + { + "transactionIndex": 0, + "blockNumber": 35702972, + "transactionHash": "0x93354ead88174ecc97297c812b4b534be6d175ffe682cc1b1ee7c1a70fb1432b", + "address": "0x91Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000005fb63d9e076a314023f2d1ab5dbfd7045c281eba", + "logIndex": 3, + "blockHash": "0x34c1d04f7b53b2f74f51c4effb0678b583890a50ea767843c16be51cf2361663" + }, + { + "transactionIndex": 0, + "blockNumber": 35702972, + "transactionHash": "0x93354ead88174ecc97297c812b4b534be6d175ffe682cc1b1ee7c1a70fb1432b", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "data": "0x000000000000000000000000000000000000000000000000001aa1997d602c0000000000000000000000000000000000000000000000000001c35769a76dd006000000000000000000000000000000000000000000000e46eca540398772cce300000000000000000000000000000000000000000000000001a8b5d02a0da406000000000000000000000000000000000000000000000e46ecbfe1d304d2f8e3", + "logIndex": 4, + "blockHash": "0x34c1d04f7b53b2f74f51c4effb0678b583890a50ea767843c16be51cf2361663" + } + ], + "blockNumber": 35702972, + "cumulativeGasUsed": "749603", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x5D8e618f44A59dd528cce58d00801F4C8e5cfa8D", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file diff --git a/cross-chain/polygon/external/mumbai/ArbitrumWormholeGateway.json b/cross-chain/polygon/external/mumbai/ArbitrumWormholeGateway.json index 74c39592d..ea8693dc5 100644 --- a/cross-chain/polygon/external/mumbai/ArbitrumWormholeGateway.json +++ b/cross-chain/polygon/external/mumbai/ArbitrumWormholeGateway.json @@ -1,3 +1,3 @@ { - "address": "0xe3e0511EEbD87F08FbaE4486419cb5dFB06e1343" + "address": "0x31A15e213B59E230b45e8c5c99dAFAc3d1236Ee2" } diff --git a/cross-chain/polygon/external/mumbai/OptimismWormholeGateway.json b/cross-chain/polygon/external/mumbai/OptimismWormholeGateway.json index 334fdb833..283665601 100644 --- a/cross-chain/polygon/external/mumbai/OptimismWormholeGateway.json +++ b/cross-chain/polygon/external/mumbai/OptimismWormholeGateway.json @@ -1,3 +1,3 @@ { - "address": "0xc3D46e0266d95215589DE639cC4E93b79f88fc6C" + "address": "0x6449F4381f3d63bDfb36B3bDc375724aD3cD4621" } diff --git a/solidity/.openzeppelin/mainnet.json b/solidity/.openzeppelin/mainnet.json index 94256dc66..b21fce9c9 100644 --- a/solidity/.openzeppelin/mainnet.json +++ b/solidity/.openzeppelin/mainnet.json @@ -9,6 +9,11 @@ "address": "0x5e4861a80B55f035D899f66772117F00FA0E8e7B", "txHash": "0x932eda38cc1fdf7d68bfa6ff11c8bbd443ef32ccdad4ebc55afc7f25fa4398ef", "kind": "transparent" + }, + { + "address": "0x64EA4b84e2BdfD313428b96658260E495a420093", + "txHash": "0x0a8cd2034987664518ad1583c484fb43031f73edcd8e5e3d38dafc08de6f6bb1", + "kind": "transparent" } ], "impls": { @@ -1411,6 +1416,236 @@ } } } + }, + "b8a091d7318541da80a4a032ca1660f9ef5aa923c5203d70ae367fdbae462567": { + "address": "0x9eAE6e8e99d27D377F1EA0659b0CB16ce8aD32bA", + "txHash": "0x4882729501029ce404d379009e8e339c1aaf62b035b6c9df5be88efd0420ee4b", + "layout": { + "solcVersion": "0.8.17", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "reimbursementPool", + "offset": 0, + "slot": "101", + "type": "t_contract(ReimbursementPool)5481", + "contract": "Reimbursable", + "src": "@keep-network/random-beacon/contracts/Reimbursable.sol:51" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "Reimbursable", + "src": "@keep-network/random-beacon/contracts/Reimbursable.sol:51" + }, + { + "label": "isCoordinator", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_address,t_bool)", + "contract": "WalletCoordinator", + "src": "contracts/bridge/WalletCoordinator.sol:136" + }, + { + "label": "walletLock", + "offset": 0, + "slot": "152", + "type": "t_mapping(t_bytes20,t_struct(WalletLock)22127_storage)", + "contract": "WalletCoordinator", + "src": "contracts/bridge/WalletCoordinator.sol:138" + }, + { + "label": "bridge", + "offset": 0, + "slot": "153", + "type": "t_contract(Bridge)16800", + "contract": "WalletCoordinator", + "src": "contracts/bridge/WalletCoordinator.sol:140" + }, + { + "label": "heartbeatRequestValidity", + "offset": 20, + "slot": "153", + "type": "t_uint32", + "contract": "WalletCoordinator", + "src": "contracts/bridge/WalletCoordinator.sol:151" + }, + { + "label": "heartbeatRequestGasOffset", + "offset": 24, + "slot": "153", + "type": "t_uint32", + "contract": "WalletCoordinator", + "src": "contracts/bridge/WalletCoordinator.sol:155" + }, + { + "label": "depositSweepProposalValidity", + "offset": 28, + "slot": "153", + "type": "t_uint32", + "contract": "WalletCoordinator", + "src": "contracts/bridge/WalletCoordinator.sol:167" + }, + { + "label": "depositMinAge", + "offset": 0, + "slot": "154", + "type": "t_uint32", + "contract": "WalletCoordinator", + "src": "contracts/bridge/WalletCoordinator.sol:177" + }, + { + "label": "depositRefundSafetyMargin", + "offset": 4, + "slot": "154", + "type": "t_uint32", + "contract": "WalletCoordinator", + "src": "contracts/bridge/WalletCoordinator.sol:198" + }, + { + "label": "depositSweepMaxSize", + "offset": 8, + "slot": "154", + "type": "t_uint16", + "contract": "WalletCoordinator", + "src": "contracts/bridge/WalletCoordinator.sol:202" + }, + { + "label": "depositSweepProposalSubmissionGasOffset", + "offset": 10, + "slot": "154", + "type": "t_uint32", + "contract": "WalletCoordinator", + "src": "contracts/bridge/WalletCoordinator.sol:211" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes20": { + "label": "bytes20", + "numberOfBytes": "20" + }, + "t_contract(Bridge)16800": { + "label": "contract Bridge", + "numberOfBytes": "20" + }, + "t_contract(ReimbursementPool)5481": { + "label": "contract ReimbursementPool", + "numberOfBytes": "20" + }, + "t_enum(WalletAction)22119": { + "label": "enum WalletCoordinator.WalletAction", + "members": [ + "Idle", + "Heartbeat", + "DepositSweep", + "Redemption", + "MovingFunds", + "MovedFundsSweep" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes20,t_struct(WalletLock)22127_storage)": { + "label": "mapping(bytes20 => struct WalletCoordinator.WalletLock)", + "numberOfBytes": "32" + }, + "t_struct(WalletLock)22127_storage": { + "label": "struct WalletCoordinator.WalletLock", + "members": [ + { + "label": "expiresAt", + "type": "t_uint32", + "offset": 0, + "slot": "0" + }, + { + "label": "cause", + "type": "t_enum(WalletAction)22119", + "offset": 4, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/solidity/contracts/bridge/WalletCoordinator.sol b/solidity/contracts/bridge/WalletCoordinator.sol index 333372979..b5311db7d 100644 --- a/solidity/contracts/bridge/WalletCoordinator.sol +++ b/solidity/contracts/bridge/WalletCoordinator.sol @@ -25,6 +25,7 @@ import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "./BitcoinTx.sol"; import "./Bridge.sol"; import "./Deposit.sol"; +import "./Redemption.sol"; import "./Wallets.sol"; /// @title Wallet coordinator. @@ -120,6 +121,19 @@ contract WalletCoordinator is OwnableUpgradeable, Reimbursable { bytes4 refundLocktime; } + /// @notice Helper structure representing a redemption proposal. + struct RedemptionProposal { + // 20-byte public key hash of the target wallet. + bytes20 walletPubKeyHash; + // Array of the redeemers' output scripts that should be part of + // the redemption. Each output script MUST BE prefixed by its byte + // length, i.e. passed in the exactly same format as during the + // `Bridge.requestRedemption` transaction. + bytes[] redeemersOutputScripts; + // Proposed BTC fee for the entire transaction. + uint256 redemptionTxFee; + } + /// @notice Mapping that holds addresses allowed to submit proposals and /// request heartbeats. mapping(address => bool) public isCoordinator; @@ -195,6 +209,55 @@ contract WalletCoordinator is OwnableUpgradeable, Reimbursable { /// the current conditions. uint32 public depositSweepProposalSubmissionGasOffset; + /// @notice Determines the redemption proposal validity time. In other + /// words, this is the worst-case time for a redemption during + /// which the wallet is busy and cannot take another actions. This + /// is also the duration of the time lock applied to the wallet + /// once a new redemption proposal is submitted. + /// + /// For example, if a redemption proposal was submitted at + /// 2 pm and redemptionProposalValidity is 2 hours, the next + /// proposal (of any type) can be submitted after 4 pm. + uint32 public redemptionProposalValidity; + + /// @notice The minimum time that must elapse since the redemption request + /// creation before a request becomes eligible for a processing. + /// + /// For example, if a request was created at 9 am and + /// redemptionRequestMinAge is 2 hours, the request is eligible for + /// processing after 11 am. + /// + /// @dev Forcing request minimum age ensures block finality for Ethereum. + uint32 public redemptionRequestMinAge; + + /// @notice Each redemption request can be technically handled until it + /// reaches its timeout timestamp after which it can be reported + /// as timed out. However, allowing the wallet to handle requests + /// that are close to their timeout timestamp may cause a race + /// between the wallet and the redeemer. In result, the wallet may + /// redeem the requested funds even though the redeemer already + /// received back their tBTC (locked during redemption request) upon + /// reporting the request timeout. In effect, the redeemer may end + /// out with both tBTC and redeemed BTC in their hands which has + /// a negative impact on the tBTC <-> BTC peg. In order to mitigate + /// that problem, this parameter determines a safety margin that + /// puts the latest moment a request can be handled far before the + /// point after which the request can be reported as timed out. + /// + /// For example, if a request times out after 8 pm and + /// redemptionRequestTimeoutSafetyMargin is 2 hours, the request is + /// valid for processing only before 6 pm. + uint32 public redemptionRequestTimeoutSafetyMargin; + + /// @notice The maximum count of redemption requests that can be processed + /// within a single redemption. + uint16 public redemptionMaxSize; + + /// @notice Gas that is meant to balance the redemption proposal + /// submission overall cost. Can be updated by the owner based on + /// the current conditions. + uint32 public redemptionProposalSubmissionGasOffset; + event CoordinatorAdded(address indexed coordinator); event CoordinatorRemoved(address indexed coordinator); @@ -225,6 +288,19 @@ contract WalletCoordinator is OwnableUpgradeable, Reimbursable { address indexed coordinator ); + event RedemptionProposalParametersUpdated( + uint32 redemptionProposalValidity, + uint32 redemptionRequestMinAge, + uint32 redemptionRequestTimeoutSafetyMargin, + uint16 redemptionMaxSize, + uint32 redemptionProposalSubmissionGasOffset + ); + + event RedemptionProposalSubmitted( + RedemptionProposal proposal, + address indexed coordinator + ); + modifier onlyCoordinator() { require(isCoordinator[msg.sender], "Caller is not a coordinator"); _; @@ -252,13 +328,19 @@ contract WalletCoordinator is OwnableUpgradeable, Reimbursable { (, , , reimbursementPool) = _bridge.contractReferences(); heartbeatRequestValidity = 1 hours; - heartbeatRequestGasOffset = 5_000; + heartbeatRequestGasOffset = 10_000; depositSweepProposalValidity = 4 hours; depositMinAge = 2 hours; depositRefundSafetyMargin = 24 hours; depositSweepMaxSize = 5; - depositSweepProposalSubmissionGasOffset = 5_000; + depositSweepProposalSubmissionGasOffset = 20_000; // optimized for 10 inputs + + redemptionProposalValidity = 2 hours; + redemptionRequestMinAge = 600; // 10 minutes or ~50 blocks. + redemptionRequestTimeoutSafetyMargin = 2 hours; + redemptionMaxSize = 20; + redemptionProposalSubmissionGasOffset = 20_000; } /// @notice Adds the given address to the set of coordinator addresses. @@ -467,7 +549,8 @@ contract WalletCoordinator is OwnableUpgradeable, Reimbursable { /// - Each deposit must have valid extra data (see `validateDepositExtraInfo`), /// - Each deposit must have the refund safety margin preserved, /// - Each deposit must be controlled by the same wallet, - /// - Each deposit must target the same vault. + /// - Each deposit must target the same vault, + /// - Each deposit must be unique. /// /// The following off-chain validation must be performed as a bare minimum: /// - Inputs used for the sweep transaction have enough Bitcoin confirmations, @@ -498,22 +581,28 @@ contract WalletCoordinator is OwnableUpgradeable, Reimbursable { address proposalVault = address(0); + uint256[] memory processedDepositKeys = new uint256[]( + proposal.depositsKeys.length + ); + for (uint256 i = 0; i < proposal.depositsKeys.length; i++) { DepositKey memory depositKey = proposal.depositsKeys[i]; DepositExtraInfo memory depositExtraInfo = depositsExtraInfo[i]; - // slither-disable-next-line calls-loop - Deposit.DepositRequest memory depositRequest = bridge.deposits( - uint256( - keccak256( - abi.encodePacked( - depositKey.fundingTxHash, - depositKey.fundingOutputIndex - ) + uint256 depositKeyUint = uint256( + keccak256( + abi.encodePacked( + depositKey.fundingTxHash, + depositKey.fundingOutputIndex ) ) ); + // slither-disable-next-line calls-loop + Deposit.DepositRequest memory depositRequest = bridge.deposits( + depositKeyUint + ); + require(depositRequest.revealedAt != 0, "Deposit not revealed"); require( @@ -554,6 +643,16 @@ contract WalletCoordinator is OwnableUpgradeable, Reimbursable { depositRequest.vault == proposalVault, "Deposit targets different vault" ); + + // Make sure there are no duplicates in the deposits list. + for (uint256 j = 0; j < i; j++) { + require( + processedDepositKeys[j] != depositKeyUint, + "Duplicated deposit" + ); + } + + processedDepositKeys[i] = depositKeyUint; } return true; @@ -687,4 +786,218 @@ contract WalletCoordinator is OwnableUpgradeable, Reimbursable { revert("Extra info funding output script does not match"); } + + /// @notice Updates parameters related to redemption proposal. + /// @param _redemptionProposalValidity The new value of `redemptionProposalValidity`. + /// @param _redemptionRequestMinAge The new value of `redemptionRequestMinAge`. + /// @param _redemptionRequestTimeoutSafetyMargin The new value of + /// `redemptionRequestTimeoutSafetyMargin`. + /// @param _redemptionMaxSize The new value of `redemptionMaxSize`. + /// @param _redemptionProposalSubmissionGasOffset The new value of + /// `redemptionProposalSubmissionGasOffset`. + /// @dev Requirements: + /// - The caller must be the owner. + function updateRedemptionProposalParameters( + uint32 _redemptionProposalValidity, + uint32 _redemptionRequestMinAge, + uint32 _redemptionRequestTimeoutSafetyMargin, + uint16 _redemptionMaxSize, + uint32 _redemptionProposalSubmissionGasOffset + ) external onlyOwner { + redemptionProposalValidity = _redemptionProposalValidity; + redemptionRequestMinAge = _redemptionRequestMinAge; + redemptionRequestTimeoutSafetyMargin = _redemptionRequestTimeoutSafetyMargin; + redemptionMaxSize = _redemptionMaxSize; + redemptionProposalSubmissionGasOffset = _redemptionProposalSubmissionGasOffset; + + emit RedemptionProposalParametersUpdated( + _redemptionProposalValidity, + _redemptionRequestMinAge, + _redemptionRequestTimeoutSafetyMargin, + _redemptionMaxSize, + _redemptionProposalSubmissionGasOffset + ); + } + + /// @notice Submits a redemption proposal. Locks the target wallet + /// for a specific time, equal to the proposal validity period. + /// This function does not store the proposal in the state but + /// just emits an event that serves as a guiding light for wallet + /// off-chain members. Wallet members are supposed to validate + /// the proposal on their own, before taking any action. + /// @param proposal The redemption proposal + /// @dev Requirements: + /// - The caller is a coordinator, + /// - The wallet is not time-locked. + function submitRedemptionProposal(RedemptionProposal calldata proposal) + public + onlyCoordinator + onlyAfterWalletLock(proposal.walletPubKeyHash) + { + walletLock[proposal.walletPubKeyHash] = WalletLock( + /* solhint-disable-next-line not-rely-on-time */ + uint32(block.timestamp) + redemptionProposalValidity, + WalletAction.Redemption + ); + + emit RedemptionProposalSubmitted(proposal, msg.sender); + } + + /// @notice Wraps `submitRedemptionProposal` call and reimburses the + /// caller's transaction cost. + /// @dev See `submitRedemptionProposal` function documentation. + function submitRedemptionProposalWithReimbursement( + RedemptionProposal calldata proposal + ) external { + uint256 gasStart = gasleft(); + + submitRedemptionProposal(proposal); + + reimbursementPool.refund( + (gasStart - gasleft()) + redemptionProposalSubmissionGasOffset, + msg.sender + ); + } + + /// @notice View function encapsulating the main rules of a valid redemption + /// proposal. This function is meant to facilitate the off-chain + /// validation of the incoming proposals. Thanks to it, most + /// of the work can be done using a single readonly contract call. + /// @param proposal The redemption proposal to validate. + /// @return True if the proposal is valid. Reverts otherwise. + /// @dev Requirements: + /// - The target wallet must be in the Live state, + /// - The number of redemption requests included in the redemption + /// proposal must be in the range [1, `redemptionMaxSize`], + /// - The proposed redemption tx fee must be grater than zero, + /// - The proposed redemption tx fee must be lesser than or equal to + /// the maximum total fee allowed by the Bridge + /// (`Bridge.redemptionTxMaxTotalFee`), + /// - The proposed maximum per-request redemption tx fee share must be + /// lesser than or equal to the maximum fee share allowed by the + /// given request (`RedemptionRequest.txMaxFee`), + /// - Each request must be a pending request registered in the Bridge, + /// - Each request must be old enough, i.e. at least `redemptionRequestMinAge` + /// elapsed since their creation time, + /// - Each request must have the timeout safety margin preserved, + /// - Each request must be unique. + function validateRedemptionProposal(RedemptionProposal calldata proposal) + external + view + returns (bool) + { + require( + bridge.wallets(proposal.walletPubKeyHash).state == + Wallets.WalletState.Live, + "Wallet is not in Live state" + ); + + uint256 requestsCount = proposal.redeemersOutputScripts.length; + + require(requestsCount > 0, "Redemption below the min size"); + + require( + requestsCount <= redemptionMaxSize, + "Redemption exceeds the max size" + ); + + ( + , + , + , + uint64 redemptionTxMaxTotalFee, + uint32 redemptionTimeout, + , + + ) = bridge.redemptionParameters(); + + require( + proposal.redemptionTxFee > 0, + "Proposed transaction fee cannot be zero" + ); + + // Make sure the proposed fee does not exceed the total fee limit. + require( + proposal.redemptionTxFee <= redemptionTxMaxTotalFee, + "Proposed transaction fee is too high" + ); + + // Compute the indivisible remainder that remains after dividing the + // redemption transaction fee over all requests evenly. + uint256 redemptionTxFeeRemainder = proposal.redemptionTxFee % + requestsCount; + // Compute the transaction fee per request by dividing the redemption + // transaction fee (reduced by the remainder) by the number of requests. + uint256 redemptionTxFeePerRequest = (proposal.redemptionTxFee - + redemptionTxFeeRemainder) / requestsCount; + + uint256[] memory processedRedemptionKeys = new uint256[](requestsCount); + + for (uint256 i = 0; i < requestsCount; i++) { + bytes memory script = proposal.redeemersOutputScripts[i]; + + // As the wallet public key hash is part of the redemption key, + // we have an implicit guarantee that all requests being part + // of the proposal target the same wallet. + uint256 redemptionKey = uint256( + keccak256( + abi.encodePacked( + keccak256(script), + proposal.walletPubKeyHash + ) + ) + ); + + // slither-disable-next-line calls-loop + Redemption.RedemptionRequest memory redemptionRequest = bridge + .pendingRedemptions(redemptionKey); + + require( + redemptionRequest.requestedAt != 0, + "Not a pending redemption request" + ); + + require( + /* solhint-disable-next-line not-rely-on-time */ + block.timestamp > + redemptionRequest.requestedAt + redemptionRequestMinAge, + "Redemption request min age not achieved yet" + ); + + // Calculate the timeout the given request times out at. + uint32 requestTimeout = redemptionRequest.requestedAt + + redemptionTimeout; + // Make sure we are far enough from the moment the request times out. + require( + /* solhint-disable-next-line not-rely-on-time */ + block.timestamp < + requestTimeout - redemptionRequestTimeoutSafetyMargin, + "Redemption request timeout safety margin is not preserved" + ); + + uint256 feePerRequest = redemptionTxFeePerRequest; + // The last request incurs the fee remainder. + if (i == requestsCount - 1) { + feePerRequest += redemptionTxFeeRemainder; + } + // Make sure the redemption transaction fee share incurred by + // the given request fits in the limit for that request. + require( + feePerRequest <= redemptionRequest.txMaxFee, + "Proposed transaction per-request fee share is too high" + ); + + // Make sure there are no duplicates in the requests list. + for (uint256 j = 0; j < i; j++) { + require( + processedRedemptionKeys[j] != redemptionKey, + "Duplicated request" + ); + } + + processedRedemptionKeys[i] = redemptionKey; + } + + return true; + } } diff --git a/solidity/deploy/35_add_coordinator_address.ts b/solidity/deploy/35_add_coordinator_address.ts new file mode 100644 index 000000000..0f52b056e --- /dev/null +++ b/solidity/deploy/35_add_coordinator_address.ts @@ -0,0 +1,20 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types" +import { DeployFunction } from "hardhat-deploy/types" + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { getNamedAccounts, deployments } = hre + const { execute } = deployments + const { deployer, coordinator } = await getNamedAccounts() + + await execute( + "WalletCoordinator", + { from: deployer, log: true, waitConfirmations: 1 }, + "addCoordinator", + coordinator + ) +} + +export default func + +func.tags = ["AddCoordinatorAddress"] +func.dependencies = ["WalletCoordinator"] diff --git a/solidity/deploy/35_transfer_wallet_coordinator_ownership.ts b/solidity/deploy/36_transfer_wallet_coordinator_ownership.ts similarity index 91% rename from solidity/deploy/35_transfer_wallet_coordinator_ownership.ts rename to solidity/deploy/36_transfer_wallet_coordinator_ownership.ts index 77439c765..7c8673bfc 100644 --- a/solidity/deploy/35_transfer_wallet_coordinator_ownership.ts +++ b/solidity/deploy/36_transfer_wallet_coordinator_ownership.ts @@ -15,5 +15,5 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { export default func func.tags = ["TransferWalletCoordinatorOwnership"] -func.dependencies = ["WalletCoordinator"] +func.dependencies = ["AddCoordinatorAddress"] func.runAtTheEnd = true diff --git a/solidity/deploy/36_deploy_light_relay_maintainer_proxy.ts b/solidity/deploy/37_deploy_light_relay_maintainer_proxy.ts similarity index 100% rename from solidity/deploy/36_deploy_light_relay_maintainer_proxy.ts rename to solidity/deploy/37_deploy_light_relay_maintainer_proxy.ts diff --git a/solidity/deploy/37_authorize_maintainer_in_light_relay_maintainer_proxy.ts b/solidity/deploy/38_authorize_maintainer_in_light_relay_maintainer_proxy.ts similarity index 100% rename from solidity/deploy/37_authorize_maintainer_in_light_relay_maintainer_proxy.ts rename to solidity/deploy/38_authorize_maintainer_in_light_relay_maintainer_proxy.ts diff --git a/solidity/deploy/38_transfer_light_relay_maintainer_proxy_ownership.ts b/solidity/deploy/39_transfer_light_relay_maintainer_proxy_ownership.ts similarity index 100% rename from solidity/deploy/38_transfer_light_relay_maintainer_proxy_ownership.ts rename to solidity/deploy/39_transfer_light_relay_maintainer_proxy_ownership.ts diff --git a/solidity/deploy/39_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.ts b/solidity/deploy/40_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.ts similarity index 100% rename from solidity/deploy/39_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.ts rename to solidity/deploy/40_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.ts diff --git a/solidity/deploy/40_authorize_light_relay_maintainer_proxy_in_light_relay.ts b/solidity/deploy/41_authorize_light_relay_maintainer_proxy_in_light_relay.ts similarity index 100% rename from solidity/deploy/40_authorize_light_relay_maintainer_proxy_in_light_relay.ts rename to solidity/deploy/41_authorize_light_relay_maintainer_proxy_in_light_relay.ts diff --git a/solidity/deployments/mainnet/WalletCoordinator.json b/solidity/deployments/mainnet/WalletCoordinator.json new file mode 100644 index 000000000..feefc6882 --- /dev/null +++ b/solidity/deployments/mainnet/WalletCoordinator.json @@ -0,0 +1,840 @@ +{ + "address": "0x64EA4b84e2BdfD313428b96658260E495a420093", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "CoordinatorAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "CoordinatorRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "depositSweepProposalValidity", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "depositMinAge", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "depositRefundSafetyMargin", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "depositSweepMaxSize", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "depositSweepProposalSubmissionGasOffset", + "type": "uint32" + } + ], + "name": "DepositSweepProposalParametersUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "fundingTxHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + } + ], + "internalType": "struct WalletCoordinator.DepositKey[]", + "name": "depositsKeys", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "sweepTxFee", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "depositsRevealBlocks", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct WalletCoordinator.DepositSweepProposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": true, + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "DepositSweepProposalSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "heartbeatRequestValidity", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "heartbeatRequestGasOffset", + "type": "uint32" + } + ], + "name": "HeartbeatRequestParametersUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "HeartbeatRequestSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newReimbursementPool", + "type": "address" + } + ], + "name": "ReimbursementPoolUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + } + ], + "name": "WalletManuallyUnlocked", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "addCoordinator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract Bridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositMinAge", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositRefundSafetyMargin", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositSweepMaxSize", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositSweepProposalSubmissionGasOffset", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositSweepProposalValidity", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "heartbeatRequestGasOffset", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "heartbeatRequestValidity", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract Bridge", + "name": "_bridge", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isCoordinator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reimbursementPool", + "outputs": [ + { + "internalType": "contract ReimbursementPool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "removeCoordinator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "requestHeartbeat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "requestHeartbeatWithReimbursement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "fundingTxHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + } + ], + "internalType": "struct WalletCoordinator.DepositKey[]", + "name": "depositsKeys", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "sweepTxFee", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "depositsRevealBlocks", + "type": "uint256[]" + } + ], + "internalType": "struct WalletCoordinator.DepositSweepProposal", + "name": "proposal", + "type": "tuple" + } + ], + "name": "submitDepositSweepProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "fundingTxHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + } + ], + "internalType": "struct WalletCoordinator.DepositKey[]", + "name": "depositsKeys", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "sweepTxFee", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "depositsRevealBlocks", + "type": "uint256[]" + } + ], + "internalType": "struct WalletCoordinator.DepositSweepProposal", + "name": "proposal", + "type": "tuple" + } + ], + "name": "submitDepositSweepProposalWithReimbursement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + } + ], + "name": "unlockWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_depositSweepProposalValidity", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "_depositMinAge", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "_depositRefundSafetyMargin", + "type": "uint32" + }, + { + "internalType": "uint16", + "name": "_depositSweepMaxSize", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "_depositSweepProposalSubmissionGasOffset", + "type": "uint32" + } + ], + "name": "updateDepositSweepProposalParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_heartbeatRequestValidity", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "_heartbeatRequestGasOffset", + "type": "uint32" + } + ], + "name": "updateHeartbeatRequestParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ReimbursementPool", + "name": "_reimbursementPool", + "type": "address" + } + ], + "name": "updateReimbursementPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "fundingTxHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + } + ], + "internalType": "struct WalletCoordinator.DepositKey[]", + "name": "depositsKeys", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "sweepTxFee", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "depositsRevealBlocks", + "type": "uint256[]" + } + ], + "internalType": "struct WalletCoordinator.DepositSweepProposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "bytes4", + "name": "version", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "inputVector", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "outputVector", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "locktime", + "type": "bytes4" + } + ], + "internalType": "struct BitcoinTx.Info", + "name": "fundingTx", + "type": "tuple" + }, + { + "internalType": "bytes8", + "name": "blindingFactor", + "type": "bytes8" + }, + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes20", + "name": "refundPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes4", + "name": "refundLocktime", + "type": "bytes4" + } + ], + "internalType": "struct WalletCoordinator.DepositExtraInfo[]", + "name": "depositsExtraInfo", + "type": "tuple[]" + } + ], + "name": "validateDepositSweepProposal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes20", + "name": "", + "type": "bytes20" + } + ], + "name": "walletLock", + "outputs": [ + { + "internalType": "uint32", + "name": "expiresAt", + "type": "uint32" + }, + { + "internalType": "enum WalletCoordinator.WalletAction", + "name": "cause", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x0a8cd2034987664518ad1583c484fb43031f73edcd8e5e3d38dafc08de6f6bb1", + "receipt": { + "to": null, + "from": "0x123694886DBf5Ac94DDA07135349534536D14cAf", + "contractAddress": "0x64EA4b84e2BdfD313428b96658260E495a420093", + "transactionIndex": 35, + "gasUsed": "723585", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000020040000000002000001000000000000000000000000000000000000020000002000000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000000800000000000000000000020000000000400000000000000000004000000400000000000000020000000000000000000440000000000000400000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x13d48fd27c9bc628d729cd2b79b4791b2ae0039fdbc4a7cfa823b9a04e628b19", + "transactionHash": "0x0a8cd2034987664518ad1583c484fb43031f73edcd8e5e3d38dafc08de6f6bb1", + "logs": [ + { + "transactionIndex": 35, + "blockNumber": 17285662, + "transactionHash": "0x0a8cd2034987664518ad1583c484fb43031f73edcd8e5e3d38dafc08de6f6bb1", + "address": "0x64EA4b84e2BdfD313428b96658260E495a420093", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000009eae6e8e99d27d377f1ea0659b0cb16ce8ad32ba" + ], + "data": "0x", + "logIndex": 188, + "blockHash": "0x13d48fd27c9bc628d729cd2b79b4791b2ae0039fdbc4a7cfa823b9a04e628b19" + }, + { + "transactionIndex": 35, + "blockNumber": 17285662, + "transactionHash": "0x0a8cd2034987664518ad1583c484fb43031f73edcd8e5e3d38dafc08de6f6bb1", + "address": "0x64EA4b84e2BdfD313428b96658260E495a420093", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000123694886dbf5ac94dda07135349534536d14caf" + ], + "data": "0x", + "logIndex": 189, + "blockHash": "0x13d48fd27c9bc628d729cd2b79b4791b2ae0039fdbc4a7cfa823b9a04e628b19" + }, + { + "transactionIndex": 35, + "blockNumber": 17285662, + "transactionHash": "0x0a8cd2034987664518ad1583c484fb43031f73edcd8e5e3d38dafc08de6f6bb1", + "address": "0x64EA4b84e2BdfD313428b96658260E495a420093", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 190, + "blockHash": "0x13d48fd27c9bc628d729cd2b79b4791b2ae0039fdbc4a7cfa823b9a04e628b19" + }, + { + "transactionIndex": 35, + "blockNumber": 17285662, + "transactionHash": "0x0a8cd2034987664518ad1583c484fb43031f73edcd8e5e3d38dafc08de6f6bb1", + "address": "0x64EA4b84e2BdfD313428b96658260E495a420093", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016a76d3cd3c1e3ce843c6680d6b37e9116b5c706", + "logIndex": 191, + "blockHash": "0x13d48fd27c9bc628d729cd2b79b4791b2ae0039fdbc4a7cfa823b9a04e628b19" + } + ], + "blockNumber": 17285662, + "cumulativeGasUsed": "7053979", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x9eAE6e8e99d27D377F1EA0659b0CB16ce8aD32bA", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file diff --git a/solidity/export.json b/solidity/export.json index 0e5a1efa6..cef4b247b 100644 --- a/solidity/export.json +++ b/solidity/export.json @@ -11190,6 +11190,775 @@ } ] }, + "WalletCoordinator": { + "address": "0x64EA4b84e2BdfD313428b96658260E495a420093", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "CoordinatorAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "CoordinatorRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "depositSweepProposalValidity", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "depositMinAge", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "depositRefundSafetyMargin", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "depositSweepMaxSize", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "depositSweepProposalSubmissionGasOffset", + "type": "uint32" + } + ], + "name": "DepositSweepProposalParametersUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "fundingTxHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + } + ], + "internalType": "struct WalletCoordinator.DepositKey[]", + "name": "depositsKeys", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "sweepTxFee", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "depositsRevealBlocks", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct WalletCoordinator.DepositSweepProposal", + "name": "proposal", + "type": "tuple" + }, + { + "indexed": true, + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "DepositSweepProposalSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "heartbeatRequestValidity", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "heartbeatRequestGasOffset", + "type": "uint32" + } + ], + "name": "HeartbeatRequestParametersUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "HeartbeatRequestSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newReimbursementPool", + "type": "address" + } + ], + "name": "ReimbursementPoolUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + } + ], + "name": "WalletManuallyUnlocked", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "addCoordinator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract Bridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositMinAge", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositRefundSafetyMargin", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositSweepMaxSize", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositSweepProposalSubmissionGasOffset", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositSweepProposalValidity", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "heartbeatRequestGasOffset", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "heartbeatRequestValidity", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract Bridge", + "name": "_bridge", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isCoordinator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reimbursementPool", + "outputs": [ + { + "internalType": "contract ReimbursementPool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "coordinator", + "type": "address" + } + ], + "name": "removeCoordinator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "requestHeartbeat", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "requestHeartbeatWithReimbursement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "fundingTxHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + } + ], + "internalType": "struct WalletCoordinator.DepositKey[]", + "name": "depositsKeys", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "sweepTxFee", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "depositsRevealBlocks", + "type": "uint256[]" + } + ], + "internalType": "struct WalletCoordinator.DepositSweepProposal", + "name": "proposal", + "type": "tuple" + } + ], + "name": "submitDepositSweepProposal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "fundingTxHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + } + ], + "internalType": "struct WalletCoordinator.DepositKey[]", + "name": "depositsKeys", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "sweepTxFee", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "depositsRevealBlocks", + "type": "uint256[]" + } + ], + "internalType": "struct WalletCoordinator.DepositSweepProposal", + "name": "proposal", + "type": "tuple" + } + ], + "name": "submitDepositSweepProposalWithReimbursement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + } + ], + "name": "unlockWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_depositSweepProposalValidity", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "_depositMinAge", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "_depositRefundSafetyMargin", + "type": "uint32" + }, + { + "internalType": "uint16", + "name": "_depositSweepMaxSize", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "_depositSweepProposalSubmissionGasOffset", + "type": "uint32" + } + ], + "name": "updateDepositSweepProposalParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_heartbeatRequestValidity", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "_heartbeatRequestGasOffset", + "type": "uint32" + } + ], + "name": "updateHeartbeatRequestParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ReimbursementPool", + "name": "_reimbursementPool", + "type": "address" + } + ], + "name": "updateReimbursementPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "fundingTxHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + } + ], + "internalType": "struct WalletCoordinator.DepositKey[]", + "name": "depositsKeys", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "sweepTxFee", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "depositsRevealBlocks", + "type": "uint256[]" + } + ], + "internalType": "struct WalletCoordinator.DepositSweepProposal", + "name": "proposal", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "bytes4", + "name": "version", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "inputVector", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "outputVector", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "locktime", + "type": "bytes4" + } + ], + "internalType": "struct BitcoinTx.Info", + "name": "fundingTx", + "type": "tuple" + }, + { + "internalType": "bytes8", + "name": "blindingFactor", + "type": "bytes8" + }, + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes20", + "name": "refundPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes4", + "name": "refundLocktime", + "type": "bytes4" + } + ], + "internalType": "struct WalletCoordinator.DepositExtraInfo[]", + "name": "depositsExtraInfo", + "type": "tuple[]" + } + ], + "name": "validateDepositSweepProposal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes20", + "name": "", + "type": "bytes20" + } + ], + "name": "walletLock", + "outputs": [ + { + "internalType": "uint32", + "name": "expiresAt", + "type": "uint32" + }, + { + "internalType": "enum WalletCoordinator.WalletAction", + "name": "cause", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + } + ] + }, "Wallets": { "address": "0xC67913137429985416DbCe28D9fa9ec960BA47BF", "abi": [ diff --git a/solidity/hardhat.config.ts b/solidity/hardhat.config.ts index 23584d37b..09206d9bc 100644 --- a/solidity/hardhat.config.ts +++ b/solidity/hardhat.config.ts @@ -219,8 +219,13 @@ const config: HardhatUserConfig = { goerli: 0, // We are not setting SPV maintainer for mainnet in deployment scripts. }, - v1Redeemer: { + coordinator: { default: 9, + goerli: "0x4815cd81fFc21039a25aCFbD97CE75cCE8579042", + mainnet: "0x0595acCca29654c43Bd67E18578b30a405265234", + }, + v1Redeemer: { + default: 10, goerli: 0, mainnet: "0x8Bac178fA95Cb56D11A94d4f1b2B1F5Fc48A30eA", }, diff --git a/solidity/package.json b/solidity/package.json index 83b107330..2abcb51cf 100644 --- a/solidity/package.json +++ b/solidity/package.json @@ -1,6 +1,6 @@ { "name": "@keep-network/tbtc-v2", - "version": "1.4.0-dev", + "version": "1.5.0-dev", "license": "GPL-3.0-only", "files": [ "artifacts/", diff --git a/solidity/test/bridge/WalletCoordinator.test.ts b/solidity/test/bridge/WalletCoordinator.test.ts index fb9e1dee6..3e4bf96a6 100644 --- a/solidity/test/bridge/WalletCoordinator.test.ts +++ b/solidity/test/bridge/WalletCoordinator.test.ts @@ -677,7 +677,7 @@ describe("WalletCoordinator", () => { it("should do the refund", async () => { const diff = coordinatorBalanceAfter.sub(coordinatorBalanceBefore) expect(diff).to.be.gt(0) - expect(diff).to.be.lt(ethers.utils.parseUnits("1000000", "gwei")) // 0,001 ETH + expect(diff).to.be.lt(ethers.utils.parseUnits("2000000", "gwei")) // 0,002 ETH }) }) }) @@ -982,7 +982,7 @@ describe("WalletCoordinator", () => { it("should do the refund", async () => { const diff = coordinatorBalanceAfter.sub(coordinatorBalanceBefore) expect(diff).to.be.gt(0) - expect(diff).to.be.lt(ethers.utils.parseUnits("1000000", "gwei")) // 0,001 ETH + expect(diff).to.be.lt(ethers.utils.parseUnits("4000000", "gwei")) // 0,004 ETH }) }) }) @@ -1956,83 +1956,1196 @@ describe("WalletCoordinator", () => { context( "when all deposits targets the same vault", () => { - let depositOne - let depositTwo + context( + "when there are duplicated deposits", + () => { + let depositOne + let depositTwo + let depositThree + + before(async () => { + await createSnapshot() + + depositOne = createTestDeposit( + walletPubKeyHash, + vault, + true + ) + + depositTwo = createTestDeposit( + walletPubKeyHash, + vault, + false + ) + + depositThree = createTestDeposit( + walletPubKeyHash, + vault, + false + ) + + bridge.deposits + .whenCalledWith( + depositKey( + depositOne.key.fundingTxHash, + depositOne.key.fundingOutputIndex + ) + ) + .returns(depositOne.request) + + bridge.deposits + .whenCalledWith( + depositKey( + depositTwo.key.fundingTxHash, + depositTwo.key.fundingOutputIndex + ) + ) + .returns(depositTwo.request) + + bridge.deposits + .whenCalledWith( + depositKey( + depositThree.key.fundingTxHash, + depositThree.key + .fundingOutputIndex + ) + ) + .returns(depositThree.request) + }) + + after(async () => { + bridge.deposits.reset() + + await restoreSnapshot() + }) + + it("should revert", async () => { + const proposal = { + walletPubKeyHash, + depositsKeys: [ + depositOne.key, + depositTwo.key, + depositThree.key, + depositTwo.key, // duplicate + ], + sweepTxFee, + depositsRevealBlocks: [], // Not relevant in this scenario. + } + + const depositsExtraInfo = [ + depositOne.extraInfo, + depositTwo.extraInfo, + depositThree.extraInfo, + depositTwo.extraInfo, // duplicate + ] + + await expect( + walletCoordinator.validateDepositSweepProposal( + proposal, + depositsExtraInfo + ) + ).to.be.revertedWith( + "Duplicated deposit" + ) + }) + } + ) + + context( + "when all deposits are unique", + () => { + let depositOne + let depositTwo + + before(async () => { + await createSnapshot() + + depositOne = createTestDeposit( + walletPubKeyHash, + vault, + true + ) + + depositTwo = createTestDeposit( + walletPubKeyHash, + vault, + false + ) + + bridge.deposits + .whenCalledWith( + depositKey( + depositOne.key.fundingTxHash, + depositOne.key.fundingOutputIndex + ) + ) + .returns(depositOne.request) + + bridge.deposits + .whenCalledWith( + depositKey( + depositTwo.key.fundingTxHash, + depositTwo.key.fundingOutputIndex + ) + ) + .returns(depositTwo.request) + }) + + after(async () => { + bridge.deposits.reset() + + await restoreSnapshot() + }) + + it("should succeed", async () => { + const proposal = { + walletPubKeyHash, + depositsKeys: [ + depositOne.key, + depositTwo.key, + ], + sweepTxFee, + depositsRevealBlocks: [], // Not relevant in this scenario. + } + + const depositsExtraInfo = [ + depositOne.extraInfo, + depositTwo.extraInfo, + ] + + const result = + await walletCoordinator.validateDepositSweepProposal( + proposal, + depositsExtraInfo + ) + + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + expect(result).to.be.true + }) + } + ) + } + ) + } + ) + } + ) + }) + }) + }) + }) + }) + }) + }) + }) + }) + }) + + describe("updateRedemptionProposalParameters", () => { + before(async () => { + await createSnapshot() + }) + + after(async () => { + await restoreSnapshot() + }) + + context("when called by a third party", () => { + it("should revert", async () => { + await expect( + walletCoordinator + .connect(thirdParty) + .updateRedemptionProposalParameters(101, 102, 103, 104, 105) + ).to.be.revertedWith("Ownable: caller is not the owner") + }) + }) + + context("when called by the owner", () => { + let tx: ContractTransaction + + before(async () => { + await createSnapshot() + + tx = await walletCoordinator + .connect(owner) + .updateRedemptionProposalParameters(101, 102, 103, 104, 105) + }) + + after(async () => { + await restoreSnapshot() + }) + + it("should update redemption proposal parameters", async () => { + expect( + await walletCoordinator.redemptionProposalValidity() + ).to.be.equal(101) + expect(await walletCoordinator.redemptionRequestMinAge()).to.be.equal( + 102 + ) + expect( + await walletCoordinator.redemptionRequestTimeoutSafetyMargin() + ).to.be.equal(103) + expect(await walletCoordinator.redemptionMaxSize()).to.be.equal(104) + expect( + await walletCoordinator.redemptionProposalSubmissionGasOffset() + ).to.be.equal(105) + }) + + it("should emit the RedemptionProposalParametersUpdated event", async () => { + await expect(tx) + .to.emit(walletCoordinator, "RedemptionProposalParametersUpdated") + .withArgs(101, 102, 103, 104, 105) + }) + }) + }) + + describe("submitRedemptionProposal", () => { + const walletPubKeyHash = "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726" + + before(async () => { + await createSnapshot() + }) + + after(async () => { + await restoreSnapshot() + }) + + context("when the caller is not a coordinator", () => { + before(async () => { + await createSnapshot() + }) + + after(async () => { + await restoreSnapshot() + }) + + it("should revert", async () => { + const tx = walletCoordinator + .connect(thirdParty) + .submitRedemptionProposal({ + walletPubKeyHash, + redeemersOutputScripts: [ + "0x1976a9142cd680318747b720d67bf4246eb7403b476adb3488ac", + "0x160014e6f9d74726b19b75f16fe1e9feaec048aa4fa1d0", + ], + redemptionTxFee: 5000, + }) + + await expect(tx).to.be.revertedWith("Caller is not a coordinator") + }) + }) + + context("when the caller is a coordinator", () => { + before(async () => { + await createSnapshot() + + await walletCoordinator + .connect(owner) + .addCoordinator(thirdParty.address) + }) + + after(async () => { + await restoreSnapshot() + }) + + context("when wallet is time-locked", () => { + before(async () => { + await createSnapshot() + + // Submit a proposal to set a wallet time lock. + await walletCoordinator.connect(thirdParty).submitRedemptionProposal({ + walletPubKeyHash, + redeemersOutputScripts: [ + "0x1976a9142cd680318747b720d67bf4246eb7403b476adb3488ac", + "0x160014e6f9d74726b19b75f16fe1e9feaec048aa4fa1d0", + ], + redemptionTxFee: 5000, + }) + + // Jump to the end of the lock period but not beyond it. + await increaseTime( + (await walletCoordinator.redemptionProposalValidity()) - 1 + ) + }) + + after(async () => { + await restoreSnapshot() + }) + + it("should revert", async () => { + await expect( + walletCoordinator.connect(thirdParty).submitRedemptionProposal({ + walletPubKeyHash, + redeemersOutputScripts: [ + "0x1976a9142cd680318747b720d67bf4246eb7403b476adb3488ac", + "0x160014e6f9d74726b19b75f16fe1e9feaec048aa4fa1d0", + ], + redemptionTxFee: 5000, + }) + ).to.be.revertedWith("Wallet locked") + }) + }) + + context("when wallet is not time-locked", () => { + let tx: ContractTransaction + + before(async () => { + await createSnapshot() + + // Submit a proposal to set a wallet time lock. + await walletCoordinator.connect(thirdParty).submitRedemptionProposal({ + walletPubKeyHash, + redeemersOutputScripts: [ + "0x1976a9142cd680318747b720d67bf4246eb7403b476adb3488ac", + "0x160014e6f9d74726b19b75f16fe1e9feaec048aa4fa1d0", + ], + redemptionTxFee: 5000, + }) + + // Jump beyond the lock period. + await increaseTime( + await walletCoordinator.redemptionProposalValidity() + ) + + tx = await walletCoordinator + .connect(thirdParty) + .submitRedemptionProposal({ + walletPubKeyHash, + redeemersOutputScripts: [ + "0x1976a9142cd680318747b720d67bf4246eb7403b476adb3488ac", + "0x160014e6f9d74726b19b75f16fe1e9feaec048aa4fa1d0", + ], + redemptionTxFee: 6000, + }) + }) + + after(async () => { + await restoreSnapshot() + }) + + it("should time-lock the wallet", async () => { + const lockedUntil = + (await lastBlockTime()) + + (await walletCoordinator.redemptionProposalValidity()) + + const walletLock = await walletCoordinator.walletLock( + walletPubKeyHash + ) + + expect(walletLock.expiresAt).to.be.equal(lockedUntil) + expect(walletLock.cause).to.be.equal(walletAction.Redemption) + }) + + it("should emit the RedemptionProposalSubmitted event", async () => { + await expect(tx).to.emit( + walletCoordinator, + "RedemptionProposalSubmitted" + ) + + // The `expect.to.emit.withArgs` assertion has troubles with + // matching complex event arguments as it uses strict equality + // underneath. To overcome that problem, we manually get event's + // arguments and check it against the expected ones using deep + // equality assertion (eql). + const receipt = await ethers.provider.getTransactionReceipt(tx.hash) + expect(receipt.logs.length).to.be.equal(1) + expect( + walletCoordinator.interface.parseLog(receipt.logs[0]).args + ).to.be.eql([ + [ + walletPubKeyHash, + [ + "0x1976a9142cd680318747b720d67bf4246eb7403b476adb3488ac", + "0x160014e6f9d74726b19b75f16fe1e9feaec048aa4fa1d0", + ], + BigNumber.from(6000), + ], + thirdParty.address, + ]) + }) + }) + }) + }) + + describe("submitRedemptionProposalWithReimbursement", () => { + const walletPubKeyHash = "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726" + + before(async () => { + await createSnapshot() + }) + + after(async () => { + await restoreSnapshot() + }) + + // Just double check that `submitRedemptionProposalWithReimbursement` has + // the same ACL as `submitRedemptionProposal`. + context("when the caller is not a coordinator", () => { + before(async () => { + await createSnapshot() + }) + + after(async () => { + await restoreSnapshot() + }) + + it("should revert", async () => { + const tx = walletCoordinator + .connect(thirdParty) + .submitRedemptionProposalWithReimbursement({ + walletPubKeyHash, + redeemersOutputScripts: [ + "0x1976a9142cd680318747b720d67bf4246eb7403b476adb3488ac", + "0x160014e6f9d74726b19b75f16fe1e9feaec048aa4fa1d0", + ], + redemptionTxFee: 5000, + }) + + await expect(tx).to.be.revertedWith("Caller is not a coordinator") + }) + }) + + // Here we just check that the reimbursement works. Detailed + // assertions are already done within the scenario stressing the + // `submitRedemptionProposal` function. + context("when the caller is a coordinator", () => { + let coordinatorBalanceBefore: BigNumber + let coordinatorBalanceAfter: BigNumber + + before(async () => { + await createSnapshot() + + await walletCoordinator + .connect(owner) + .addCoordinator(thirdParty.address) + + // The first-ever proposal will be more expensive given it has to set + // fields to non-zero values. We shouldn't adjust gas offset based on it. + await walletCoordinator + .connect(thirdParty) + .submitRedemptionProposalWithReimbursement({ + walletPubKeyHash, + redeemersOutputScripts: [ + "0x1976a9142cd680318747b720d67bf4246eb7403b476adb3488ac", + "0x160014e6f9d74726b19b75f16fe1e9feaec048aa4fa1d0", + ], + redemptionTxFee: 5000, + }) + + // Jump beyond the lock period. + await increaseTime(await walletCoordinator.redemptionProposalValidity()) + + coordinatorBalanceBefore = await provider.getBalance(thirdParty.address) + + await walletCoordinator + .connect(thirdParty) + .submitRedemptionProposalWithReimbursement({ + walletPubKeyHash, + redeemersOutputScripts: [ + "0x1976a9142cd680318747b720d67bf4246eb7403b476adb3488ac", + "0x160014e6f9d74726b19b75f16fe1e9feaec048aa4fa1d0", + ], + redemptionTxFee: 5000, + }) + + coordinatorBalanceAfter = await provider.getBalance(thirdParty.address) + }) + + after(async () => { + await restoreSnapshot() + }) + + it("should do the refund", async () => { + const diff = coordinatorBalanceAfter.sub(coordinatorBalanceBefore) + expect(diff).to.be.gt(0) + expect(diff).to.be.lt(ethers.utils.parseUnits("4000000", "gwei")) // 0,004 ETH + }) + }) + }) + + describe("validateRedemptionProposal", () => { + const walletPubKeyHash = "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726" + const ecdsaWalletID = + "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863" + + const bridgeRedemptionTxMaxTotalFee = 10000 + const bridgeRedemptionTimeout = 5 * 86400 // 5 days + + before(async () => { + await createSnapshot() + + bridge.redemptionParameters.returns([ + 0, + 0, + 0, + bridgeRedemptionTxMaxTotalFee, + bridgeRedemptionTimeout, + 0, + 0, + ]) + }) + + after(async () => { + bridge.redemptionParameters.reset() + + await restoreSnapshot() + }) + + context("when wallet is not Live", () => { + const testData = [ + { + testName: "when wallet state is Unknown", + walletState: walletState.Unknown, + }, + { + testName: "when wallet state is MovingFunds", + walletState: walletState.MovingFunds, + }, + { + testName: "when wallet state is Closing", + walletState: walletState.Closing, + }, + { + testName: "when wallet state is Closed", + walletState: walletState.Closed, + }, + { + testName: "when wallet state is Terminated", + walletState: walletState.Terminated, + }, + ] + + testData.forEach((test) => { + context(test.testName, () => { + before(async () => { + await createSnapshot() + + bridge.wallets.whenCalledWith(walletPubKeyHash).returns({ + ecdsaWalletID, + mainUtxoHash: HashZero, + pendingRedemptionsValue: 0, + createdAt: 0, + movingFundsRequestedAt: 0, + closingStartedAt: 0, + pendingMovedFundsSweepRequestsCount: 0, + state: test.walletState, + movingFundsTargetWalletsCommitmentHash: HashZero, + }) + }) + + after(async () => { + bridge.wallets.reset() + + await restoreSnapshot() + }) + + it("should revert", async () => { + await expect( + // Only walletPubKeyHash argument is relevant in this scenario. + walletCoordinator.validateRedemptionProposal({ + walletPubKeyHash, + redeemersOutputScripts: [], + redemptionTxFee: 0, + }) + ).to.be.revertedWith("Wallet is not in Live state") + }) + }) + }) + }) + + context("when wallet is Live", () => { + before(async () => { + await createSnapshot() + + bridge.wallets.whenCalledWith(walletPubKeyHash).returns({ + ecdsaWalletID, + mainUtxoHash: HashZero, + pendingRedemptionsValue: 0, + createdAt: 0, + movingFundsRequestedAt: 0, + closingStartedAt: 0, + pendingMovedFundsSweepRequestsCount: 0, + state: walletState.Live, + movingFundsTargetWalletsCommitmentHash: HashZero, + }) + }) + + after(async () => { + bridge.wallets.reset() + + await restoreSnapshot() + }) + + context("when redemption is below the min size", () => { + it("should revert", async () => { + await expect( + walletCoordinator.validateRedemptionProposal({ + walletPubKeyHash, + redeemersOutputScripts: [], // Set size to 0. + redemptionTxFee: 0, // Not relevant in this scenario. + }) + ).to.be.revertedWith("Redemption below the min size") + }) + }) + + context("when redemption is above the min size", () => { + context("when redemption exceeds the max size", () => { + it("should revert", async () => { + const maxSize = await walletCoordinator.redemptionMaxSize() + + // Pick more redemption requests than allowed. + const redeemersOutputScripts = new Array(maxSize + 1).fill( + createTestRedemptionRequest(walletPubKeyHash).key + .redeemerOutputScript + ) + + await expect( + walletCoordinator.validateRedemptionProposal({ + walletPubKeyHash, + redeemersOutputScripts, + redemptionTxFee: 0, // Not relevant in this scenario. + }) + ).to.be.revertedWith("Redemption exceeds the max size") + }) + }) + + context("when redemption does not exceed the max size", () => { + context("when proposed redemption tx fee is invalid", () => { + context("when proposed redemption tx fee is zero", () => { + it("should revert", async () => { + await expect( + walletCoordinator.validateRedemptionProposal({ + walletPubKeyHash, + redeemersOutputScripts: [ + createTestRedemptionRequest(walletPubKeyHash).key + .redeemerOutputScript, + ], + redemptionTxFee: 0, + }) + ).to.be.revertedWith("Proposed transaction fee cannot be zero") + }) + }) + + context( + "when proposed redemption tx fee is greater than the allowed total fee", + () => { + it("should revert", async () => { + await expect( + walletCoordinator.validateRedemptionProposal({ + walletPubKeyHash, + redeemersOutputScripts: [ + createTestRedemptionRequest(walletPubKeyHash).key + .redeemerOutputScript, + ], + // Exceed the max per-request fee by one. + redemptionTxFee: bridgeRedemptionTxMaxTotalFee + 1, + }) + ).to.be.revertedWith("Proposed transaction fee is too high") + }) + } + ) + + // The context block covering the per-redemption fee checks is + // declared at the end of the `validateRedemptionProposal` test suite + // due to the actual order of checks performed by this function. + // See: "when there is a request that incurs an unacceptable tx fee share" + }) + + context("when proposed redemption tx fee is valid", () => { + const redemptionTxFee = 9000 + + context("when there is a non-pending request", () => { + let requestOne + let requestTwo + + before(async () => { + await createSnapshot() + + requestOne = createTestRedemptionRequest( + walletPubKeyHash, + 5000 // necessary to pass the fee share validation + ) + requestTwo = createTestRedemptionRequest(walletPubKeyHash) + + // Request one is a proper one. + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestOne.key.walletPubKeyHash, + requestOne.key.redeemerOutputScript + ) + ) + .returns(requestOne.content) + + // Simulate the request two is non-pending. + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestTwo.key.walletPubKeyHash, + requestTwo.key.redeemerOutputScript + ) + ) + .returns({ + ...requestTwo.content, + requestedAt: 0, + }) + }) + + after(async () => { + bridge.pendingRedemptions.reset() + + await restoreSnapshot() + }) + + it("should revert", async () => { + const proposal = { + walletPubKeyHash, + redeemersOutputScripts: [ + requestOne.key.redeemerOutputScript, + requestTwo.key.redeemerOutputScript, + ], + redemptionTxFee, + } + + await expect( + walletCoordinator.validateRedemptionProposal(proposal) + ).to.be.revertedWith("Not a pending redemption request") + }) + }) + + context("when all requests are pending", () => { + context("when there is an immature request", () => { + let requestOne + let requestTwo + + before(async () => { + await createSnapshot() + + requestOne = createTestRedemptionRequest( + walletPubKeyHash, + 5000 // necessary to pass the fee share validation + ) + requestTwo = createTestRedemptionRequest(walletPubKeyHash) + + // Request one is a proper one. + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestOne.key.walletPubKeyHash, + requestOne.key.redeemerOutputScript + ) + ) + .returns(requestOne.content) + + // Simulate the request two has just been created thus not + // achieved the min age yet. + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestTwo.key.walletPubKeyHash, + requestTwo.key.redeemerOutputScript + ) + ) + .returns({ + ...requestTwo.content, + requestedAt: await lastBlockTime(), + }) + }) + + after(async () => { + bridge.pendingRedemptions.reset() + + await restoreSnapshot() + }) + + it("should revert", async () => { + const proposal = { + walletPubKeyHash, + redeemersOutputScripts: [ + requestOne.key.redeemerOutputScript, + requestTwo.key.redeemerOutputScript, + ], + redemptionTxFee, + } + + await expect( + walletCoordinator.validateRedemptionProposal(proposal) + ).to.be.revertedWith( + "Redemption request min age not achieved yet" + ) + }) + }) + + context("when all requests achieved the min age", () => { + context( + "when there is a request that violates the timeout safety margin", + () => { + let requestOne + let requestTwo + + before(async () => { + await createSnapshot() - before(async () => { - await createSnapshot() + // Request one is a proper one. + requestOne = createTestRedemptionRequest( + walletPubKeyHash, + 5000 // necessary to pass the fee share validation + ) - depositOne = createTestDeposit( - walletPubKeyHash, - vault, - true - ) + // Simulate that request two violates the timeout safety margin. + // In order to do so, we need to use `createTestRedemptionRequest` + // with a custom request creation time that will produce + // a timeout timestamp being closer to the current + // moment than allowed by the refund safety margin. + const safetyMarginViolatedAt = await lastBlockTime() + const requestTimedOutAt = + safetyMarginViolatedAt + + (await walletCoordinator.redemptionRequestTimeoutSafetyMargin()) + const requestCreatedAt = + requestTimedOutAt - bridgeRedemptionTimeout + + requestTwo = createTestRedemptionRequest( + walletPubKeyHash, + 0, + requestCreatedAt + ) - depositTwo = createTestDeposit( - walletPubKeyHash, - vault, - false - ) + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestOne.key.walletPubKeyHash, + requestOne.key.redeemerOutputScript + ) + ) + .returns(requestOne.content) - bridge.deposits - .whenCalledWith( - depositKey( - depositOne.key.fundingTxHash, - depositOne.key.fundingOutputIndex - ) - ) - .returns(depositOne.request) + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestTwo.key.walletPubKeyHash, + requestTwo.key.redeemerOutputScript + ) + ) + .returns(requestTwo.content) + }) - bridge.deposits - .whenCalledWith( - depositKey( - depositTwo.key.fundingTxHash, - depositTwo.key.fundingOutputIndex - ) - ) - .returns(depositTwo.request) - }) + after(async () => { + bridge.pendingRedemptions.reset() - after(async () => { - bridge.deposits.reset() + await restoreSnapshot() + }) - await restoreSnapshot() - }) + it("should revert", async () => { + const proposal = { + walletPubKeyHash, + redeemersOutputScripts: [ + requestOne.key.redeemerOutputScript, + requestTwo.key.redeemerOutputScript, + ], + redemptionTxFee, + } - it("should succeed", async () => { - const proposal = { - walletPubKeyHash, - depositsKeys: [ - depositOne.key, - depositTwo.key, - ], - sweepTxFee, - depositsRevealBlocks: [], // Not relevant in this scenario. - } + await expect( + walletCoordinator.validateRedemptionProposal(proposal) + ).to.be.revertedWith( + "Redemption request timeout safety margin is not preserved" + ) + }) + } + ) - const depositsExtraInfo = [ - depositOne.extraInfo, - depositTwo.extraInfo, - ] + context( + "when all requests preserve the timeout safety margin", + () => { + context( + "when there is a request that incurs an unacceptable tx fee share", + () => { + context("when there is no fee remainder", () => { + let requestOne + let requestTwo - const result = - await walletCoordinator.validateDepositSweepProposal( - proposal, - depositsExtraInfo - ) + before(async () => { + await createSnapshot() - // eslint-disable-next-line @typescript-eslint/no-unused-expressions - expect(result).to.be.true - }) - } + // Request one is a proper one. + requestOne = createTestRedemptionRequest( + walletPubKeyHash, + 4500 // necessary to pass the fee share validation + ) + + // Simulate that request two takes an unacceptable + // tx fee share. Because redemptionTxFee used + // in the proposal is 9000, the actual fee share + // per-request is 4500. In order to test this case + // the second request must allow for 4499 as allowed + // fee share at maximum. + requestTwo = createTestRedemptionRequest( + walletPubKeyHash, + 4499 + ) + + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestOne.key.walletPubKeyHash, + requestOne.key.redeemerOutputScript + ) ) + .returns(requestOne.content) + + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestTwo.key.walletPubKeyHash, + requestTwo.key.redeemerOutputScript + ) + ) + .returns(requestTwo.content) + }) + + after(async () => { + bridge.pendingRedemptions.reset() + + await restoreSnapshot() + }) + + it("should revert", async () => { + const proposal = { + walletPubKeyHash, + redeemersOutputScripts: [ + requestOne.key.redeemerOutputScript, + requestTwo.key.redeemerOutputScript, + ], + redemptionTxFee, } - ) - } - ) - }) - }) - }) + + await expect( + walletCoordinator.validateRedemptionProposal( + proposal + ) + ).to.be.revertedWith( + "Proposed transaction per-request fee share is too high" + ) + }) + }) + + context("when there is a fee remainder", () => { + let requestOne + let requestTwo + + before(async () => { + await createSnapshot() + + // Request one is a proper one. + requestOne = createTestRedemptionRequest( + walletPubKeyHash, + 4500 // necessary to pass the fee share validation + ) + + // Simulate that request two takes an unacceptable + // tx fee share. Because redemptionTxFee used + // in the proposal is 9001, the actual fee share + // per-request is 4500 and 4501 for the last request + // which takes the remainder. In order to test this + // case the second (last) request must allow for + // 4500 as allowed fee share at maximum. + requestTwo = createTestRedemptionRequest( + walletPubKeyHash, + 4500 + ) + + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestOne.key.walletPubKeyHash, + requestOne.key.redeemerOutputScript + ) + ) + .returns(requestOne.content) + + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestTwo.key.walletPubKeyHash, + requestTwo.key.redeemerOutputScript + ) + ) + .returns(requestTwo.content) + }) + + after(async () => { + bridge.pendingRedemptions.reset() + + await restoreSnapshot() + }) + + it("should revert", async () => { + const proposal = { + walletPubKeyHash, + redeemersOutputScripts: [ + requestOne.key.redeemerOutputScript, + requestTwo.key.redeemerOutputScript, + ], + redemptionTxFee: 9001, + } + + await expect( + walletCoordinator.validateRedemptionProposal( + proposal + ) + ).to.be.revertedWith( + "Proposed transaction per-request fee share is too high" + ) + }) + }) + } + ) + + context( + "when all requests incur an acceptable tx fee share", + () => { + context("when there are duplicated requests", () => { + let requestOne + let requestTwo + let requestThree + + before(async () => { + await createSnapshot() + + requestOne = createTestRedemptionRequest( + walletPubKeyHash, + 2500 // necessary to pass the fee share validation + ) + + requestTwo = createTestRedemptionRequest( + walletPubKeyHash, + 2500 // necessary to pass the fee share validation + ) + + requestThree = createTestRedemptionRequest( + walletPubKeyHash, + 2500 // necessary to pass the fee share validation + ) + + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestOne.key.walletPubKeyHash, + requestOne.key.redeemerOutputScript + ) + ) + .returns(requestOne.content) + + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestTwo.key.walletPubKeyHash, + requestTwo.key.redeemerOutputScript + ) + ) + .returns(requestTwo.content) + + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestThree.key.walletPubKeyHash, + requestThree.key.redeemerOutputScript + ) + ) + .returns(requestThree.content) + }) + + after(async () => { + bridge.pendingRedemptions.reset() + + await restoreSnapshot() + }) + + it("should revert", async () => { + const proposal = { + walletPubKeyHash, + redeemersOutputScripts: [ + requestOne.key.redeemerOutputScript, + requestTwo.key.redeemerOutputScript, + requestThree.key.redeemerOutputScript, + requestTwo.key.redeemerOutputScript, // duplicate + ], + redemptionTxFee, + } + + await expect( + walletCoordinator.validateRedemptionProposal( + proposal + ) + ).to.be.revertedWith("Duplicated request") + }) + }) + + context("when all requests are unique", () => { + let requestOne + let requestTwo + + before(async () => { + await createSnapshot() + + requestOne = createTestRedemptionRequest( + walletPubKeyHash, + 5000 // necessary to pass the fee share validation + ) + + requestTwo = createTestRedemptionRequest( + walletPubKeyHash, + 5000 // necessary to pass the fee share validation + ) + + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestOne.key.walletPubKeyHash, + requestOne.key.redeemerOutputScript + ) + ) + .returns(requestOne.content) + + bridge.pendingRedemptions + .whenCalledWith( + redemptionKey( + requestTwo.key.walletPubKeyHash, + requestTwo.key.redeemerOutputScript + ) + ) + .returns(requestTwo.content) + }) + + after(async () => { + bridge.pendingRedemptions.reset() + + await restoreSnapshot() + }) + + it("should succeed", async () => { + const proposal = { + walletPubKeyHash, + redeemersOutputScripts: [ + requestOne.key.redeemerOutputScript, + requestTwo.key.redeemerOutputScript, + ], + redemptionTxFee, + } + + const result = + await walletCoordinator.validateRedemptionProposal( + proposal + ) + + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + expect(result).to.be.true + }) + }) + } + ) + } + ) }) }) }) @@ -2142,3 +3255,51 @@ const createTestDeposit = ( }, } } + +const redemptionKey = ( + walletPubKeyHash: BytesLike, + redeemerOutputScript: BytesLike +) => { + const scriptHash = ethers.utils.solidityKeccak256( + ["bytes"], + [redeemerOutputScript] + ) + + return ethers.utils.solidityKeccak256( + ["bytes32", "bytes20"], + [scriptHash, walletPubKeyHash] + ) +} + +const createTestRedemptionRequest = ( + walletPubKeyHash: string, + txMaxFee?: BigNumberish, + requestedAt?: number +) => { + let resolvedRequestedAt = requestedAt + + if (!resolvedRequestedAt) { + // If the request creation time is not explicitly set, use `now - 1 day` to + // ensure request minimum age is achieved by default. + const now = Math.floor(Date.now() / 1000) + resolvedRequestedAt = now - day + } + + const redeemer = `0x${crypto.randomBytes(20).toString("hex")}` + + const redeemerOutputScript = `0x${crypto.randomBytes(32).toString("hex")}` + + return { + key: { + walletPubKeyHash, + redeemerOutputScript, + }, + content: { + redeemer, + requestedAmount: 0, // not relevant + treasuryFee: 0, // not relevant + txMaxFee: txMaxFee ?? 0, + requestedAt: resolvedRequestedAt, + }, + } +} diff --git a/solidity/yarn.lock b/solidity/yarn.lock index 12ee0b65f..9722617f2 100644 --- a/solidity/yarn.lock +++ b/solidity/yarn.lock @@ -1595,26 +1595,21 @@ integrity sha512-KlpY9BbasyLvYXSS7dsJktgRChu/yjdFLOX8ldGA/pltLicCm/l0F4oqxL8wSws9XD12vq9x0B5qzPygVLB2TQ== "@keep-network/ecdsa@development": - version "2.1.0-dev.0" - resolved "https://registry.yarnpkg.com/@keep-network/ecdsa/-/ecdsa-2.1.0-dev.0.tgz#3af765c1dceb9d8d3f191c1a44dadc956f22ae01" - integrity sha512-6qlWnOhVfMnItcfLfyWUvdlQ6P9hmWa9T1OModZP0i1drxSKeINTrBq50u8Z6hrORs/J2anPLuNW10tpdNIT0Q== + version "2.1.0-dev.11" + resolved "https://registry.yarnpkg.com/@keep-network/ecdsa/-/ecdsa-2.1.0-dev.11.tgz#c25fa6cfebe1ca7964329b54c44526a782391234" + integrity sha512-5tTJr9UyW+H0HnV3bu8MkKcy+K9Gi6gaHZ+1WK8LQvba/T38ay//9Gg6dZWmhPT9mKIlW4s0zjOYkjQwq7W7fw== dependencies: - "@keep-network/random-beacon" "2.0.0-dev.78" + "@keep-network/random-beacon" "2.1.0-dev.10" "@keep-network/sortition-pools" "^2.0.0-pre.16" "@openzeppelin/contracts" "^4.6.0" "@openzeppelin/contracts-upgradeable" "^4.6.0" - "@threshold-network/solidity-contracts" "1.3.0-dev.0" + "@threshold-network/solidity-contracts" "1.3.0-dev.5" "@keep-network/hardhat-helpers@0.6.0-pre.18": version "0.6.0-pre.18" resolved "https://registry.yarnpkg.com/@keep-network/hardhat-helpers/-/hardhat-helpers-0.6.0-pre.18.tgz#1c962af23714920c8eeae9b13a8e0e8681e5440b" integrity sha512-9jF3ypoW8qqVl+hZmGgVVfLYNAjgUZrM+jOGYs69QHKPU2RFgx4v+wIvm02GnEtZbX4FGj5itb84QQY7EOssUA== -"@keep-network/hardhat-helpers@^0.6.0-pre.15": - version "0.6.0-pre.17" - resolved "https://registry.yarnpkg.com/@keep-network/hardhat-helpers/-/hardhat-helpers-0.6.0-pre.17.tgz#de085c8f5d684cc7e4ae793fdc6c104a09fd03ce" - integrity sha512-G3Jp+I77po8e4moOrUY/wQCRYGt/g1aBoDjL2cbxMkAWFFrb9OBu1a5Vi5eOwO4ttWthN5c9vZKWJicR6kwOLg== - "@keep-network/hardhat-local-networks-config@^0.1.0-pre.4": version "0.1.0-pre.4" resolved "https://registry.yarnpkg.com/@keep-network/hardhat-local-networks-config/-/hardhat-local-networks-config-0.1.0-pre.4.tgz#cc0c8ac1f5e30f33378e7451f696ab17d504ab86" @@ -1649,26 +1644,15 @@ "@openzeppelin/upgrades" "^2.7.2" openzeppelin-solidity "2.3.0" -"@keep-network/random-beacon@2.0.0-dev.78": - version "2.0.0-dev.78" - resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.0.0-dev.78.tgz#d38f77d8a14e4d9cb0d59cf6532527160406f22a" - integrity sha512-t1Jxaps0bcSQxS50T4IGPAPmTN68AsZ+WfumVPW90PhP1yISBWU1VRuM/kUIUCilC0ng0FYB939FexnFcyy0pg== +"@keep-network/random-beacon@2.1.0-dev.10", "@keep-network/random-beacon@development": + version "2.1.0-dev.10" + resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.1.0-dev.10.tgz#61c9d3e98257f40292264f4b9e1991acdc11f3c3" + integrity sha512-NJtmjrzFimL20bul6g8lKxUPNc+lpiu9BJ3uheJOCWDL5vQ+hJGctmWqd63mvtjgO8Ks9IQsDg9wpValzSzGXg== dependencies: - "@keep-network/hardhat-helpers" "^0.6.0-pre.15" "@keep-network/sortition-pools" "^2.0.0-pre.16" "@openzeppelin/contracts" "^4.6.0" "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - "@threshold-network/solidity-contracts" "1.2.0-dev.24" - -"@keep-network/random-beacon@development": - version "2.1.0-dev.0" - resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.1.0-dev.0.tgz#b74dd3297ec89def2370c73d59410ed9fb4e9292" - integrity sha512-B+uAzt62yKBSzeEe+4l4zwQzLTwWCp3HRUinWyuDyHmfJlRhYMKo9UBB3+l/Oxotr6JUgMAQpLIOwvAtcSS+2Q== - dependencies: - "@keep-network/sortition-pools" "^2.0.0-pre.16" - "@openzeppelin/contracts" "^4.6.0" - "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - "@threshold-network/solidity-contracts" "1.3.0-dev.0" + "@threshold-network/solidity-contracts" "1.3.0-dev.5" "@keep-network/sortition-pools@1.2.0-dev.1": version "1.2.0-dev.1" @@ -2014,9 +1998,9 @@ "@types/web3" "1.0.19" "@openzeppelin/contracts-upgradeable@^4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.6.0.tgz#1bf55f230f008554d4c6fe25eb165b85112108b0" - integrity sha512-5OnVuO4HlkjSCJO165a4i2Pu1zQGzMs//o54LPrwUgxvEO2P3ax1QuaSI0cEHHTveA77guS0PnNugpR2JMsPfA== + version "4.9.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.1.tgz#03e33b8059ce43884995e69e4479f5a7f084b404" + integrity sha512-UZf5/VdaBA/0kxF7/gg+2UrC8k+fbgiUM0Qw1apAhwpBWBxULbsHw0ZRMgT53nd6N8hr53XFjhcWNeTRGIiCVw== "@openzeppelin/contracts-upgradeable@^4.8.1": version "4.8.1" @@ -2038,15 +2022,10 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.2.0.tgz#260d921d99356e48013d9d760caaa6cea35dc642" integrity sha512-LD4NnkKpHHSMo5z9MvFsG4g1xxZUDqV3A3Futu3nvyfs4wPwXxqOgMaxOoa2PeyGL2VNeSlbxT54enbQzGcgJQ== -"@openzeppelin/contracts@^4.3.2": - version "4.7.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.7.3.tgz#939534757a81f8d69cc854c7692805684ff3111e" - integrity sha512-dGRS0agJzu8ybo44pCIf3xBaPQN/65AIXNgK8+4gzKd5kbvlqyxryUYVLJv7fK98Seyd2hDZzVEHSWAh0Bt1Yw== - -"@openzeppelin/contracts@^4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.6.0.tgz#c91cf64bc27f573836dba4122758b4743418c1b3" - integrity sha512-8vi4d50NNya/bQqCmaVzvHNmwHvS0OBKb7HNtuNwEE3scXWrP31fKQoGxNMT+KbzmrNZzatE3QK5p2gFONI/hg== +"@openzeppelin/contracts@^4.3.2", "@openzeppelin/contracts@^4.6.0": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.1.tgz#afa804d2c68398704b0175acc94d91a54f203645" + integrity sha512-aLDTLu/If1qYIFW5g4ZibuQaUsFGWQPBq1mZKp/txaebUnGHDmmiBhRLY1tDNedN0m+fJtKZ1zAODS9Yk+V6uA== "@openzeppelin/contracts@^4.8.1": version "4.8.1" @@ -2398,20 +2377,10 @@ dependencies: "@openzeppelin/contracts" "^4.1.0" -"@threshold-network/solidity-contracts@1.2.0-dev.24": - version "1.2.0-dev.24" - resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.2.0-dev.24.tgz#a6ec0d22bebd0829a70663bc72a6a49713b6fec8" - integrity sha512-lNNrsTDhOyqZNNfJ/1lffcCTRoV5CepTvHQWlsIQS5ku/QYFU8MldfRxITNbJSkySYdBA9VGSyiGYM3zSyJAOg== - dependencies: - "@keep-network/keep-core" ">1.8.1-dev <1.8.1-goerli" - "@openzeppelin/contracts" "~4.5.0" - "@openzeppelin/contracts-upgradeable" "~4.5.2" - "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - -"@threshold-network/solidity-contracts@1.3.0-dev.0": - version "1.3.0-dev.0" - resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.3.0-dev.0.tgz#0b954fe1621ea847d1fb843dc9525183ca095045" - integrity sha512-rEj1wxH9CK/1bWgLYKGKJGqfZHgCdw4udJ2nZIPFb7l2t2ox5UhsOv+1CD4jnHOBqFS7ooDgHWm2S8m+J17img== +"@threshold-network/solidity-contracts@1.3.0-dev.5": + version "1.3.0-dev.5" + resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.3.0-dev.5.tgz#f7a2727d627a10218f0667bc0d33e19ed8f87fdc" + integrity sha512-AInTKQkJ0PKa32q2m8GnZFPYEArsnvOwhIFdBFaHdq9r4EGyqHMf4YY1WjffkheBZ7AQ0DNA8Lst30kBoQd0SA== dependencies: "@keep-network/keep-core" ">1.8.1-dev <1.8.1-goerli" "@openzeppelin/contracts" "~4.5.0" @@ -2780,9 +2749,9 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" -"@umpirsky/country-list@git+https://github.com/umpirsky/country-list#05fda51": +"@umpirsky/country-list@git://github.com/umpirsky/country-list#05fda51": version "1.0.0" - resolved "git+https://github.com/umpirsky/country-list#05fda51cd97b3294e8175ffed06104c44b3c71d7" + resolved "git://github.com/umpirsky/country-list#05fda51cd97b3294e8175ffed06104c44b3c71d7" "@web3-js/scrypt-shim@^0.1.0": version "0.1.0" diff --git a/typescript/yarn.lock b/typescript/yarn.lock index 2378ac9e1..561d0069a 100644 --- a/typescript/yarn.lock +++ b/typescript/yarn.lock @@ -406,21 +406,6 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.0" -"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" - integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/abstract-provider@5.5.1", "@ethersproject/abstract-provider@^5.5.0": version "5.5.1" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.5.1.tgz#2f1f6e8a3ab7d378d8ad0b5718460f85649710c5" @@ -447,7 +432,7 @@ "@ethersproject/transactions" "^5.6.0" "@ethersproject/web" "^5.6.0" -"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": +"@ethersproject/abstract-provider@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== @@ -493,7 +478,7 @@ "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" -"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": +"@ethersproject/abstract-signer@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== @@ -526,7 +511,7 @@ "@ethersproject/logger" "^5.6.0" "@ethersproject/rlp" "^5.6.0" -"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": +"@ethersproject/address@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== @@ -551,7 +536,7 @@ dependencies: "@ethersproject/bytes" "^5.6.0" -"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": +"@ethersproject/base64@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== @@ -574,7 +559,7 @@ "@ethersproject/bytes" "^5.6.0" "@ethersproject/properties" "^5.6.0" -"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": +"@ethersproject/basex@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== @@ -609,7 +594,7 @@ "@ethersproject/logger" "^5.6.0" bn.js "^4.11.9" -"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.6.2", "@ethersproject/bignumber@^5.7.0": +"@ethersproject/bignumber@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== @@ -632,7 +617,7 @@ dependencies: "@ethersproject/logger" "^5.6.0" -"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": +"@ethersproject/bytes@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== @@ -653,7 +638,7 @@ dependencies: "@ethersproject/bignumber" "^5.6.0" -"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": +"@ethersproject/constants@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== @@ -708,22 +693,6 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/transactions" "^5.6.0" -"@ethersproject/contracts@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" - integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== - dependencies: - "@ethersproject/abi" "^5.7.0" - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/hash@5.5.0", "@ethersproject/hash@^5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.5.0.tgz#7cee76d08f88d1873574c849e0207dcb32380cc9" @@ -752,7 +721,7 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.0" -"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": +"@ethersproject/hash@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== @@ -821,24 +790,6 @@ "@ethersproject/transactions" "^5.6.0" "@ethersproject/wordlists" "^5.6.0" -"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" - integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/basex" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/pbkdf2" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wordlists" "^5.7.0" - "@ethersproject/json-wallets@5.5.0", "@ethersproject/json-wallets@^5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.5.0.tgz#dd522d4297e15bccc8e1427d247ec8376b60e325" @@ -877,25 +828,6 @@ aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" - integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hdnode" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/pbkdf2" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - aes-js "3.0.0" - scrypt-js "3.0.1" - "@ethersproject/keccak256@5.5.0", "@ethersproject/keccak256@^5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.5.0.tgz#e4b1f9d7701da87c564ffe336f86dcee82983492" @@ -912,7 +844,7 @@ "@ethersproject/bytes" "^5.6.0" js-sha3 "0.8.0" -"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": +"@ethersproject/keccak256@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== @@ -930,7 +862,7 @@ resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== -"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": +"@ethersproject/logger@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== @@ -956,7 +888,7 @@ dependencies: "@ethersproject/logger" "^5.6.0" -"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": +"@ethersproject/networks@^5.7.0": version "5.7.1" resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== @@ -979,14 +911,6 @@ "@ethersproject/bytes" "^5.6.0" "@ethersproject/sha2" "^5.6.0" -"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" - integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/properties@5.5.0", "@ethersproject/properties@^5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.5.0.tgz#61f00f2bb83376d2071baab02245f92070c59995" @@ -1001,7 +925,7 @@ dependencies: "@ethersproject/logger" "^5.6.0" -"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": +"@ethersproject/properties@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== @@ -1083,32 +1007,6 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.2": - version "5.7.2" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" - integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/base64" "^5.7.0" - "@ethersproject/basex" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/networks" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/web" "^5.7.0" - bech32 "1.1.4" - ws "7.4.6" - "@ethersproject/providers@^5.6.2": version "5.6.7" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.7.tgz#1f88ec94febb79a90e33f7e0100354878fb4dabe" @@ -1135,6 +1033,32 @@ bech32 "1.1.4" ws "7.4.6" +"@ethersproject/providers@^5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" + integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + bech32 "1.1.4" + ws "7.4.6" + "@ethersproject/random@5.5.0", "@ethersproject/random@^5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.5.0.tgz#305ed9e033ca537735365ac12eed88580b0f81f9" @@ -1151,7 +1075,7 @@ "@ethersproject/bytes" "^5.6.0" "@ethersproject/logger" "^5.6.0" -"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": +"@ethersproject/random@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== @@ -1175,7 +1099,7 @@ "@ethersproject/bytes" "^5.6.0" "@ethersproject/logger" "^5.6.0" -"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": +"@ethersproject/rlp@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== @@ -1201,7 +1125,7 @@ "@ethersproject/logger" "^5.6.0" hash.js "1.1.7" -"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": +"@ethersproject/sha2@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== @@ -1246,7 +1170,7 @@ elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": +"@ethersproject/signing-key@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== @@ -1282,18 +1206,6 @@ "@ethersproject/sha2" "^5.6.0" "@ethersproject/strings" "^5.6.0" -"@ethersproject/solidity@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" - integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/strings@5.5.0", "@ethersproject/strings@^5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.5.0.tgz#e6784d00ec6c57710755699003bc747e98c5d549" @@ -1312,7 +1224,7 @@ "@ethersproject/constants" "^5.6.0" "@ethersproject/logger" "^5.6.0" -"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": +"@ethersproject/strings@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== @@ -1351,7 +1263,7 @@ "@ethersproject/rlp" "^5.6.0" "@ethersproject/signing-key" "^5.6.0" -"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.7.0": +"@ethersproject/transactions@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== @@ -1384,15 +1296,6 @@ "@ethersproject/constants" "^5.6.0" "@ethersproject/logger" "^5.6.0" -"@ethersproject/units@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" - integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/wallet@5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.5.0.tgz#322a10527a440ece593980dca6182f17d54eae75" @@ -1456,27 +1359,6 @@ "@ethersproject/transactions" "^5.6.0" "@ethersproject/wordlists" "^5.6.0" -"@ethersproject/wallet@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" - integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/hdnode" "^5.7.0" - "@ethersproject/json-wallets" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wordlists" "^5.7.0" - "@ethersproject/web@5.5.1", "@ethersproject/web@^5.5.0": version "5.5.1" resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.5.1.tgz#cfcc4a074a6936c657878ac58917a61341681316" @@ -1499,7 +1381,7 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.0" -"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": +"@ethersproject/web@^5.7.0": version "5.7.1" resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== @@ -1532,17 +1414,6 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.0" -"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" - integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ganache/ethereum-address@0.1.4": version "0.1.4" resolved "https://registry.yarnpkg.com/@ganache/ethereum-address/-/ethereum-address-0.1.4.tgz#0e6d66f4a24f64bf687cb3ff7358fb85b9d9005e" @@ -1624,16 +1495,16 @@ resolved "https://registry.yarnpkg.com/@keep-network/bitcoin-spv-sol/-/bitcoin-spv-sol-3.4.0-solc-0.8.tgz#8b44c246ffab8ea993efe196f6bf385b1a3b84dc" integrity sha512-KlpY9BbasyLvYXSS7dsJktgRChu/yjdFLOX8ldGA/pltLicCm/l0F4oqxL8wSws9XD12vq9x0B5qzPygVLB2TQ== -"@keep-network/ecdsa@2.1.0-dev.2", "@keep-network/ecdsa@development": - version "2.1.0-dev.2" - resolved "https://registry.yarnpkg.com/@keep-network/ecdsa/-/ecdsa-2.1.0-dev.2.tgz#bb130ef37d6374909dc4bde858d5664e08b1ebce" - integrity sha512-ERzuqvQFkyN5+2MAGiCgDW2kroTrm1Dnd7yRch3yf+HctjPZ6ocfgubhgqFGwCqG4VLXfS/NIezqORege3N6og== +"@keep-network/ecdsa@2.1.0-dev.13", "@keep-network/ecdsa@development": + version "2.1.0-dev.13" + resolved "https://registry.yarnpkg.com/@keep-network/ecdsa/-/ecdsa-2.1.0-dev.13.tgz#31f2f28e74485dcbe03f782f5f67ac299203f3f1" + integrity sha512-Gv9nNQQkE/VTitFSiJqQUXczIbHWOBVG7UH6h3MDo7Pcgl4iuXhM5nmQdRd9vqjU42rI+TyPuSErWjg2+QEEEw== dependencies: - "@keep-network/random-beacon" "2.1.0-dev.1" + "@keep-network/random-beacon" "2.1.0-dev.13" "@keep-network/sortition-pools" "^2.0.0-pre.16" "@openzeppelin/contracts" "^4.6.0" "@openzeppelin/contracts-upgradeable" "^4.6.0" - "@threshold-network/solidity-contracts" "1.3.0-dev.2" + "@threshold-network/solidity-contracts" "1.3.0-dev.5" "@keep-network/keep-core@1.8.0-dev.5": version "1.8.0-dev.5" @@ -1651,7 +1522,7 @@ "@openzeppelin/upgrades" "^2.7.2" openzeppelin-solidity "2.4.0" -"@keep-network/keep-ecdsa@>1.9.0-dev <1.9.0-ropsten": +"@keep-network/keep-ecdsa@1.9.0-dev.1", "@keep-network/keep-ecdsa@>1.9.0-dev <1.9.0-ropsten": version "1.9.0-dev.1" resolved "https://registry.yarnpkg.com/@keep-network/keep-ecdsa/-/keep-ecdsa-1.9.0-dev.1.tgz#7522b47dd639ddd7479a0e71dc328a9e0bba7cae" integrity sha512-FRIDejTUiQO7c9gBXgjtTp2sXkEQKFBBqVjYoZE20OCGRxbgum9FbgD/B5RWIctBy4GGr5wJHnA1789iaK3X6A== @@ -1665,25 +1536,25 @@ version "0.0.1" resolved "https://codeload.github.com/keep-network/prettier-config-keep/tar.gz/a1a333e7ac49928a0f6ed39421906dd1e46ab0f3" -"@keep-network/random-beacon@2.1.0-dev.1": - version "2.1.0-dev.1" - resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.1.0-dev.1.tgz#197422cef030cb61b0b88fc08a59292a9efb3b28" - integrity sha512-ppCPriGEhyc2Aw30wu0ujLphs6wRUdPYR345Knts8tx/z+D49Xg+3JA5tcUiPgXBnJnJJ00sk6uHXdhUS3LLDg== +"@keep-network/random-beacon@2.1.0-dev.13": + version "2.1.0-dev.13" + resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.1.0-dev.13.tgz#8b4d20456e17cb76531a25c98370d3a6da8c8be5" + integrity sha512-o5+LvzQB5Sqnpbu5Wr97HvU63rlw9v/O5ZGxDiWe4XwzFhC/FEnza+uWgWm1IJkFVrQj/DzYokqkzgANx/lBnA== dependencies: "@keep-network/sortition-pools" "^2.0.0-pre.16" - "@openzeppelin/contracts" "^4.6.0" + "@openzeppelin/contracts" "4.7.3" "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - "@threshold-network/solidity-contracts" "1.3.0-dev.2" + "@threshold-network/solidity-contracts" "1.3.0-dev.5" -"@keep-network/random-beacon@2.1.0-dev.2": - version "2.1.0-dev.2" - resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.1.0-dev.2.tgz#aaf5bb4780b6aac6e71ba6ed8ecb29b4ccf6ae81" - integrity sha512-Xc4MIQ65etB11GDLBPUvO8XRs6f2DVY0FmPF2uU00x8/fOIg12jjyyBQwNP1jJ+OLf7W36+CAZcUtj6kI87EAQ== +"@keep-network/random-beacon@2.1.0-dev.14": + version "2.1.0-dev.14" + resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.1.0-dev.14.tgz#d9fac9fa8a5a06ea0985114c4ca79e4805c16d55" + integrity sha512-FdVSW2VtUIcwPCrnrWUudbXOFi+SKZ6cEz7P3+gO+49DFas4ApH6lkRILD/DUHQDMV7D56TxAdw/DHt0dbA+wg== dependencies: "@keep-network/sortition-pools" "^2.0.0-pre.16" - "@openzeppelin/contracts" "^4.6.0" + "@openzeppelin/contracts" "4.7.3" "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - "@threshold-network/solidity-contracts" "1.3.0-dev.2" + "@threshold-network/solidity-contracts" "1.3.0-dev.5" "@keep-network/sortition-pools@1.2.0-dev.1": version "1.2.0-dev.1" @@ -1701,17 +1572,16 @@ "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" "@keep-network/tbtc-v2@development": - version "0.1.1-dev.120" - resolved "https://registry.yarnpkg.com/@keep-network/tbtc-v2/-/tbtc-v2-0.1.1-dev.120.tgz#ee97a1fd1deaa64154ab3de4d49d7ba49782eeab" - integrity sha512-xNjg+uN18vw02b/mhczx7V5nbt13G3nlNlDRXXtBNSXtgsaudQ9iIvgRRNGR92N4sIgsMLHeZcaNkIMW2NYZaA== + version "1.5.0-dev.3" + resolved "https://registry.yarnpkg.com/@keep-network/tbtc-v2/-/tbtc-v2-1.5.0-dev.3.tgz#814682bf9f627780137430c3ad5a6eaf5638eb3c" + integrity sha512-Vf/NOBf0ybN5cPP/R0LXJbZeMWVEkga7mWqie1HyktqJi8pp4XbHoJ6WIro+qrH47AymWv/S2mGYlU4Smsihrw== dependencies: "@keep-network/bitcoin-spv-sol" "3.4.0-solc-0.8" - "@keep-network/ecdsa" "2.1.0-dev.2" - "@keep-network/random-beacon" "2.1.0-dev.2" + "@keep-network/ecdsa" "2.1.0-dev.13" + "@keep-network/random-beacon" "2.1.0-dev.14" "@keep-network/tbtc" "1.1.2-dev.1" - "@openzeppelin/contracts" "^4.6.0" - "@openzeppelin/contracts-upgradeable" "^4.6.0" - "@tenderly/hardhat-tenderly" ">=1.0.12 <1.2.0" + "@openzeppelin/contracts" "^4.8.1" + "@openzeppelin/contracts-upgradeable" "^4.8.1" "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" "@keep-network/tbtc@1.1.2-dev.1": @@ -1794,21 +1664,26 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@nomiclabs/hardhat-ethers@^2.0.6": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.1.tgz#8057b43566a0e41abeb8142064a3c0d3f23dca86" - integrity sha512-RHWYwnxryWR8hzRmU4Jm/q4gzvXpetUOJ4OPlwH2YARcDB+j79+yAYCwO0lN1SUOb4++oOTJEe6AWLEc42LIvg== - "@openzeppelin/contracts-upgradeable@^4.6.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.6.0.tgz#1bf55f230f008554d4c6fe25eb165b85112108b0" integrity sha512-5OnVuO4HlkjSCJO165a4i2Pu1zQGzMs//o54LPrwUgxvEO2P3ax1QuaSI0cEHHTveA77guS0PnNugpR2JMsPfA== +"@openzeppelin/contracts-upgradeable@^4.8.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.1.tgz#03e33b8059ce43884995e69e4479f5a7f084b404" + integrity sha512-UZf5/VdaBA/0kxF7/gg+2UrC8k+fbgiUM0Qw1apAhwpBWBxULbsHw0ZRMgT53nd6N8hr53XFjhcWNeTRGIiCVw== + "@openzeppelin/contracts-upgradeable@~4.5.2": version "4.5.2" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.5.2.tgz#90d9e47bacfd8693bfad0ac8a394645575528d05" integrity sha512-xgWZYaPlrEOQo3cBj97Ufiuv79SPd8Brh4GcFYhPgb6WvAq4ppz8dWKL6h+jLAK01rUqMRp/TS9AdXgAeNvCLA== +"@openzeppelin/contracts@4.7.3": + version "4.7.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.7.3.tgz#939534757a81f8d69cc854c7692805684ff3111e" + integrity sha512-dGRS0agJzu8ybo44pCIf3xBaPQN/65AIXNgK8+4gzKd5kbvlqyxryUYVLJv7fK98Seyd2hDZzVEHSWAh0Bt1Yw== + "@openzeppelin/contracts@^2.4.0": version "2.5.1" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-2.5.1.tgz#c76e3fc57aa224da3718ec351812a4251289db31" @@ -1819,6 +1694,11 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.6.0.tgz#c91cf64bc27f573836dba4122758b4743418c1b3" integrity sha512-8vi4d50NNya/bQqCmaVzvHNmwHvS0OBKb7HNtuNwEE3scXWrP31fKQoGxNMT+KbzmrNZzatE3QK5p2gFONI/hg== +"@openzeppelin/contracts@^4.8.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.1.tgz#afa804d2c68398704b0175acc94d91a54f203645" + integrity sha512-aLDTLu/If1qYIFW5g4ZibuQaUsFGWQPBq1mZKp/txaebUnGHDmmiBhRLY1tDNedN0m+fJtKZ1zAODS9Yk+V6uA== + "@openzeppelin/contracts@~4.5.0": version "4.5.0" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.5.0.tgz#3fd75d57de172b3743cdfc1206883f56430409cc" @@ -1990,29 +1870,16 @@ dependencies: defer-to-connect "^1.0.1" -"@tenderly/hardhat-tenderly@>=1.0.12 <1.2.0": - version "1.1.6" - resolved "https://registry.yarnpkg.com/@tenderly/hardhat-tenderly/-/hardhat-tenderly-1.1.6.tgz#b706c7c337ebae7ecd314df3e8ee3d244ed1de08" - integrity sha512-B6vVdDAxQwjahrvsxjNirJW2ynDENLBD8LLFy8sYVJ+RCb4B8HXT1IGSceqpySNPr2iLYcD5cKC/YCHX+/O48Q== - dependencies: - "@ethersproject/bignumber" "^5.6.2" - "@nomiclabs/hardhat-ethers" "^2.0.6" - axios "^0.21.1" - ethers "^5.6.8" - fs-extra "^9.0.1" - hardhat-deploy "^0.11.10" - js-yaml "^3.14.0" - "@thesis/solidity-contracts@github:thesis/solidity-contracts#4985bcf": version "0.0.1" resolved "https://codeload.github.com/thesis/solidity-contracts/tar.gz/4985bcfc28e36eed9838993b16710e1b500f9e85" dependencies: "@openzeppelin/contracts" "^4.1.0" -"@threshold-network/solidity-contracts@1.3.0-dev.2": - version "1.3.0-dev.2" - resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.3.0-dev.2.tgz#e3589004aff366d9f034e51b1be8832d01c81d47" - integrity sha512-qJulhTwYW7ZKVIgpqWVdQE9R45OgxjmqLaGp2gAv3hvlAUUsC+dnxub1kaQfDqQcZmwzZvtHcxLXYtHg4Cs2ug== +"@threshold-network/solidity-contracts@1.3.0-dev.5": + version "1.3.0-dev.5" + resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.3.0-dev.5.tgz#f7a2727d627a10218f0667bc0d33e19ed8f87fdc" + integrity sha512-AInTKQkJ0PKa32q2m8GnZFPYEArsnvOwhIFdBFaHdq9r4EGyqHMf4YY1WjffkheBZ7AQ0DNA8Lst30kBoQd0SA== dependencies: "@keep-network/keep-core" ">1.8.1-dev <1.8.1-goerli" "@openzeppelin/contracts" "~4.5.0" @@ -2230,11 +2097,6 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.1.tgz#76e72d8a775eef7ce649c63c8acae1a0824bbaed" integrity sha512-XFjFHmaLVifrAKaZ+EKghFHtHSUonyw8P2Qmy2/+osBnrKbH9UYtlK10zg8/kCt47MFilll/DEDKy3DHfJ0URw== -"@types/qs@^6.9.7": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - "@types/randombytes@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/randombytes/-/randombytes-2.0.0.tgz#0087ff5e60ae68023b9bc4398b406fea7ad18304" @@ -2594,11 +2456,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -2622,13 +2479,6 @@ axios@^0.18.0: follow-redirects "1.5.10" is-buffer "^2.0.2" -axios@^0.21.1: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== - dependencies: - follow-redirects "^1.14.0" - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -3284,7 +3134,7 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -3312,21 +3162,6 @@ chokidar@3.5.2: optionalDependencies: fsevents "~2.3.2" -chokidar@^3.5.2: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -3694,7 +3529,7 @@ debug@^4.0.1, debug@^4.1.1, debug@^4.3.1: dependencies: ms "2.1.2" -debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -3952,11 +3787,6 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -encode-utf8@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" - integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== - encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -3979,7 +3809,7 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enquirer@^2.3.5, enquirer@^2.3.6: +enquirer@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -4531,42 +4361,6 @@ ethers@^5.5.2: "@ethersproject/web" "5.5.1" "@ethersproject/wordlists" "5.5.0" -ethers@^5.5.3, ethers@^5.6.8: - version "5.7.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" - integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== - dependencies: - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/abstract-signer" "5.7.0" - "@ethersproject/address" "5.7.0" - "@ethersproject/base64" "5.7.0" - "@ethersproject/basex" "5.7.0" - "@ethersproject/bignumber" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/constants" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/hash" "5.7.0" - "@ethersproject/hdnode" "5.7.0" - "@ethersproject/json-wallets" "5.7.0" - "@ethersproject/keccak256" "5.7.0" - "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.1" - "@ethersproject/pbkdf2" "5.7.0" - "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/random" "5.7.0" - "@ethersproject/rlp" "5.7.0" - "@ethersproject/sha2" "5.7.0" - "@ethersproject/signing-key" "5.7.0" - "@ethersproject/solidity" "5.7.0" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/units" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.1" - "@ethersproject/wordlists" "5.7.0" - ethjs-unit@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" @@ -4819,13 +4613,6 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.4.tgz#28d9969ea90661b5134259f312ab6aa7929ac5e2" integrity sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw== -fmix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" - integrity sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w== - dependencies: - imul "^1.0.0" - follow-redirects@1.5.10: version "1.5.10" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" @@ -4833,11 +4620,6 @@ follow-redirects@1.5.10: dependencies: debug "=3.1.0" -follow-redirects@^1.14.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4" - integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -4859,15 +4641,6 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -4908,15 +4681,6 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" - integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-extra@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" @@ -4935,16 +4699,6 @@ fs-extra@^7.0.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.0.1: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -5189,7 +4943,7 @@ got@^7.1.0: url-parse-lax "^1.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.10, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: +graceful-fs@^4.1.10, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -5212,25 +4966,6 @@ har-validator@~5.1.3: ajv "^6.12.3" har-schema "^2.0.0" -hardhat-deploy@^0.11.10: - version "0.11.22" - resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.22.tgz#9799c0266a0fc40c84690de54760f1b4dae5e487" - integrity sha512-ZhHVNB7Jo2l8Is+KIAk9F8Q3d7pptyiX+nsNbIFXztCz81kaP+6kxNODRBqRCy7SOD3It4+iKCL6tWsPAA/jVQ== - dependencies: - "@types/qs" "^6.9.7" - axios "^0.21.1" - chalk "^4.1.2" - chokidar "^3.5.2" - debug "^4.3.2" - enquirer "^2.3.6" - ethers "^5.5.3" - form-data "^4.0.0" - fs-extra "^10.0.0" - match-all "^1.2.6" - murmur-128 "^0.2.1" - qs "^6.9.4" - zksync-web3 "^0.8.1" - has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" @@ -5405,11 +5140,6 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" -imul@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" - integrity sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA== - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -5731,7 +5461,7 @@ js-yaml@4.1.0: dependencies: argparse "^2.0.1" -js-yaml@^3.13.1, js-yaml@^3.14.0: +js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -5795,15 +5525,6 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - jsprim@^1.2.2: version "1.4.2" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" @@ -6094,11 +5815,6 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -match-all@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" - integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== - mcl-wasm@^0.7.1: version "0.7.9" resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" @@ -6399,15 +6115,6 @@ multihashes@^0.4.15, multihashes@~0.4.15: multibase "^0.7.0" varint "^5.0.0" -murmur-128@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" - integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== - dependencies: - encode-utf8 "^1.0.2" - fmix "^0.1.0" - imul "^1.0.0" - "n64@git+https://github.com/chjj/n64.git#semver:~0.2.10": version "0.2.10" resolved "git+https://github.com/chjj/n64.git#34f981f1441f569821d97a31f8cf21a3fc11b8f6" @@ -6977,13 +6684,6 @@ qs@6.10.3: dependencies: side-channel "^1.0.4" -qs@^6.9.4: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" @@ -8114,11 +7814,6 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -9338,8 +9033,3 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zksync-web3@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.8.1.tgz#db289d8f6caf61f4d5ddc471fa3448d93208dc14" - integrity sha512-1A4aHPQ3MyuGjpv5X/8pVEN+MdZqMjfVmiweQSRjOlklXYu65wT9BGEOtCmMs5d3gIvLp4ssfTeuR5OCKOD2kw==