diff --git a/cross-chain/base/deployments/base/BaseL2BitcoinDepositor.json b/cross-chain/base/deployments/base/BaseL2BitcoinDepositor.json new file mode 100644 index 000000000..b2d5cad33 --- /dev/null +++ b/cross-chain/base/deployments/base/BaseL2BitcoinDepositor.json @@ -0,0 +1,429 @@ +{ + "address": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "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" + } + ], + "indexed": false, + "internalType": "struct IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "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": "address", + "name": "vault", + "type": "address" + } + ], + "indexed": false, + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2Sender", + "type": "address" + } + ], + "name": "DepositInitialized", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1BitcoinDepositor", + "type": "address" + } + ], + "name": "attachL1BitcoinDepositor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_wormholeRelayer", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2WormholeGateway", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_l1ChainId", + "type": "uint16" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "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 IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "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": "address", + "name": "vault", + "type": "address" + } + ], + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + } + ], + "name": "initializeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "l1BitcoinDepositor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l1ChainId", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2WormholeGateway", + "outputs": [ + { + "internalType": "contract IL2WormholeGateway", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "additionalVaas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "sourceAddress", + "type": "bytes32" + }, + { + "internalType": "uint16", + "name": "sourceChain", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "receiveWormholeMessages", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wormholeRelayer", + "outputs": [ + { + "internalType": "contract IWormholeRelayer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "receipt": { + "to": null, + "from": "0xAAe2a793666c0A0C7BbBbAa18170298aB9146d0e", + "contractAddress": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "transactionIndex": 155, + "gasUsed": "704848", + "logsBloom": "0x00000000000000000002000000000000400000000000000000800000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000002000002000001000000000000000000000000000000000000020000000000000000000800000000800000000000000000002000400000000010000000000000000000000000000000000080000000080000800000000000000000000100000000000400000000000000000000000008000000000000000020000000000000000000040000000000000400000010000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x913de6eb18e2bde992b81bae49168b3e0dc098531c0bdb5e56184ca5e1e38c64", + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "logs": [ + { + "transactionIndex": 155, + "blockNumber": 26922966, + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "address": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000da04b0ae3e07dd4a14ca993c47461b5be18c3d4a" + ], + "data": "0x", + "logIndex": 430, + "blockHash": "0x913de6eb18e2bde992b81bae49168b3e0dc098531c0bdb5e56184ca5e1e38c64" + }, + { + "transactionIndex": 155, + "blockNumber": 26922966, + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "address": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000aae2a793666c0a0c7bbbbaa18170298ab9146d0e" + ], + "data": "0x", + "logIndex": 431, + "blockHash": "0x913de6eb18e2bde992b81bae49168b3e0dc098531c0bdb5e56184ca5e1e38c64" + }, + { + "transactionIndex": 155, + "blockNumber": 26922966, + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "address": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 432, + "blockHash": "0x913de6eb18e2bde992b81bae49168b3e0dc098531c0bdb5e56184ca5e1e38c64" + }, + { + "transactionIndex": 155, + "blockNumber": 26922966, + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "address": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbe11cb434f9ddac9cc2eec7d88d5c6ed4c41ea7", + "logIndex": 433, + "blockHash": "0x913de6eb18e2bde992b81bae49168b3e0dc098531c0bdb5e56184ca5e1e38c64" + } + ], + "blockNumber": 26922966, + "cumulativeGasUsed": "44576044", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0xda04b0Ae3E07dd4a14Ca993C47461b5Be18C3D4A", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file diff --git a/cross-chain/base/deployments/mainnet/.chainId b/cross-chain/base/deployments/mainnet/.chainId new file mode 100644 index 000000000..56a6051ca --- /dev/null +++ b/cross-chain/base/deployments/mainnet/.chainId @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/cross-chain/base/deployments/mainnet/BaseL1BitcoinDepositor.json b/cross-chain/base/deployments/mainnet/BaseL1BitcoinDepositor.json new file mode 100644 index 000000000..bd2b58a5e --- /dev/null +++ b/cross-chain/base/deployments/mainnet/BaseL1BitcoinDepositor.json @@ -0,0 +1,776 @@ +{ + "address": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "depositKey", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l1Sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "initialAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tbtcAmount", + "type": "uint256" + } + ], + "name": "DepositFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "depositKey", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l1Sender", + "type": "address" + } + ], + "name": "DepositInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "initializeDepositGasOffset", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "finalizeDepositGasOffset", + "type": "uint256" + } + ], + "name": "GasOffsetParametersUpdated", + "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": "l2FinalizeDepositGasLimit", + "type": "uint256" + } + ], + "name": "L2FinalizeDepositGasLimitUpdated", + "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": "bool", + "name": "reimburseTxMaxFee", + "type": "bool" + } + ], + "name": "ReimburseTxMaxFeeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "authorization", + "type": "bool" + } + ], + "name": "ReimbursementAuthorizationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newReimbursementPool", + "type": "address" + } + ], + "name": "ReimbursementPoolUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "SATOSHI_MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l2BitcoinDepositor", + "type": "address" + } + ], + "name": "attachL2BitcoinDepositor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "deposits", + "outputs": [ + { + "internalType": "enum L1BitcoinDepositor.DepositState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "depositKey", + "type": "uint256" + } + ], + "name": "finalizeDeposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeDepositGasOffset", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "gasReimbursements", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint96", + "name": "gasSpent", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tbtcBridge", + "type": "address" + }, + { + "internalType": "address", + "name": "_tbtcVault", + "type": "address" + }, + { + "internalType": "address", + "name": "_wormhole", + "type": "address" + }, + { + "internalType": "address", + "name": "_wormholeRelayer", + "type": "address" + }, + { + "internalType": "address", + "name": "_wormholeTokenBridge", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2WormholeGateway", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_l2ChainId", + "type": "uint16" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "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 IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "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": "address", + "name": "vault", + "type": "address" + } + ], + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + } + ], + "name": "initializeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeDepositGasOffset", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2BitcoinDepositor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ChainId", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2FinalizeDepositGasLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2WormholeGateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quoteFinalizeDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reimburseTxMaxFee", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "reimbursementAuthorizations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reimbursementPool", + "outputs": [ + { + "internalType": "contract ReimbursementPool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_reimburseTxMaxFee", + "type": "bool" + } + ], + "name": "setReimburseTxMaxFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tbtcToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tbtcVault", + "outputs": [ + { + "internalType": "contract ITBTCVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_initializeDepositGasOffset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_finalizeDepositGasOffset", + "type": "uint256" + } + ], + "name": "updateGasOffsetParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_l2FinalizeDepositGasLimit", + "type": "uint256" + } + ], + "name": "updateL2FinalizeDepositGasLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bool", + "name": "authorization", + "type": "bool" + } + ], + "name": "updateReimbursementAuthorization", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ReimbursementPool", + "name": "_reimbursementPool", + "type": "address" + } + ], + "name": "updateReimbursementPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wormhole", + "outputs": [ + { + "internalType": "contract IWormhole", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wormholeRelayer", + "outputs": [ + { + "internalType": "contract IWormholeRelayer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wormholeTokenBridge", + "outputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "receipt": { + "to": null, + "from": "0x353C5c3DE81EDb53FFB398f6416f962b90ae8611", + "contractAddress": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "transactionIndex": 115, + "gasUsed": "890161", + "logsBloom": "0x00000800000000000000000000000000400000000000000000800000000000000000000000000080000000000000000000000010000000000000000000000000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000800000000000000000000000400000004000000000000000000000000000000000000080000004000000800000000000000000000000020000000400000000000200000000000400000000000000000020000000000000000000040000000000000400000000000000000020100000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3238e395353c27020630cdc6caaac3dca6ccd3ee6106a5889e3421b62240bb40", + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "logs": [ + { + "transactionIndex": 115, + "blockNumber": 21935671, + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "address": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000001fe7385497a45191c5321fdd903d880491e47dd7" + ], + "data": "0x", + "logIndex": 478, + "blockHash": "0x3238e395353c27020630cdc6caaac3dca6ccd3ee6106a5889e3421b62240bb40" + }, + { + "transactionIndex": 115, + "blockNumber": 21935671, + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "address": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000353c5c3de81edb53ffb398f6416f962b90ae8611" + ], + "data": "0x", + "logIndex": 479, + "blockHash": "0x3238e395353c27020630cdc6caaac3dca6ccd3ee6106a5889e3421b62240bb40" + }, + { + "transactionIndex": 115, + "blockNumber": 21935671, + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "address": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 480, + "blockHash": "0x3238e395353c27020630cdc6caaac3dca6ccd3ee6106a5889e3421b62240bb40" + }, + { + "transactionIndex": 115, + "blockNumber": 21935671, + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "address": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d5d30fafca5a5d371a46f77cacc4db5f811ef917", + "logIndex": 481, + "blockHash": "0x3238e395353c27020630cdc6caaac3dca6ccd3ee6106a5889e3421b62240bb40" + } + ], + "blockNumber": 21935671, + "cumulativeGasUsed": "35698207", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x1Fe7385497a45191C5321FDd903d880491e47dD7", + "devdoc": "Contract deployed as upgradable proxy" +} \ No newline at end of file diff --git a/typescript/api-reference/classes/BaseL2BitcoinDepositor.md b/typescript/api-reference/classes/BaseL2BitcoinDepositor.md index 9a5d3c22d..acdb0fd19 100644 --- a/typescript/api-reference/classes/BaseL2BitcoinDepositor.md +++ b/typescript/api-reference/classes/BaseL2BitcoinDepositor.md @@ -63,7 +63,7 @@ EthersContractHandle\<L2BitcoinDepositorTypechain\>.constructor #### Defined in -[lib/base/l2-bitcoin-depositor.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L37) +[lib/base/l2-bitcoin-depositor.ts:36](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L36) ## Properties @@ -73,7 +73,7 @@ EthersContractHandle\<L2BitcoinDepositorTypechain\>.constructor #### Defined in -[lib/base/l2-bitcoin-depositor.ts:35](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L35) +[lib/base/l2-bitcoin-depositor.ts:34](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L34) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[lib/base/l2-bitcoin-depositor.ts:34](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L34) +[lib/base/l2-bitcoin-depositor.ts:33](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L33) ___ @@ -153,7 +153,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[lib/base/l2-bitcoin-depositor.ts:85](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L85) +[lib/base/l2-bitcoin-depositor.ts:83](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L83) ___ @@ -195,7 +195,7 @@ ___ #### Defined in -[lib/base/l2-bitcoin-depositor.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L61) +[lib/base/l2-bitcoin-depositor.ts:59](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L59) ___ @@ -215,7 +215,7 @@ ___ #### Defined in -[lib/base/l2-bitcoin-depositor.ts:69](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L69) +[lib/base/l2-bitcoin-depositor.ts:67](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L67) ___ @@ -278,7 +278,7 @@ ___ #### Defined in -[lib/base/l2-bitcoin-depositor.ts:93](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L93) +[lib/base/l2-bitcoin-depositor.ts:91](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L91) ___ @@ -304,4 +304,4 @@ ___ #### Defined in -[lib/base/l2-bitcoin-depositor.ts:77](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L77) +[lib/base/l2-bitcoin-depositor.ts:75](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L75) diff --git a/typescript/api-reference/classes/BaseL2TBTCToken.md b/typescript/api-reference/classes/BaseL2TBTCToken.md index 51a4548e2..6d757ad35 100644 --- a/typescript/api-reference/classes/BaseL2TBTCToken.md +++ b/typescript/api-reference/classes/BaseL2TBTCToken.md @@ -58,7 +58,7 @@ EthersContractHandle\<L2TBTCTypechain\>.constructor #### Defined in -[lib/base/l2-tbtc-token.ts:23](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L23) +[lib/base/l2-tbtc-token.ts:22](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L22) ## Properties @@ -134,7 +134,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[lib/base/l2-tbtc-token.ts:53](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L53) +[lib/base/l2-tbtc-token.ts:51](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L51) ___ @@ -176,7 +176,7 @@ ___ #### Defined in -[lib/base/l2-tbtc-token.ts:45](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L45) +[lib/base/l2-tbtc-token.ts:43](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L43) ___ diff --git a/typescript/api-reference/classes/EthereumCrossChainExtraDataEncoder.md b/typescript/api-reference/classes/EthereumCrossChainExtraDataEncoder.md index 0273207fb..77e100f25 100644 --- a/typescript/api-reference/classes/EthereumCrossChainExtraDataEncoder.md +++ b/typescript/api-reference/classes/EthereumCrossChainExtraDataEncoder.md @@ -55,7 +55,7 @@ for reference. #### Defined in -[lib/ethereum/l1-bitcoin-depositor.ts:172](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L172) +[lib/ethereum/l1-bitcoin-depositor.ts:168](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L168) ___ @@ -81,4 +81,4 @@ ___ #### Defined in -[lib/ethereum/l1-bitcoin-depositor.ts:158](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L158) +[lib/ethereum/l1-bitcoin-depositor.ts:154](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L154) diff --git a/typescript/api-reference/classes/EthereumL1BitcoinDepositor.md b/typescript/api-reference/classes/EthereumL1BitcoinDepositor.md index e91c08d03..5cd342ccb 100644 --- a/typescript/api-reference/classes/EthereumL1BitcoinDepositor.md +++ b/typescript/api-reference/classes/EthereumL1BitcoinDepositor.md @@ -63,7 +63,7 @@ EthersContractHandle\<L1BitcoinDepositorTypechain\>.constructor #### Defined in -[lib/ethereum/l1-bitcoin-depositor.ts:65](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L65) +[lib/ethereum/l1-bitcoin-depositor.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L61) ## Properties @@ -73,7 +73,7 @@ EthersContractHandle\<L1BitcoinDepositorTypechain\>.constructor #### Defined in -[lib/ethereum/l1-bitcoin-depositor.ts:63](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L63) +[lib/ethereum/l1-bitcoin-depositor.ts:59](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L59) ___ @@ -143,7 +143,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[lib/ethereum/l1-bitcoin-depositor.ts:108](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L108) +[lib/ethereum/l1-bitcoin-depositor.ts:104](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L104) ___ @@ -185,7 +185,7 @@ ___ #### Defined in -[lib/ethereum/l1-bitcoin-depositor.ts:100](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L100) +[lib/ethereum/l1-bitcoin-depositor.ts:96](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L96) ___ @@ -211,7 +211,7 @@ ___ #### Defined in -[lib/ethereum/l1-bitcoin-depositor.ts:92](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L92) +[lib/ethereum/l1-bitcoin-depositor.ts:88](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L88) ___ @@ -274,4 +274,4 @@ ___ #### Defined in -[lib/ethereum/l1-bitcoin-depositor.ts:116](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L116) +[lib/ethereum/l1-bitcoin-depositor.ts:112](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L112) diff --git a/typescript/src/lib/base/artifacts/base/BaseL2BitcoinDepositor.json b/typescript/src/lib/base/artifacts/base/BaseL2BitcoinDepositor.json new file mode 100644 index 000000000..f228f276f --- /dev/null +++ b/typescript/src/lib/base/artifacts/base/BaseL2BitcoinDepositor.json @@ -0,0 +1,429 @@ +{ + "address": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "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" + } + ], + "indexed": false, + "internalType": "struct IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "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": "address", + "name": "vault", + "type": "address" + } + ], + "indexed": false, + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2Sender", + "type": "address" + } + ], + "name": "DepositInitialized", + "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" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1BitcoinDepositor", + "type": "address" + } + ], + "name": "attachL1BitcoinDepositor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_wormholeRelayer", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2WormholeGateway", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_l1ChainId", + "type": "uint16" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "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 IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "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": "address", + "name": "vault", + "type": "address" + } + ], + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + } + ], + "name": "initializeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "l1BitcoinDepositor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l1ChainId", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2WormholeGateway", + "outputs": [ + { + "internalType": "contract IL2WormholeGateway", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "additionalVaas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "sourceAddress", + "type": "bytes32" + }, + { + "internalType": "uint16", + "name": "sourceChain", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "receiveWormholeMessages", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wormholeRelayer", + "outputs": [ + { + "internalType": "contract IWormholeRelayer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "receipt": { + "to": null, + "from": "0xAAe2a793666c0A0C7BbBbAa18170298aB9146d0e", + "contractAddress": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "transactionIndex": 155, + "gasUsed": "704848", + "logsBloom": "0x00000000000000000002000000000000400000000000000000800000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000002000002000001000000000000000000000000000000000000020000000000000000000800000000800000000000000000002000400000000010000000000000000000000000000000000080000000080000800000000000000000000100000000000400000000000000000000000008000000000000000020000000000000000000040000000000000400000010000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x913de6eb18e2bde992b81bae49168b3e0dc098531c0bdb5e56184ca5e1e38c64", + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "logs": [ + { + "transactionIndex": 155, + "blockNumber": 26922966, + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "address": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000da04b0ae3e07dd4a14ca993c47461b5be18c3d4a" + ], + "data": "0x", + "logIndex": 430, + "blockHash": "0x913de6eb18e2bde992b81bae49168b3e0dc098531c0bdb5e56184ca5e1e38c64" + }, + { + "transactionIndex": 155, + "blockNumber": 26922966, + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "address": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000aae2a793666c0a0c7bbbbaa18170298ab9146d0e" + ], + "data": "0x", + "logIndex": 431, + "blockHash": "0x913de6eb18e2bde992b81bae49168b3e0dc098531c0bdb5e56184ca5e1e38c64" + }, + { + "transactionIndex": 155, + "blockNumber": 26922966, + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "address": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 432, + "blockHash": "0x913de6eb18e2bde992b81bae49168b3e0dc098531c0bdb5e56184ca5e1e38c64" + }, + { + "transactionIndex": 155, + "blockNumber": 26922966, + "transactionHash": "0xac592be524a1d929a6781d2eef723d9f0199b86fd87d3e2ea303d1e39c351bf2", + "address": "0xDEbD9aA9BC4845c7Cd2d9a997F82A2Daea540bD5", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbe11cb434f9ddac9cc2eec7d88d5c6ed4c41ea7", + "logIndex": 433, + "blockHash": "0x913de6eb18e2bde992b81bae49168b3e0dc098531c0bdb5e56184ca5e1e38c64" + } + ], + "blockNumber": 26922966, + "cumulativeGasUsed": "44576044", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0xda04b0Ae3E07dd4a14Ca993C47461b5Be18C3D4A", + "devdoc": "Contract deployed as upgradable proxy" +} diff --git a/typescript/src/lib/base/artifacts/base/BaseTBTC.json b/typescript/src/lib/base/artifacts/base/BaseTBTC.json new file mode 100644 index 000000000..8e834c472 --- /dev/null +++ b/typescript/src/lib/base/artifacts/base/BaseTBTC.json @@ -0,0 +1,863 @@ +{ + "address": "0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b", + "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": "0x85f05786bb1d38013714332804139352f16aa2751d05b4517ed2f7e67d683a6a", + "receipt": { + "to": null, + "from": "0x123694886DBf5Ac94DDA07135349534536D14cAf", + "contractAddress": "0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b", + "transactionIndex": 1, + "gasUsed": "754031", + "logsBloom": "0x00000000000000000000400000000000400000000002000000800000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000002800001000000000000000080000000000000000000020000000000000000000800000000800000000000000000400000400000000000000000000000000000000000000000000080000000000000800000000000000000000000000000000400000000000000000000000000000000000000000020000000040000000000440000000000000400000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x676b27fe07778a4d23b12ebcda86efb3396f4727c4f22fecfc534f22ad0382f2", + "transactionHash": "0x85f05786bb1d38013714332804139352f16aa2751d05b4517ed2f7e67d683a6a", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 2126367, + "transactionHash": "0x85f05786bb1d38013714332804139352f16aa2751d05b4517ed2f7e67d683a6a", + "address": "0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000041c9b5639e3f2f6c61e9b78b2c6ff3746e79d91a" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x676b27fe07778a4d23b12ebcda86efb3396f4727c4f22fecfc534f22ad0382f2" + }, + { + "transactionIndex": 1, + "blockNumber": 2126367, + "transactionHash": "0x85f05786bb1d38013714332804139352f16aa2751d05b4517ed2f7e67d683a6a", + "address": "0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000123694886dbf5ac94dda07135349534536d14caf" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x676b27fe07778a4d23b12ebcda86efb3396f4727c4f22fecfc534f22ad0382f2" + }, + { + "transactionIndex": 1, + "blockNumber": 2126367, + "transactionHash": "0x85f05786bb1d38013714332804139352f16aa2751d05b4517ed2f7e67d683a6a", + "address": "0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0x676b27fe07778a4d23b12ebcda86efb3396f4727c4f22fecfc534f22ad0382f2" + }, + { + "transactionIndex": 1, + "blockNumber": 2126367, + "transactionHash": "0x85f05786bb1d38013714332804139352f16aa2751d05b4517ed2f7e67d683a6a", + "address": "0x236aa50979D5f3De3Bd1Eeb40E81137F22ab794b", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001293a54e160d1cd7075487898d65266081a15458", + "logIndex": 3, + "blockHash": "0x676b27fe07778a4d23b12ebcda86efb3396f4727c4f22fecfc534f22ad0382f2" + } + ], + "blockNumber": 2126367, + "cumulativeGasUsed": "818044", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x41C9b5639E3F2F6C61e9B78b2c6FF3746E79d91A", + "devdoc": "Contract deployed as upgradable proxy" +} diff --git a/typescript/src/lib/base/l2-bitcoin-depositor.ts b/typescript/src/lib/base/l2-bitcoin-depositor.ts index 5601b0be0..159d9ba81 100644 --- a/typescript/src/lib/base/l2-bitcoin-depositor.ts +++ b/typescript/src/lib/base/l2-bitcoin-depositor.ts @@ -19,8 +19,7 @@ import { import { Hex } from "../utils" import { BitcoinRawTxVectors } from "../bitcoin" -// TODO: Uncomment once Base native minting is available on Base mainnet. -// import BaseL2BitcoinDepositorDeployment from "./artifacts/base/BaseL2BitcoinDepositor.json" +import BaseL2BitcoinDepositorDeployment from "./artifacts/base/BaseL2BitcoinDepositor.json" import BaseSepoliaL2BitcoinDepositorDeployment from "./artifacts/baseSepolia/BaseL2BitcoinDepositor.json" /** @@ -41,10 +40,9 @@ export class BaseL2BitcoinDepositor case Chains.Base.BaseSepolia: deployment = BaseSepoliaL2BitcoinDepositorDeployment break - // TODO: Uncomment once Base native minting is available on Base mainnet. - // case Chains.Base.Base: - // deployment = BaseL2BitcoinDepositorDeployment - // break + case Chains.Base.Base: + deployment = BaseL2BitcoinDepositorDeployment + break default: throw new Error("Unsupported deployment type") } diff --git a/typescript/src/lib/base/l2-tbtc-token.ts b/typescript/src/lib/base/l2-tbtc-token.ts index 0b7d5797e..ca442e686 100644 --- a/typescript/src/lib/base/l2-tbtc-token.ts +++ b/typescript/src/lib/base/l2-tbtc-token.ts @@ -8,8 +8,7 @@ import { ChainIdentifier, Chains, L2TBTCToken } from "../contracts" import { BigNumber } from "ethers" import { EthereumAddress } from "../ethereum" -// TODO: Uncomment once Base native minting is available on Base mainnet. -// import BaseL2TBTCTokenDeployment from "./artifacts/base/BaseTBTC.json" +import BaseL2TBTCTokenDeployment from "./artifacts/base/BaseTBTC.json" import BaseSepoliaL2TBTCTokenDeployment from "./artifacts/baseSepolia/BaseTBTC.json" /** @@ -27,10 +26,9 @@ export class BaseL2TBTCToken case Chains.Base.BaseSepolia: deployment = BaseSepoliaL2TBTCTokenDeployment break - // TODO: Uncomment once Base native minting is available on Base mainnet. - // case Chains.Base.Base: - // deployment = BaseL2TBTCTokenDeployment - // break + case Chains.Base.Base: + deployment = BaseL2TBTCTokenDeployment + break default: throw new Error("Unsupported deployment type") } diff --git a/typescript/src/lib/ethereum/artifacts/mainnet/BaseL1BitcoinDepositor.json b/typescript/src/lib/ethereum/artifacts/mainnet/BaseL1BitcoinDepositor.json new file mode 100644 index 000000000..4ef381037 --- /dev/null +++ b/typescript/src/lib/ethereum/artifacts/mainnet/BaseL1BitcoinDepositor.json @@ -0,0 +1,776 @@ +{ + "address": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "depositKey", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l1Sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "initialAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tbtcAmount", + "type": "uint256" + } + ], + "name": "DepositFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "depositKey", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l1Sender", + "type": "address" + } + ], + "name": "DepositInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "initializeDepositGasOffset", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "finalizeDepositGasOffset", + "type": "uint256" + } + ], + "name": "GasOffsetParametersUpdated", + "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": "l2FinalizeDepositGasLimit", + "type": "uint256" + } + ], + "name": "L2FinalizeDepositGasLimitUpdated", + "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": "bool", + "name": "reimburseTxMaxFee", + "type": "bool" + } + ], + "name": "ReimburseTxMaxFeeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "authorization", + "type": "bool" + } + ], + "name": "ReimbursementAuthorizationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newReimbursementPool", + "type": "address" + } + ], + "name": "ReimbursementPoolUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "SATOSHI_MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l2BitcoinDepositor", + "type": "address" + } + ], + "name": "attachL2BitcoinDepositor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "deposits", + "outputs": [ + { + "internalType": "enum L1BitcoinDepositor.DepositState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "depositKey", + "type": "uint256" + } + ], + "name": "finalizeDeposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeDepositGasOffset", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "gasReimbursements", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint96", + "name": "gasSpent", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tbtcBridge", + "type": "address" + }, + { + "internalType": "address", + "name": "_tbtcVault", + "type": "address" + }, + { + "internalType": "address", + "name": "_wormhole", + "type": "address" + }, + { + "internalType": "address", + "name": "_wormholeRelayer", + "type": "address" + }, + { + "internalType": "address", + "name": "_wormholeTokenBridge", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2WormholeGateway", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_l2ChainId", + "type": "uint16" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "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 IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "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": "address", + "name": "vault", + "type": "address" + } + ], + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + } + ], + "name": "initializeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeDepositGasOffset", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2BitcoinDepositor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ChainId", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2FinalizeDepositGasLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2WormholeGateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quoteFinalizeDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reimburseTxMaxFee", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "reimbursementAuthorizations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reimbursementPool", + "outputs": [ + { + "internalType": "contract ReimbursementPool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_reimburseTxMaxFee", + "type": "bool" + } + ], + "name": "setReimburseTxMaxFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tbtcToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tbtcVault", + "outputs": [ + { + "internalType": "contract ITBTCVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_initializeDepositGasOffset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_finalizeDepositGasOffset", + "type": "uint256" + } + ], + "name": "updateGasOffsetParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_l2FinalizeDepositGasLimit", + "type": "uint256" + } + ], + "name": "updateL2FinalizeDepositGasLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bool", + "name": "authorization", + "type": "bool" + } + ], + "name": "updateReimbursementAuthorization", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ReimbursementPool", + "name": "_reimbursementPool", + "type": "address" + } + ], + "name": "updateReimbursementPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wormhole", + "outputs": [ + { + "internalType": "contract IWormhole", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wormholeRelayer", + "outputs": [ + { + "internalType": "contract IWormholeRelayer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wormholeTokenBridge", + "outputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "receipt": { + "to": null, + "from": "0x353C5c3DE81EDb53FFB398f6416f962b90ae8611", + "contractAddress": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "transactionIndex": 115, + "gasUsed": "890161", + "logsBloom": "0x00000800000000000000000000000000400000000000000000800000000000000000000000000080000000000000000000000010000000000000000000000000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000800000000000000000000000400000004000000000000000000000000000000000000080000004000000800000000000000000000000020000000400000000000200000000000400000000000000000020000000000000000000040000000000000400000000000000000020100000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3238e395353c27020630cdc6caaac3dca6ccd3ee6106a5889e3421b62240bb40", + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "logs": [ + { + "transactionIndex": 115, + "blockNumber": 21935671, + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "address": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000001fe7385497a45191c5321fdd903d880491e47dd7" + ], + "data": "0x", + "logIndex": 478, + "blockHash": "0x3238e395353c27020630cdc6caaac3dca6ccd3ee6106a5889e3421b62240bb40" + }, + { + "transactionIndex": 115, + "blockNumber": 21935671, + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "address": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000353c5c3de81edb53ffb398f6416f962b90ae8611" + ], + "data": "0x", + "logIndex": 479, + "blockHash": "0x3238e395353c27020630cdc6caaac3dca6ccd3ee6106a5889e3421b62240bb40" + }, + { + "transactionIndex": 115, + "blockNumber": 21935671, + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "address": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 480, + "blockHash": "0x3238e395353c27020630cdc6caaac3dca6ccd3ee6106a5889e3421b62240bb40" + }, + { + "transactionIndex": 115, + "blockNumber": 21935671, + "transactionHash": "0x4bef42f6be046daf6da7936f51fbbed81e53a704bc9d548d739db51c0098f575", + "address": "0xF462413315Ee37AEBD0f5cA4296D9F3F3D9C4A59", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d5d30fafca5a5d371a46f77cacc4db5f811ef917", + "logIndex": 481, + "blockHash": "0x3238e395353c27020630cdc6caaac3dca6ccd3ee6106a5889e3421b62240bb40" + } + ], + "blockNumber": 21935671, + "cumulativeGasUsed": "35698207", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x1Fe7385497a45191C5321FDd903d880491e47dD7", + "devdoc": "Contract deployed as upgradable proxy" +} diff --git a/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts b/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts index 9a437481d..f6a12b144 100644 --- a/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts +++ b/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts @@ -17,8 +17,7 @@ import { EthereumAddress, packRevealDepositParameters } from "./index" import { BitcoinRawTxVectors } from "../bitcoin" import { Hex } from "../utils" -// TODO: Uncomment once BaseL1BitcoinDepositor is available on Ethereum mainnet. -// import MainnetBaseL1BitcoinDepositorDeployment from "./artifacts/mainnet/BaseL1BitcoinDepositor.json" +import MainnetBaseL1BitcoinDepositorDeployment from "./artifacts/mainnet/BaseL1BitcoinDepositor.json" import MainnetArbitrumL1BitcoinDepositorDeployment from "./artifacts/mainnet/ArbitrumOneL1BitcoinDepositor.json" import SepoliaBaseL1BitcoinDepositorDeployment from "./artifacts/sepolia/BaseL1BitcoinDepositor.json" @@ -27,13 +26,10 @@ import SepoliaArbitrumL1BitcoinDepositorDeployment from "./artifacts/sepolia/Arb const artifactLoader = { getMainnet: (l2ChainName: L2Chain) => { switch (l2ChainName) { - // TODO: Uncomment once BaseL1BitcoinDepositor is available on Ethereum mainnet. - // case "Base": - // return MainnetBaseL1BitcoinDepositorDeployment - + case "Base": + return MainnetBaseL1BitcoinDepositorDeployment case "Arbitrum": return MainnetArbitrumL1BitcoinDepositorDeployment - default: throw new Error("Unsupported L2 chain") }