UNPKG

@arbitrum/sdk

Version:

Typescript library client-side interactions with Arbitrum

583 lines (582 loc) 23.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OutboxWithoutOptTester__factory = void 0; /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ const ethers_1 = require("ethers"); const _abi = [ { inputs: [], name: "AlreadyInit", type: "error", }, { inputs: [ { internalType: "uint256", name: "index", type: "uint256", }, ], name: "AlreadySpent", type: "error", }, { inputs: [], name: "BridgeCallFailed", type: "error", }, { inputs: [ { internalType: "uint256", name: "actualLength", type: "uint256", }, { internalType: "uint256", name: "maxProofLength", type: "uint256", }, ], name: "MerkleProofTooLong", type: "error", }, { inputs: [ { internalType: "address", name: "sender", type: "address", }, { internalType: "address", name: "owner", type: "address", }, ], name: "NotOwner", type: "error", }, { inputs: [ { internalType: "uint256", name: "index", type: "uint256", }, { internalType: "uint256", name: "maxIndex", type: "uint256", }, ], name: "PathNotMinimal", type: "error", }, { inputs: [ { internalType: "uint256", name: "proofLength", type: "uint256", }, ], name: "ProofTooLong", type: "error", }, { inputs: [ { internalType: "bytes32", name: "root", type: "bytes32", }, ], name: "UnknownRoot", type: "error", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "to", type: "address", }, { indexed: true, internalType: "address", name: "l2Sender", type: "address", }, { indexed: true, internalType: "uint256", name: "zero", type: "uint256", }, { indexed: false, internalType: "uint256", name: "transactionIndex", type: "uint256", }, ], name: "OutBoxTransactionExecuted", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "bytes32", name: "outputRoot", type: "bytes32", }, { indexed: true, internalType: "bytes32", name: "l2BlockHash", type: "bytes32", }, ], name: "SendRootUpdated", type: "event", }, { inputs: [], name: "OUTBOX_VERSION", outputs: [ { internalType: "uint128", name: "", type: "uint128", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "bridge", outputs: [ { internalType: "contract IBridge", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "l2Sender", type: "address", }, { internalType: "address", name: "to", type: "address", }, { internalType: "uint256", name: "l2Block", type: "uint256", }, { internalType: "uint256", name: "l1Block", type: "uint256", }, { internalType: "uint256", name: "l2Timestamp", type: "uint256", }, { internalType: "uint256", name: "value", type: "uint256", }, { internalType: "bytes", name: "data", type: "bytes", }, ], name: "calculateItemHash", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "pure", type: "function", }, { inputs: [ { internalType: "bytes32[]", name: "proof", type: "bytes32[]", }, { internalType: "uint256", name: "path", type: "uint256", }, { internalType: "bytes32", name: "item", type: "bytes32", }, ], name: "calculateMerkleRoot", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "pure", type: "function", }, { inputs: [ { internalType: "bytes32[]", name: "proof", type: "bytes32[]", }, { internalType: "uint256", name: "index", type: "uint256", }, { internalType: "address", name: "l2Sender", type: "address", }, { internalType: "address", name: "to", type: "address", }, { internalType: "uint256", name: "l2Block", type: "uint256", }, { internalType: "uint256", name: "l1Block", type: "uint256", }, { internalType: "uint256", name: "l2Timestamp", type: "uint256", }, { internalType: "uint256", name: "value", type: "uint256", }, { internalType: "bytes", name: "data", type: "bytes", }, ], name: "executeTransaction", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "", type: "uint256", }, { internalType: "address", name: "", type: "address", }, { internalType: "address", name: "", type: "address", }, { internalType: "uint256", name: "", type: "uint256", }, { internalType: "uint256", name: "", type: "uint256", }, { internalType: "uint256", name: "", type: "uint256", }, { internalType: "uint256", name: "", type: "uint256", }, { internalType: "bytes", name: "", type: "bytes", }, ], name: "executeTransactionSimulation", outputs: [], stateMutability: "pure", type: "function", }, { inputs: [ { internalType: "contract IBridge", name: "_bridge", type: "address", }, ], name: "initialize", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], name: "isSpent", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "l2ToL1BatchNum", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "pure", type: "function", }, { inputs: [], name: "l2ToL1Block", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "l2ToL1EthBlock", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "l2ToL1OutputId", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "l2ToL1Sender", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "l2ToL1Timestamp", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "postUpgradeInit", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "rollup", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], name: "roots", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], name: "spent", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "pure", type: "function", }, { inputs: [], name: "updateRollupAddress", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "bytes32", name: "root", type: "bytes32", }, { internalType: "bytes32", name: "l2BlockHash", type: "bytes32", }, ], name: "updateSendRoot", outputs: [], stateMutability: "nonpayable", type: "function", }, ]; const _bytecode = "0x60a06040523060805234801561001457600080fd5b5060805161130b61003060003960006106a2015261130b6000f3fe608060405234801561001057600080fd5b506004361061012b5760003560e01c806395fcea78116100ad578063c4d66de811610071578063c4d66de81461026d578063c75184df14610280578063cb23bcb5146102a0578063d5b5cc23146102b3578063e78cea92146102c657600080fd5b806395fcea78146101695780639f0c04bf14610216578063a04cee6014610229578063ae6dead71461023c578063b0f305371461025c57600080fd5b80635a129efe116100f45780635a129efe146101965780636ae71f12146101c957806372f2a8c7146101d157806380648b02146101d95780638515bc6a146101fe57600080fd5b80627436d31461013057806308635a9514610156578063119852711461016b578063288e5b10146101725780634654779014610185575b600080fd5b61014361013e366004610c79565b6102d9565b6040519081526020015b60405180910390f35b610169610164366004610d9e565b610316565b005b6000610143565b610169610180366004610e92565b610658565b6004546001600160801b0316610143565b6101b96101a4366004610f2d565b60026020526000908152604090205460ff1681565b604051901515815260200161014d565b610169610697565b600654610143565b6007546001600160a01b03165b6040516001600160a01b03909116815260200161014d565b600454600160801b90046001600160801b0316610143565b610143610224366004610f46565b61082c565b610169610237366004610fd4565b610871565b61014361024a366004610f2d565b60036020526000908152604090205481565b6005546001600160801b0316610143565b61016961027b366004610ff6565b6108b0565b610288600281565b6040516001600160801b03909116815260200161014d565b6000546101e6906001600160a01b031681565b6101436102c1366004610f2d565b610989565b6001546101e6906001600160a01b031681565b600061030e8484846040516020016102f391815260200190565b604051602081830303815290604052805190602001206109c5565b949350505050565b6000806103298a8a8a8a8a8a8a8a61082c565b905061036b8d8d808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508f9250859150610a689050565b915060008a6001600160a01b03168a6001600160a01b03167f20af7f3bbfe38132b8900ae295cd9c8d1914be7052d061a511f3f728dab189648e6040516103b491815260200190565b60405180910390a450600060046040518060a00160405290816000820160009054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016000820160109054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016001820160009054906101000a90046001600160801b03166001600160801b03166001600160801b03168152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152505090506040518060a00160405280896001600160801b03168152602001886001600160801b03168152602001876001600160801b031681526020018381526020018b6001600160a01b0316815250600460008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a8154816001600160801b0302191690836001600160801b0316021790555060408201518160010160006101000a8154816001600160801b0302191690836001600160801b031602179055506060820151816002015560808201518160030160006101000a8154816001600160a01b0302191690836001600160a01b031602179055509050506105e3898686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610b6b92505050565b805160208201516001600160801b03918216600160801b91831691909102176004556040820151600580546001600160801b03191691909216179055606081015160065560800151600780546001600160a01b0319166001600160a01b03909216919091179055505050505050505050505050565b60405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b5c1b195b595b9d1959608a1b60448201526064015b60405180910390fd5b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156107255760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b606482015260840161068e565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038054336001600160a01b0382161461078257604051631194af8760e11b81523360048201526001600160a01b038216602482015260440161068e565b600160009054906101000a90046001600160a01b03166001600160a01b031663cb23bcb56040518163ffffffff1660e01b815260040160206040518083038186803b1580156107d057600080fd5b505afa1580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610808919061101a565b600080546001600160a01b0319166001600160a01b03929092169190911790555050565b6000888888888888888860405160200161084d989796959493929190611037565b60405160208183030381529060405280519060200120905098975050505050505050565b60008281526003602052604080822083905551829184917fb4df3847300f076a369cd76d2314b470a1194d9e8a6bb97f1860aee88a5f67489190a35050565b6001546001600160a01b0316156108da57604051633bcd329760e21b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040805163cb23bcb560e01b8152905163cb23bcb591600480820192602092909190829003018186803b15801561092e57600080fd5b505afa158015610942573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610966919061101a565b600080546001600160a01b0319166001600160a01b039290921691909117905550565b60405162461bcd60e51b815260206004820152600e60248201526d1393d517d253541311535155115160921b604482015260009060640161068e565b82516000906101008111156109f857604051637ed6198f60e11b815260048101829052610100602482015260440161068e565b8260005b82811015610a5e576000878281518110610a1857610a18611090565b60200260200101519050816001901b871660001415610a4557826000528060205260406000209250610a55565b8060005282602052604060002092505b506001016109fc565b5095945050505050565b6000610100845110610a9257835160405163ab6a068360e01b815260040161068e91815260200190565b8351610a9f9060026111a2565b8310610ad6578284516002610ab491906111a2565b604051630b8a724b60e01b81526004810192909252602482015260440161068e565b6000610ae38585856102d9565b600081815260036020526040902054909150610b15576040516310e61af960e31b81526004810182905260240161068e565b60008481526002602052604090205460ff1615610b4857604051639715b8d360e01b81526004810185905260240161068e565b50506000828152600260205260409020805460ff19166001179055819392505050565b600154604051639e5d4c4960e01b815260009182916001600160a01b0390911690639e5d4c4990610ba4908890889088906004016111de565b600060405180830381600087803b158015610bbe57600080fd5b505af1158015610bd2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bfa9190810190611227565b9150915081610c2c57805115610c135780518082602001fd5b604051631bb7daad60e11b815260040160405180910390fd5b5050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715610c7157610c71610c33565b604052919050565b600080600060608486031215610c8e57600080fd5b83356001600160401b0380821115610ca557600080fd5b818601915086601f830112610cb957600080fd5b8135602082821115610ccd57610ccd610c33565b8160051b9250610cde818401610c49565b828152928401810192818101908a851115610cf857600080fd5b948201945b84861015610d1657853582529482019490820190610cfd565b9a918901359950506040909701359695505050505050565b6001600160a01b0381168114610d4357600080fd5b50565b8035610d5181610d2e565b919050565b60008083601f840112610d6857600080fd5b5081356001600160401b03811115610d7f57600080fd5b602083019150836020828501011115610d9757600080fd5b9250929050565b60008060008060008060008060008060006101208c8e031215610dc057600080fd5b8b356001600160401b0380821115610dd757600080fd5b818e0191508e601f830112610deb57600080fd5b813581811115610dfa57600080fd5b8f60208260051b8501011115610e0f57600080fd5b60208381019e50909c508e01359a50610e2a60408f01610d46565b9950610e3860608f01610d46565b985060808e0135975060a08e0135965060c08e0135955060e08e013594506101008e0135915080821115610e6b57600080fd5b50610e788e828f01610d56565b915080935050809150509295989b509295989b9093969950565b60008060008060008060008060006101008a8c031215610eb157600080fd5b8935985060208a0135610ec381610d2e565b975060408a0135610ed381610d2e565b965060608a0135955060808a0135945060a08a0135935060c08a0135925060e08a01356001600160401b03811115610f0a57600080fd5b610f168c828d01610d56565b915080935050809150509295985092959850929598565b600060208284031215610f3f57600080fd5b5035919050565b60008060008060008060008060e0898b031215610f6257600080fd5b8835610f6d81610d2e565b97506020890135610f7d81610d2e565b965060408901359550606089013594506080890135935060a0890135925060c08901356001600160401b03811115610fb457600080fd5b610fc08b828c01610d56565b999c989b5096995094979396929594505050565b60008060408385031215610fe757600080fd5b50508035926020909101359150565b60006020828403121561100857600080fd5b813561101381610d2e565b9392505050565b60006020828403121561102c57600080fd5b815161101381610d2e565b60006bffffffffffffffffffffffff19808b60601b168352808a60601b16601484015250876028830152866048830152856068830152846088830152828460a8840137506000910160a801908152979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600181815b808511156110f75781600019048211156110dd576110dd6110a6565b808516156110ea57918102915b93841c93908002906110c1565b509250929050565b60008261110e5750600161119c565b8161111b5750600061119c565b8160018114611131576002811461113b57611157565b600191505061119c565b60ff84111561114c5761114c6110a6565b50506001821b61119c565b5060208310610133831016604e8410600b841016171561117a575081810a61119c565b61118483836110bc565b8060001904821115611198576111986110a6565b0290505b92915050565b600061101383836110ff565b60005b838110156111c95781810151838201526020016111b1565b838111156111d8576000848401525b50505050565b60018060a01b038416815282602082015260606040820152600082518060608401526112118160808501602087016111ae565b601f01601f191691909101608001949350505050565b6000806040838503121561123a57600080fd5b8251801515811461124a57600080fd5b60208401519092506001600160401b038082111561126757600080fd5b818501915085601f83011261127b57600080fd5b81518181111561128d5761128d610c33565b6112a0601f8201601f1916602001610c49565b91508082528660208285010111156112b757600080fd5b6112c88160208401602086016111ae565b508092505050925092905056fea2646970667358221220bad02150430a4bc3f4e359d31d8804df2f91dec1579d7433a1e7d1de70600cf164736f6c63430008090033"; const isSuperArgs = (xs) => xs.length > 1; class OutboxWithoutOptTester__factory extends ethers_1.ContractFactory { constructor(...args) { if (isSuperArgs(args)) { super(...args); } else { super(_abi, _bytecode, args[0]); } this.contractName = "OutboxWithoutOptTester"; } deploy(overrides) { return super.deploy(overrides || {}); } getDeployTransaction(overrides) { return super.getDeployTransaction(overrides || {}); } attach(address) { return super.attach(address); } connect(signer) { return super.connect(signer); } static createInterface() { return new ethers_1.utils.Interface(_abi); } static connect(address, signerOrProvider) { return new ethers_1.Contract(address, _abi, signerOrProvider); } } exports.OutboxWithoutOptTester__factory = OutboxWithoutOptTester__factory; OutboxWithoutOptTester__factory.bytecode = _bytecode; OutboxWithoutOptTester__factory.abi = _abi;