diff --git a/packages/contracts-ts/abis.json b/packages/contracts-ts/abis.json index 9e1fc81174b7b..d224a6b6f1ba7 100644 --- a/packages/contracts-ts/abis.json +++ b/packages/contracts-ts/abis.json @@ -4727,122 +4727,4281 @@ "outputs": [] } ], - "MintManager": [ + "AssetReceiver": [ { "stateMutability": "nonpayable", "type": "constructor", "inputs": [ { - "name": "_upgrader", + "name": "_owner", "internalType": "address", "type": "address" + } + ] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "user", + "internalType": "address", + "type": "address", + "indexed": true }, { - "name": "_governanceToken", + "name": "newOwner", "internalType": "address", - "type": "address" + "type": "address", + "indexed": true } - ] + ], + "name": "OwnerUpdated" }, { "type": "event", "anonymous": false, "inputs": [ { - "name": "previousOwner", + "name": "from", "internalType": "address", "type": "address", "indexed": true }, { - "name": "newOwner", + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "ReceivedETH" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "asset", "internalType": "address", "type": "address", "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false } ], - "name": "OwnershipTransferred" + "name": "WithdrewERC20" }, { - "stateMutability": "view", + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "asset", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "id", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewERC721" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewETH" + }, + { + "stateMutability": "payable", "type": "function", - "inputs": [], - "name": "DENOMINATOR", + "inputs": [ + { + "name": "_target", + "internalType": "address", + "type": "address" + }, + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "_gas", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "_value", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "CALL", "outputs": [ { "name": "", + "internalType": "bool", + "type": "bool" + }, + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "payable", + "type": "function", + "inputs": [ + { + "name": "_target", + "internalType": "address", + "type": "address" + }, + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "_gas", "internalType": "uint256", "type": "uint256" } + ], + "name": "DELEGATECALL", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + }, + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } ] }, { "stateMutability": "view", "type": "function", "inputs": [], - "name": "MINT_CAP", + "name": "owner", "outputs": [ { "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "newOwner", + "internalType": "address", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC20", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_amount", "internalType": "uint256", "type": "uint256" } - ] + ], + "name": "withdrawERC20", + "outputs": [] }, { - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function", - "inputs": [], - "name": "MINT_PERIOD", - "outputs": [ + "inputs": [ { - "name": "", + "name": "_asset", + "internalType": "contract ERC20", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + } + ], + "name": "withdrawERC20", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC721", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_id", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawERC721", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_to", + "internalType": "address payable", + "type": "address" + }, + { + "name": "_amount", "internalType": "uint256", "type": "uint256" } + ], + "name": "withdrawETH", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_to", + "internalType": "address payable", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [] + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "CheckBalanceHigh": [ + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "params", + "internalType": "struct CheckBalanceHigh.Params", + "type": "tuple", + "components": [ + { + "name": "target", + "internalType": "address", + "type": "address" + }, + { + "name": "threshold", + "internalType": "uint256", + "type": "uint256" + } + ], + "indexed": false + } + ], + "name": "_EventToExposeStructInABI__Params" + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "_params", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "check", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + } + ], + "CheckBalanceLow": [ + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "params", + "internalType": "struct CheckBalanceLow.Params", + "type": "tuple", + "components": [ + { + "name": "target", + "internalType": "address", + "type": "address" + }, + { + "name": "threshold", + "internalType": "uint256", + "type": "uint256" + } + ], + "indexed": false + } + ], + "name": "_EventToExposeStructInABI__Params" + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "_params", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "check", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + } + ], + "CheckGelatoLow": [ + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "params", + "internalType": "struct CheckGelatoLow.Params", + "type": "tuple", + "components": [ + { + "name": "treasury", + "internalType": "address", + "type": "address" + }, + { + "name": "threshold", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "recipient", + "internalType": "address", + "type": "address" + } + ], + "indexed": false + } + ], + "name": "_EventToExposeStructInABI__Params" + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "_params", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "check", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + } + ], + "CheckTrue": [ + { + "stateMutability": "pure", + "type": "function", + "inputs": [ + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "check", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + } + ], + "Drippie": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_owner", + "internalType": "address", + "type": "address" + } + ] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "nameref", + "internalType": "string", + "type": "string", + "indexed": true + }, + { + "name": "name", + "internalType": "string", + "type": "string", + "indexed": false + }, + { + "name": "config", + "internalType": "struct Drippie.DripConfig", + "type": "tuple", + "components": [ + { + "name": "reentrant", + "internalType": "bool", + "type": "bool" + }, + { + "name": "interval", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "dripcheck", + "internalType": "contract IDripCheck", + "type": "address" + }, + { + "name": "checkparams", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "actions", + "internalType": "struct Drippie.DripAction[]", + "type": "tuple[]", + "components": [ + { + "name": "target", + "internalType": "address payable", + "type": "address" + }, + { + "name": "data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "value", + "internalType": "uint256", + "type": "uint256" + } + ] + } + ], + "indexed": false + } + ], + "name": "DripCreated" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "nameref", + "internalType": "string", + "type": "string", + "indexed": true + }, + { + "name": "name", + "internalType": "string", + "type": "string", + "indexed": false + }, + { + "name": "executor", + "internalType": "address", + "type": "address", + "indexed": false + }, + { + "name": "timestamp", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "DripExecuted" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "nameref", + "internalType": "string", + "type": "string", + "indexed": true + }, + { + "name": "name", + "internalType": "string", + "type": "string", + "indexed": false + }, + { + "name": "status", + "internalType": "enum Drippie.DripStatus", + "type": "uint8", + "indexed": false + } + ], + "name": "DripStatusUpdated" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "user", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "newOwner", + "internalType": "address", + "type": "address", + "indexed": true + } + ], + "name": "OwnerUpdated" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "from", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "ReceivedETH" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "asset", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewERC20" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "asset", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "id", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewERC721" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewETH" + }, + { + "stateMutability": "payable", + "type": "function", + "inputs": [ + { + "name": "_target", + "internalType": "address", + "type": "address" + }, + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "_value", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "CALL", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + }, + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "payable", + "type": "function", + "inputs": [ + { + "name": "_target", + "internalType": "address", + "type": "address" + }, + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "DELEGATECALL", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + }, + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + }, + { + "name": "_config", + "internalType": "struct Drippie.DripConfig", + "type": "tuple", + "components": [ + { + "name": "reentrant", + "internalType": "bool", + "type": "bool" + }, + { + "name": "interval", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "dripcheck", + "internalType": "contract IDripCheck", + "type": "address" + }, + { + "name": "checkparams", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "actions", + "internalType": "struct Drippie.DripAction[]", + "type": "tuple[]", + "components": [ + { + "name": "target", + "internalType": "address payable", + "type": "address" + }, + { + "name": "data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "value", + "internalType": "uint256", + "type": "uint256" + } + ] + } + ] + } + ], + "name": "create", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + } + ], + "name": "drip", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ], + "name": "drips", + "outputs": [ + { + "name": "status", + "internalType": "enum Drippie.DripStatus", + "type": "uint8" + }, + { + "name": "config", + "internalType": "struct Drippie.DripConfig", + "type": "tuple", + "components": [ + { + "name": "reentrant", + "internalType": "bool", + "type": "bool" + }, + { + "name": "interval", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "dripcheck", + "internalType": "contract IDripCheck", + "type": "address" + }, + { + "name": "checkparams", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "actions", + "internalType": "struct Drippie.DripAction[]", + "type": "tuple[]", + "components": [ + { + "name": "target", + "internalType": "address payable", + "type": "address" + }, + { + "name": "data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "value", + "internalType": "uint256", + "type": "uint256" + } + ] + } + ] + }, + { + "name": "last", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "count", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + } + ], + "name": "executable", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "newOwner", + "internalType": "address", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + }, + { + "name": "_status", + "internalType": "enum Drippie.DripStatus", + "type": "uint8" + } + ], + "name": "status", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC20", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_amount", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawERC20", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC20", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + } + ], + "name": "withdrawERC20", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC721", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_id", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawERC721", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_to", + "internalType": "address payable", + "type": "address" + }, + { + "name": "_amount", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_to", + "internalType": "address payable", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [] + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "Drippie_goerli": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_owner", + "internalType": "address", + "type": "address" + } + ] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "nameref", + "internalType": "string", + "type": "string", + "indexed": true + }, + { + "name": "name", + "internalType": "string", + "type": "string", + "indexed": false + }, + { + "name": "config", + "internalType": "struct Drippie.DripConfig", + "type": "tuple", + "components": [ + { + "name": "reentrant", + "internalType": "bool", + "type": "bool" + }, + { + "name": "interval", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "dripcheck", + "internalType": "contract IDripCheck", + "type": "address" + }, + { + "name": "checkparams", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "actions", + "internalType": "struct Drippie.DripAction[]", + "type": "tuple[]", + "components": [ + { + "name": "target", + "internalType": "address payable", + "type": "address" + }, + { + "name": "data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "value", + "internalType": "uint256", + "type": "uint256" + } + ] + } + ], + "indexed": false + } + ], + "name": "DripCreated" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "nameref", + "internalType": "string", + "type": "string", + "indexed": true + }, + { + "name": "name", + "internalType": "string", + "type": "string", + "indexed": false + }, + { + "name": "executor", + "internalType": "address", + "type": "address", + "indexed": false + }, + { + "name": "timestamp", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "DripExecuted" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "nameref", + "internalType": "string", + "type": "string", + "indexed": true + }, + { + "name": "name", + "internalType": "string", + "type": "string", + "indexed": false + }, + { + "name": "status", + "internalType": "enum Drippie.DripStatus", + "type": "uint8", + "indexed": false + } + ], + "name": "DripStatusUpdated" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "user", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "newOwner", + "internalType": "address", + "type": "address", + "indexed": true + } + ], + "name": "OwnerUpdated" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "from", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "ReceivedETH" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "asset", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewERC20" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "asset", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "id", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewERC721" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewETH" + }, + { + "stateMutability": "payable", + "type": "function", + "inputs": [ + { + "name": "_target", + "internalType": "address", + "type": "address" + }, + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "_value", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "CALL", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + }, + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "payable", + "type": "function", + "inputs": [ + { + "name": "_target", + "internalType": "address", + "type": "address" + }, + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "DELEGATECALL", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + }, + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + }, + { + "name": "_config", + "internalType": "struct Drippie.DripConfig", + "type": "tuple", + "components": [ + { + "name": "reentrant", + "internalType": "bool", + "type": "bool" + }, + { + "name": "interval", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "dripcheck", + "internalType": "contract IDripCheck", + "type": "address" + }, + { + "name": "checkparams", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "actions", + "internalType": "struct Drippie.DripAction[]", + "type": "tuple[]", + "components": [ + { + "name": "target", + "internalType": "address payable", + "type": "address" + }, + { + "name": "data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "value", + "internalType": "uint256", + "type": "uint256" + } + ] + } + ] + } + ], + "name": "create", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + } + ], + "name": "drip", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ], + "name": "drips", + "outputs": [ + { + "name": "status", + "internalType": "enum Drippie.DripStatus", + "type": "uint8" + }, + { + "name": "config", + "internalType": "struct Drippie.DripConfig", + "type": "tuple", + "components": [ + { + "name": "reentrant", + "internalType": "bool", + "type": "bool" + }, + { + "name": "interval", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "dripcheck", + "internalType": "contract IDripCheck", + "type": "address" + }, + { + "name": "checkparams", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "actions", + "internalType": "struct Drippie.DripAction[]", + "type": "tuple[]", + "components": [ + { + "name": "target", + "internalType": "address payable", + "type": "address" + }, + { + "name": "data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "value", + "internalType": "uint256", + "type": "uint256" + } + ] + } + ] + }, + { + "name": "last", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "count", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + } + ], + "name": "executable", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "newOwner", + "internalType": "address", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + }, + { + "name": "_status", + "internalType": "enum Drippie.DripStatus", + "type": "uint8" + } + ], + "name": "status", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC20", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_amount", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawERC20", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC20", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + } + ], + "name": "withdrawERC20", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC721", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_id", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawERC721", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_to", + "internalType": "address payable", + "type": "address" + }, + { + "name": "_amount", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_to", + "internalType": "address payable", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [] + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "Drippie_optimism-goerli": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_owner", + "internalType": "address", + "type": "address" + } + ] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "nameref", + "internalType": "string", + "type": "string", + "indexed": true + }, + { + "name": "name", + "internalType": "string", + "type": "string", + "indexed": false + }, + { + "name": "config", + "internalType": "struct Drippie.DripConfig", + "type": "tuple", + "components": [ + { + "name": "interval", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "dripcheck", + "internalType": "contract IDripCheck", + "type": "address" + }, + { + "name": "checkparams", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "actions", + "internalType": "struct Drippie.DripAction[]", + "type": "tuple[]", + "components": [ + { + "name": "target", + "internalType": "address payable", + "type": "address" + }, + { + "name": "data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "value", + "internalType": "uint256", + "type": "uint256" + } + ] + } + ], + "indexed": false + } + ], + "name": "DripCreated" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "nameref", + "internalType": "string", + "type": "string", + "indexed": true + }, + { + "name": "name", + "internalType": "string", + "type": "string", + "indexed": false + }, + { + "name": "executor", + "internalType": "address", + "type": "address", + "indexed": false + }, + { + "name": "timestamp", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "DripExecuted" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "nameref", + "internalType": "string", + "type": "string", + "indexed": true + }, + { + "name": "name", + "internalType": "string", + "type": "string", + "indexed": false + }, + { + "name": "status", + "internalType": "enum Drippie.DripStatus", + "type": "uint8", + "indexed": false + } + ], + "name": "DripStatusUpdated" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "user", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "newOwner", + "internalType": "address", + "type": "address", + "indexed": true + } + ], + "name": "OwnerUpdated" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "from", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "ReceivedETH" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "asset", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewERC20" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "asset", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "id", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewERC721" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewETH" + }, + { + "stateMutability": "payable", + "type": "function", + "inputs": [ + { + "name": "_target", + "internalType": "address", + "type": "address" + }, + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "_gas", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "_value", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "CALL", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + }, + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "payable", + "type": "function", + "inputs": [ + { + "name": "_target", + "internalType": "address", + "type": "address" + }, + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "_gas", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "DELEGATECALL", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + }, + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + }, + { + "name": "_config", + "internalType": "struct Drippie.DripConfig", + "type": "tuple", + "components": [ + { + "name": "interval", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "dripcheck", + "internalType": "contract IDripCheck", + "type": "address" + }, + { + "name": "checkparams", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "actions", + "internalType": "struct Drippie.DripAction[]", + "type": "tuple[]", + "components": [ + { + "name": "target", + "internalType": "address payable", + "type": "address" + }, + { + "name": "data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "value", + "internalType": "uint256", + "type": "uint256" + } + ] + } + ] + } + ], + "name": "create", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + } + ], + "name": "drip", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ], + "name": "drips", + "outputs": [ + { + "name": "status", + "internalType": "enum Drippie.DripStatus", + "type": "uint8" + }, + { + "name": "config", + "internalType": "struct Drippie.DripConfig", + "type": "tuple", + "components": [ + { + "name": "interval", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "dripcheck", + "internalType": "contract IDripCheck", + "type": "address" + }, + { + "name": "checkparams", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "actions", + "internalType": "struct Drippie.DripAction[]", + "type": "tuple[]", + "components": [ + { + "name": "target", + "internalType": "address payable", + "type": "address" + }, + { + "name": "data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "value", + "internalType": "uint256", + "type": "uint256" + } + ] + } + ] + }, + { + "name": "last", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "count", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + } + ], + "name": "executable", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "newOwner", + "internalType": "address", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + }, + { + "name": "_status", + "internalType": "enum Drippie.DripStatus", + "type": "uint8" + } + ], + "name": "status", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC20", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_amount", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawERC20", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC20", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + } + ], + "name": "withdrawERC20", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC721", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_id", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawERC721", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_to", + "internalType": "address payable", + "type": "address" + }, + { + "name": "_amount", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_to", + "internalType": "address payable", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [] + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "TeleportrWithdrawer": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_owner", + "internalType": "address", + "type": "address" + } + ] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "user", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "newOwner", + "internalType": "address", + "type": "address", + "indexed": true + } + ], + "name": "OwnerUpdated" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "from", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "ReceivedETH" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "asset", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewERC20" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "asset", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "id", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewERC721" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "withdrawer", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "recipient", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "amount", + "internalType": "uint256", + "type": "uint256", + "indexed": false + } + ], + "name": "WithdrewETH" + }, + { + "stateMutability": "payable", + "type": "function", + "inputs": [ + { + "name": "_target", + "internalType": "address", + "type": "address" + }, + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "_gas", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "_value", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "CALL", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + }, + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "payable", + "type": "function", + "inputs": [ + { + "name": "_target", + "internalType": "address", + "type": "address" + }, + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + }, + { + "name": "_gas", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "DELEGATECALL", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + }, + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "data", + "outputs": [ + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "recipient", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_data", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "setData", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "newOwner", + "internalType": "address", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_recipient", + "internalType": "address", + "type": "address" + } + ], + "name": "setRecipient", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_teleportr", + "internalType": "address", + "type": "address" + } + ], + "name": "setTeleportr", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "teleportr", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC20", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_amount", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawERC20", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC20", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + } + ], + "name": "withdrawERC20", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_asset", + "internalType": "contract ERC721", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_id", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawERC721", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_to", + "internalType": "address payable", + "type": "address" + }, + { + "name": "_amount", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "withdrawETH", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_to", + "internalType": "address payable", + "type": "address" + } + ], + "name": "withdrawETH", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [], + "name": "withdrawFromTeleportr", + "outputs": [] + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "MintManager": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_upgrader", + "internalType": "address", + "type": "address" + }, + { + "name": "_governanceToken", + "internalType": "address", + "type": "address" + } + ] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "previousOwner", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "newOwner", + "internalType": "address", + "type": "address", + "indexed": true + } + ], + "name": "OwnershipTransferred" + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "name": "", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "MINT_CAP", + "outputs": [ + { + "name": "", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "MINT_PERIOD", + "outputs": [ + { + "name": "", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "governanceToken", + "outputs": [ + { + "name": "", + "internalType": "contract GovernanceToken", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_account", + "internalType": "address", + "type": "address" + }, + { + "name": "_amount", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "mintPermittedAfter", + "outputs": [ + { + "name": "", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [], + "name": "renounceOwnership", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "newOwner", + "internalType": "address", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_newMintManager", + "internalType": "address", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [] + } + ], + "OptimismMintableERC721Factory": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_bridge", + "internalType": "address", + "type": "address" + }, + { + "name": "_remoteChainId", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "localToken", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "remoteToken", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "deployer", + "internalType": "address", + "type": "address", + "indexed": false + } + ], + "name": "OptimismMintableERC721Created" + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "bridge", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_remoteToken", + "internalType": "address", + "type": "address" + }, + { + "name": "_name", + "internalType": "string", + "type": "string" + }, + { + "name": "_symbol", + "internalType": "string", + "type": "string" + } + ], + "name": "createOptimismMintableERC721", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ], + "name": "isOptimismMintableERC721", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "remoteChainId", + "outputs": [ + { + "name": "", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "version", + "outputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ] + } + ], + "OptimismMintableERC721Factory_optimism-goerli": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_bridge", + "internalType": "address", + "type": "address" + }, + { + "name": "_remoteChainId", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "localToken", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "remoteToken", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "deployer", + "internalType": "address", + "type": "address", + "indexed": false + } + ], + "name": "OptimismMintableERC721Created" + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "BRIDGE", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "REMOTE_CHAIN_ID", + "outputs": [ + { + "name": "", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_remoteToken", + "internalType": "address", + "type": "address" + }, + { + "name": "_name", + "internalType": "string", + "type": "string" + }, + { + "name": "_symbol", + "internalType": "string", + "type": "string" + } + ], + "name": "createOptimismMintableERC721", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ], + "name": "isOptimismMintableERC721", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "version", + "outputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ] + } + ], + "AttestationStation": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "creator", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "about", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "key", + "internalType": "bytes32", + "type": "bytes32", + "indexed": true + }, + { + "name": "val", + "internalType": "bytes", + "type": "bytes", + "indexed": false + } + ], + "name": "AttestationCreated" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_attestations", + "internalType": "struct AttestationStation.AttestationData[]", + "type": "tuple[]", + "components": [ + { + "name": "about", + "internalType": "address", + "type": "address" + }, + { + "name": "key", + "internalType": "bytes32", + "type": "bytes32" + }, + { + "name": "val", + "internalType": "bytes", + "type": "bytes" + } + ] + } + ], + "name": "attest", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_about", + "internalType": "address", + "type": "address" + }, + { + "name": "_key", + "internalType": "bytes32", + "type": "bytes32" + }, + { + "name": "_val", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "attest", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + }, + { + "name": "", + "internalType": "address", + "type": "address" + }, + { + "name": "", + "internalType": "bytes32", + "type": "bytes32" + } + ], + "name": "attestations", + "outputs": [ + { + "name": "", + "internalType": "bytes", + "type": "bytes" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "version", + "outputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ] + } + ], + "L2ERC721Bridge": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_messenger", + "internalType": "address", + "type": "address" + }, + { + "name": "_otherBridge", + "internalType": "address", + "type": "address" + } + ] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "localToken", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "remoteToken", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "from", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "to", + "internalType": "address", + "type": "address", + "indexed": false + }, + { + "name": "tokenId", + "internalType": "uint256", + "type": "uint256", + "indexed": false + }, + { + "name": "extraData", + "internalType": "bytes", + "type": "bytes", + "indexed": false + } + ], + "name": "ERC721BridgeFinalized" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "localToken", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "remoteToken", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "from", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "to", + "internalType": "address", + "type": "address", + "indexed": false + }, + { + "name": "tokenId", + "internalType": "uint256", + "type": "uint256", + "indexed": false + }, + { + "name": "extraData", + "internalType": "bytes", + "type": "bytes", + "indexed": false + } + ], + "name": "ERC721BridgeInitiated" + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_localToken", + "internalType": "address", + "type": "address" + }, + { + "name": "_remoteToken", + "internalType": "address", + "type": "address" + }, + { + "name": "_tokenId", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "_minGasLimit", + "internalType": "uint32", + "type": "uint32" + }, + { + "name": "_extraData", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "bridgeERC721", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_localToken", + "internalType": "address", + "type": "address" + }, + { + "name": "_remoteToken", + "internalType": "address", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_tokenId", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "_minGasLimit", + "internalType": "uint32", + "type": "uint32" + }, + { + "name": "_extraData", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "bridgeERC721To", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_localToken", + "internalType": "address", + "type": "address" + }, + { + "name": "_remoteToken", + "internalType": "address", + "type": "address" + }, + { + "name": "_from", + "internalType": "address", + "type": "address" + }, + { + "name": "_to", + "internalType": "address", + "type": "address" + }, + { + "name": "_tokenId", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "_extraData", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "finalizeBridgeERC721", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "messenger", + "outputs": [ + { + "name": "", + "internalType": "contract CrossDomainMessenger", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "otherBridge", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "version", + "outputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ] + } + ], + "Optimist": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + }, + { + "name": "_symbol", + "internalType": "string", + "type": "string" + }, + { + "name": "_baseURIAttestor", + "internalType": "address", + "type": "address" + }, + { + "name": "_attestationStation", + "internalType": "contract AttestationStation", + "type": "address" + }, + { + "name": "_optimistAllowlist", + "internalType": "contract OptimistAllowlist", + "type": "address" + } + ] + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "owner", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "approved", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "tokenId", + "internalType": "uint256", + "type": "uint256", + "indexed": true + } + ], + "name": "Approval" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "owner", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "operator", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "approved", + "internalType": "bool", + "type": "bool", + "indexed": false + } + ], + "name": "ApprovalForAll" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "version", + "internalType": "uint8", + "type": "uint8", + "indexed": false + } + ], + "name": "Initialized" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ + { + "name": "from", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "to", + "internalType": "address", + "type": "address", + "indexed": true + }, + { + "name": "tokenId", + "internalType": "uint256", + "type": "uint256", + "indexed": true + } + ], + "name": "Transfer" + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "ATTESTATION_STATION", + "outputs": [ + { + "name": "", + "internalType": "contract AttestationStation", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "BASE_URI_ATTESTATION_KEY", + "outputs": [ + { + "name": "", + "internalType": "bytes32", + "type": "bytes32" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "BASE_URI_ATTESTOR", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "OPTIMIST_ALLOWLIST", + "outputs": [ + { + "name": "", + "internalType": "contract OptimistAllowlist", + "type": "address" + } + ] + }, + { + "stateMutability": "pure", + "type": "function", + "inputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + }, + { + "name": "", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "owner", + "internalType": "address", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "baseURI", + "outputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "tokenId", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "tokenId", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_name", + "internalType": "string", + "type": "string" + }, + { + "name": "_symbol", + "internalType": "string", + "type": "string" + } + ], + "name": "initialize", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "owner", + "internalType": "address", + "type": "address" + }, + { + "name": "operator", + "internalType": "address", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "_recipient", + "internalType": "address", + "type": "address" + } + ], + "name": "isOnAllowList", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_recipient", + "internalType": "address", + "type": "address" + } + ], + "name": "mint", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "tokenId", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "from", + "internalType": "address", + "type": "address" + }, + { + "name": "to", + "internalType": "address", + "type": "address" + }, + { + "name": "tokenId", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "from", + "internalType": "address", + "type": "address" + }, + { + "name": "to", + "internalType": "address", + "type": "address" + }, + { + "name": "tokenId", + "internalType": "uint256", + "type": "uint256" + }, + { + "name": "data", + "internalType": "bytes", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + }, + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "interfaceId", + "internalType": "bytes4", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ] + }, + { + "stateMutability": "pure", + "type": "function", + "inputs": [ + { + "name": "_owner", + "internalType": "address", + "type": "address" + } + ], + "name": "tokenIdOfAddress", + "outputs": [ + { + "name": "", + "internalType": "uint256", + "type": "uint256" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ + { + "name": "_tokenId", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ] + }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "from", + "internalType": "address", + "type": "address" + }, + { + "name": "to", + "internalType": "address", + "type": "address" + }, + { + "name": "tokenId", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "version", + "outputs": [ + { + "name": "", + "internalType": "string", + "type": "string" + } + ] + } + ], + "OptimistAllowlist": [ + { + "stateMutability": "nonpayable", + "type": "constructor", + "inputs": [ + { + "name": "_attestationStation", + "internalType": "contract AttestationStation", + "type": "address" + }, + { + "name": "_allowlistAttestor", + "internalType": "address", + "type": "address" + }, + { + "name": "_coinbaseQuestAttestor", + "internalType": "address", + "type": "address" + }, + { + "name": "_optimistInviter", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "ALLOWLIST_ATTESTOR", + "outputs": [ + { + "name": "", + "internalType": "address", + "type": "address" + } + ] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "ATTESTATION_STATION", + "outputs": [ + { + "name": "", + "internalType": "contract AttestationStation", + "type": "address" + } ] }, { "stateMutability": "view", "type": "function", "inputs": [], - "name": "governanceToken", + "name": "COINBASE_QUEST_ATTESTOR", "outputs": [ { "name": "", - "internalType": "contract GovernanceToken", + "internalType": "address", "type": "address" } ] }, { - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function", - "inputs": [ - { - "name": "_account", - "internalType": "address", - "type": "address" - }, + "inputs": [], + "name": "COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY", + "outputs": [ { - "name": "_amount", - "internalType": "uint256", - "type": "uint256" + "name": "", + "internalType": "bytes32", + "type": "bytes32" } - ], - "name": "mint", - "outputs": [] + ] }, { "stateMutability": "view", "type": "function", "inputs": [], - "name": "mintPermittedAfter", + "name": "OPTIMIST_CAN_MINT_ATTESTATION_KEY", "outputs": [ { "name": "", - "internalType": "uint256", - "type": "uint256" + "internalType": "bytes32", + "type": "bytes32" } ] }, @@ -4850,7 +9009,7 @@ "stateMutability": "view", "type": "function", "inputs": [], - "name": "owner", + "name": "OPTIMIST_INVITER", "outputs": [ { "name": "", @@ -4860,53 +9019,52 @@ ] }, { - "stateMutability": "nonpayable", - "type": "function", - "inputs": [], - "name": "renounceOwnership", - "outputs": [] - }, - { - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function", "inputs": [ { - "name": "newOwner", + "name": "_claimer", "internalType": "address", "type": "address" } ], - "name": "transferOwnership", - "outputs": [] + "name": "isAllowedToMint", + "outputs": [ + { + "name": "", + "internalType": "bool", + "type": "bool" + } + ] }, { - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function", - "inputs": [ + "inputs": [], + "name": "version", + "outputs": [ { - "name": "_newMintManager", - "internalType": "address", - "type": "address" + "name": "", + "internalType": "string", + "type": "string" } - ], - "name": "upgrade", - "outputs": [] + ] } ], - "OptimismMintableERC721Factory": [ + "OptimistInviter": [ { "stateMutability": "nonpayable", "type": "constructor", "inputs": [ { - "name": "_bridge", + "name": "_inviteGranter", "internalType": "address", "type": "address" }, { - "name": "_remoteChainId", - "internalType": "uint256", - "type": "uint256" + "name": "_attestationStation", + "internalType": "contract AttestationStation", + "type": "address" } ] }, @@ -4915,84 +9073,69 @@ "anonymous": false, "inputs": [ { - "name": "localToken", - "internalType": "address", - "type": "address", - "indexed": true - }, + "name": "version", + "internalType": "uint8", + "type": "uint8", + "indexed": false + } + ], + "name": "Initialized" + }, + { + "type": "event", + "anonymous": false, + "inputs": [ { - "name": "remoteToken", + "name": "issuer", "internalType": "address", "type": "address", "indexed": true }, { - "name": "deployer", + "name": "claimer", "internalType": "address", "type": "address", - "indexed": false + "indexed": true } ], - "name": "OptimismMintableERC721Created" + "name": "InviteClaimed" }, { "stateMutability": "view", "type": "function", "inputs": [], - "name": "bridge", + "name": "ATTESTATION_STATION", "outputs": [ { "name": "", - "internalType": "address", + "internalType": "contract AttestationStation", "type": "address" } ] }, { - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function", - "inputs": [ - { - "name": "_remoteToken", - "internalType": "address", - "type": "address" - }, - { - "name": "_name", - "internalType": "string", - "type": "string" - }, - { - "name": "_symbol", - "internalType": "string", - "type": "string" - } - ], - "name": "createOptimismMintableERC721", + "inputs": [], + "name": "CAN_INVITE_ATTESTATION_KEY", "outputs": [ { "name": "", - "internalType": "address", - "type": "address" + "internalType": "bytes32", + "type": "bytes32" } ] }, { "stateMutability": "view", "type": "function", - "inputs": [ - { - "name": "", - "internalType": "address", - "type": "address" - } - ], - "name": "isOptimismMintableERC721", + "inputs": [], + "name": "CLAIMABLE_INVITE_TYPEHASH", "outputs": [ { "name": "", - "internalType": "bool", - "type": "bool" + "internalType": "bytes32", + "type": "bytes32" } ] }, @@ -5000,12 +9143,12 @@ "stateMutability": "view", "type": "function", "inputs": [], - "name": "remoteChainId", + "name": "EIP712_VERSION", "outputs": [ { "name": "", - "internalType": "uint256", - "type": "uint256" + "internalType": "string", + "type": "string" } ] }, @@ -5013,76 +9156,87 @@ "stateMutability": "view", "type": "function", "inputs": [], - "name": "version", + "name": "INVITE_GRANTER", "outputs": [ { "name": "", - "internalType": "string", - "type": "string" + "internalType": "address", + "type": "address" } ] - } - ], - "OptimismMintableERC721Factory_optimism-goerli": [ + }, { - "stateMutability": "nonpayable", - "type": "constructor", - "inputs": [ - { - "name": "_bridge", - "internalType": "address", - "type": "address" - }, + "stateMutability": "view", + "type": "function", + "inputs": [], + "name": "MIN_COMMITMENT_PERIOD", + "outputs": [ { - "name": "_remoteChainId", + "name": "", "internalType": "uint256", "type": "uint256" } ] }, { - "type": "event", - "anonymous": false, + "stateMutability": "nonpayable", + "type": "function", "inputs": [ { - "name": "localToken", + "name": "_claimer", "internalType": "address", - "type": "address", - "indexed": true + "type": "address" }, { - "name": "remoteToken", - "internalType": "address", - "type": "address", - "indexed": true + "name": "_claimableInvite", + "internalType": "struct OptimistInviter.ClaimableInvite", + "type": "tuple", + "components": [ + { + "name": "issuer", + "internalType": "address", + "type": "address" + }, + { + "name": "nonce", + "internalType": "bytes32", + "type": "bytes32" + } + ] }, { - "name": "deployer", - "internalType": "address", - "type": "address", - "indexed": false + "name": "_signature", + "internalType": "bytes", + "type": "bytes" } ], - "name": "OptimismMintableERC721Created" + "name": "claimInvite", + "outputs": [] }, { - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function", - "inputs": [], - "name": "BRIDGE", - "outputs": [ + "inputs": [ { - "name": "", - "internalType": "address", - "type": "address" + "name": "_commitment", + "internalType": "bytes32", + "type": "bytes32" } - ] + ], + "name": "commitInvite", + "outputs": [] }, { "stateMutability": "view", "type": "function", - "inputs": [], - "name": "REMOTE_CHAIN_ID", + "inputs": [ + { + "name": "", + "internalType": "bytes32", + "type": "bytes32" + } + ], + "name": "commitmentTimestamps", "outputs": [ { "name": "", @@ -5095,31 +9249,52 @@ "stateMutability": "nonpayable", "type": "function", "inputs": [ - { - "name": "_remoteToken", - "internalType": "address", - "type": "address" - }, { "name": "_name", "internalType": "string", "type": "string" - }, - { - "name": "_symbol", - "internalType": "string", - "type": "string" } ], - "name": "createOptimismMintableERC721", - "outputs": [ + "name": "initialize", + "outputs": [] + }, + { + "stateMutability": "view", + "type": "function", + "inputs": [ { "name": "", "internalType": "address", "type": "address" } + ], + "name": "inviteCounts", + "outputs": [ + { + "name": "", + "internalType": "uint256", + "type": "uint256" + } ] }, + { + "stateMutability": "nonpayable", + "type": "function", + "inputs": [ + { + "name": "_accounts", + "internalType": "address[]", + "type": "address[]" + }, + { + "name": "_inviteCount", + "internalType": "uint256", + "type": "uint256" + } + ], + "name": "setInviteCounts", + "outputs": [] + }, { "stateMutability": "view", "type": "function", @@ -5128,9 +9303,14 @@ "name": "", "internalType": "address", "type": "address" + }, + { + "name": "", + "internalType": "bytes32", + "type": "bytes32" } ], - "name": "isOptimismMintableERC721", + "name": "usedNonces", "outputs": [ { "name": "", @@ -6083,258 +10263,6 @@ ] } ], - "L2ERC721Bridge": [ - { - "stateMutability": "nonpayable", - "type": "constructor", - "inputs": [ - { - "name": "_messenger", - "internalType": "address", - "type": "address" - }, - { - "name": "_otherBridge", - "internalType": "address", - "type": "address" - } - ] - }, - { - "type": "event", - "anonymous": false, - "inputs": [ - { - "name": "localToken", - "internalType": "address", - "type": "address", - "indexed": true - }, - { - "name": "remoteToken", - "internalType": "address", - "type": "address", - "indexed": true - }, - { - "name": "from", - "internalType": "address", - "type": "address", - "indexed": true - }, - { - "name": "to", - "internalType": "address", - "type": "address", - "indexed": false - }, - { - "name": "tokenId", - "internalType": "uint256", - "type": "uint256", - "indexed": false - }, - { - "name": "extraData", - "internalType": "bytes", - "type": "bytes", - "indexed": false - } - ], - "name": "ERC721BridgeFinalized" - }, - { - "type": "event", - "anonymous": false, - "inputs": [ - { - "name": "localToken", - "internalType": "address", - "type": "address", - "indexed": true - }, - { - "name": "remoteToken", - "internalType": "address", - "type": "address", - "indexed": true - }, - { - "name": "from", - "internalType": "address", - "type": "address", - "indexed": true - }, - { - "name": "to", - "internalType": "address", - "type": "address", - "indexed": false - }, - { - "name": "tokenId", - "internalType": "uint256", - "type": "uint256", - "indexed": false - }, - { - "name": "extraData", - "internalType": "bytes", - "type": "bytes", - "indexed": false - } - ], - "name": "ERC721BridgeInitiated" - }, - { - "stateMutability": "nonpayable", - "type": "function", - "inputs": [ - { - "name": "_localToken", - "internalType": "address", - "type": "address" - }, - { - "name": "_remoteToken", - "internalType": "address", - "type": "address" - }, - { - "name": "_tokenId", - "internalType": "uint256", - "type": "uint256" - }, - { - "name": "_minGasLimit", - "internalType": "uint32", - "type": "uint32" - }, - { - "name": "_extraData", - "internalType": "bytes", - "type": "bytes" - } - ], - "name": "bridgeERC721", - "outputs": [] - }, - { - "stateMutability": "nonpayable", - "type": "function", - "inputs": [ - { - "name": "_localToken", - "internalType": "address", - "type": "address" - }, - { - "name": "_remoteToken", - "internalType": "address", - "type": "address" - }, - { - "name": "_to", - "internalType": "address", - "type": "address" - }, - { - "name": "_tokenId", - "internalType": "uint256", - "type": "uint256" - }, - { - "name": "_minGasLimit", - "internalType": "uint32", - "type": "uint32" - }, - { - "name": "_extraData", - "internalType": "bytes", - "type": "bytes" - } - ], - "name": "bridgeERC721To", - "outputs": [] - }, - { - "stateMutability": "nonpayable", - "type": "function", - "inputs": [ - { - "name": "_localToken", - "internalType": "address", - "type": "address" - }, - { - "name": "_remoteToken", - "internalType": "address", - "type": "address" - }, - { - "name": "_from", - "internalType": "address", - "type": "address" - }, - { - "name": "_to", - "internalType": "address", - "type": "address" - }, - { - "name": "_tokenId", - "internalType": "uint256", - "type": "uint256" - }, - { - "name": "_extraData", - "internalType": "bytes", - "type": "bytes" - } - ], - "name": "finalizeBridgeERC721", - "outputs": [] - }, - { - "stateMutability": "view", - "type": "function", - "inputs": [], - "name": "messenger", - "outputs": [ - { - "name": "", - "internalType": "contract CrossDomainMessenger", - "type": "address" - } - ] - }, - { - "stateMutability": "view", - "type": "function", - "inputs": [], - "name": "otherBridge", - "outputs": [ - { - "name": "", - "internalType": "address", - "type": "address" - } - ] - }, - { - "stateMutability": "view", - "type": "function", - "inputs": [], - "name": "version", - "outputs": [ - { - "name": "", - "internalType": "string", - "type": "string" - } - ] - } - ], "L2StandardBridge": [ { "stateMutability": "nonpayable", diff --git a/packages/contracts-ts/addresses.json b/packages/contracts-ts/addresses.json index 7531520892f4a..cc67969ace583 100644 --- a/packages/contracts-ts/addresses.json +++ b/packages/contracts-ts/addresses.json @@ -46,6 +46,42 @@ "SystemDictator_goerli": { "5": "0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971" }, + "AssetReceiver": { + "1": "0x15DdA60616Ffca20371ED1659dBB78E888f65556", + "10": "0x15DdA60616Ffca20371ED1659dBB78E888f65556" + }, + "CheckBalanceHigh": { + "1": "0x7eC64a8a591bFf829ff6C8be76074D540ACb813F", + "5": "0x7eC64a8a591bFf829ff6C8be76074D540ACb813F", + "420": "0x5d7103853f12109A7d27F118e54BbC654ad847E9" + }, + "CheckBalanceLow": { + "1": "0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640", + "5": "0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640", + "420": "0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474" + }, + "CheckGelatoLow": { + "1": "0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa", + "5": "0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa", + "420": "0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862" + }, + "CheckTrue": { + "1": "0x5c741a38cb11424711231777D71689C458eE835D", + "5": "0x5c741a38cb11424711231777D71689C458eE835D", + "420": "0x47443D0C184e022F19BD1578F5bca6B8a9F58E32" + }, + "Drippie": { + "1": "0x44b3A2a040057eBafC601A78647e805fd58B1f50" + }, + "Drippie_goerli": { + "5": "0x44b3A2a040057eBafC601A78647e805fd58B1f50" + }, + "Drippie_optimism-goerli": { + "420": "0x8D8d533C16D23847EB04EEB0925be8900Dd3af86" + }, + "TeleportrWithdrawer": { + "1": "0x78A25524D90E3D0596558fb43789bD800a5c3007" + }, "MintManager": { "10": "0x5C4e7Ba1E219E47948e6e3F55019A647bA501005", "420": "0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76" @@ -56,6 +92,26 @@ "OptimismMintableERC721Factory_optimism-goerli": { "420": "0x4200000000000000000000000000000000000017" }, + "AttestationStation": { + "10": "0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77", + "420": "0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77" + }, + "L2ERC721Bridge": { + "10": "0x4200000000000000000000000000000000000014", + "420": "0x4200000000000000000000000000000000000014" + }, + "Optimist": { + "10": "0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5", + "420": "0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5" + }, + "OptimistAllowlist": { + "10": "0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180", + "420": "0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180" + }, + "OptimistInviter": { + "10": "0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929", + "420": "0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929" + }, "BaseFeeVault": { "420": "0x4200000000000000000000000000000000000019" }, @@ -71,9 +127,6 @@ "L2CrossDomainMessenger": { "420": "0x4200000000000000000000000000000000000007" }, - "L2ERC721Bridge": { - "420": "0x4200000000000000000000000000000000000014" - }, "L2StandardBridge": { "420": "0x4200000000000000000000000000000000000010" }, diff --git a/packages/contracts-ts/package.json b/packages/contracts-ts/package.json index 2a4bd487dd8c9..d2bbc9307b357 100644 --- a/packages/contracts-ts/package.json +++ b/packages/contracts-ts/package.json @@ -36,7 +36,7 @@ ], "scripts": { "build": "tsup", - "generate": "nx build @eth-optimism/contracts-bedrock && wagmi generate && pnpm build && pnpm lint:fix", + "generate": "nx build @eth-optimism/contracts-bedrock && nx build @eth-optimism/contracts-periphery && wagmi generate && pnpm build && pnpm lint:fix", "generate:check": "pnpm generate && git diff --exit-code ./addresses.json && git diff --exit-code ./abis.json", "lint": "prettier --check .", "lint:fix": "prettier --write .", @@ -45,7 +45,8 @@ "typecheck": "tsc --noEmit" }, "devDependencies": { - "@eth-optimism/contracts-bedrock": "workspace:0.15.0", + "@eth-optimism/contracts-bedrock": "workspace:*", + "@eth-optimism/contracts-periphery": "workspace:*", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react-hooks": "^8.0.1", "@types/glob": "^8.1.0", diff --git a/packages/contracts-ts/src/actions.ts b/packages/contracts-ts/src/actions.ts index e0841f6f18792..bcf97e8e200b8 100644 --- a/packages/contracts-ts/src/actions.ts +++ b/packages/contracts-ts/src/actions.ts @@ -1,4 +1,4 @@ -// Generated by @wagmi/cli@1.3.0 on 7/13/2023 at 5:05:37 PM +// Generated by @wagmi/cli@1.3.0 on 7/14/2023 at 10:11:27 AM import { getContract, GetContractArgs, @@ -3397,1866 +3397,5947 @@ export const systemDictatorGoerliConfig = { } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// MintManager +// AssetReceiver ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export const mintManagerABI = [ +export const assetReceiverABI = [ { stateMutability: 'nonpayable', type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, inputs: [ - { name: '_upgrader', internalType: 'address', type: 'address' }, - { name: '_governanceToken', internalType: 'address', type: 'address' }, + { name: 'user', internalType: 'address', type: 'address', indexed: true }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, ], + name: 'OwnerUpdated', }, { type: 'event', anonymous: false, inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, { - name: 'previousOwner', + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'ReceivedETH', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'newOwner', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], - name: 'OwnershipTransferred', + name: 'WithdrewERC20', }, { - stateMutability: 'view', + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, + ], + name: 'WithdrewERC721', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewETH', + }, + { + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'DENOMINATOR', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'MINT_CAP', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MINT_PERIOD', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'governanceToken', - outputs: [ - { name: '', internalType: 'contract GovernanceToken', type: 'address' }, - ], + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_account', internalType: 'address', type: 'address' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, { name: '_amount', internalType: 'uint256', type: 'uint256' }, ], - name: 'mint', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'mintPermittedAfter', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'owner', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + ], + name: 'withdrawERC20', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'renounceOwnership', + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], - name: 'transferOwnership', + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_newMintManager', internalType: 'address', type: 'address' }, - ], - name: 'upgrade', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, ] as const /** - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export const mintManagerAddress = { - 10: '0x5C4e7Ba1E219E47948e6e3F55019A647bA501005', - 420: '0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76', +export const assetReceiverAddress = { + 1: '0x15DdA60616Ffca20371ED1659dBB78E888f65556', + 10: '0x15DdA60616Ffca20371ED1659dBB78E888f65556', } as const /** - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export const mintManagerConfig = { - address: mintManagerAddress, - abi: mintManagerABI, +export const assetReceiverConfig = { + address: assetReceiverAddress, + abi: assetReceiverABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// OptimismMintableERC721Factory +// CheckBalanceHigh ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export const optimismMintableErc721FactoryABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [ - { name: '_bridge', internalType: 'address', type: 'address' }, - { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, - ], - }, +export const checkBalanceHighABI = [ { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'deployer', - internalType: 'address', - type: 'address', + name: 'params', + internalType: 'struct CheckBalanceHigh.Params', + type: 'tuple', + components: [ + { name: 'target', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + ], indexed: false, }, ], - name: 'OptimismMintableERC721Created', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'bridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_symbol', internalType: 'string', type: 'string' }, - ], - name: 'createOptimismMintableERC721', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], - name: 'isOptimismMintableERC721', + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'remoteChainId', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, ] as const /** - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export const optimismMintableErc721FactoryAddress = { - 10: '0x4200000000000000000000000000000000000017', +export const checkBalanceHighAddress = { + 1: '0x7eC64a8a591bFf829ff6C8be76074D540ACb813F', + 5: '0x7eC64a8a591bFf829ff6C8be76074D540ACb813F', + 420: '0x5d7103853f12109A7d27F118e54BbC654ad847E9', } as const /** - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export const optimismMintableErc721FactoryConfig = { - address: optimismMintableErc721FactoryAddress, - abi: optimismMintableErc721FactoryABI, +export const checkBalanceHighConfig = { + address: checkBalanceHighAddress, + abi: checkBalanceHighABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// OptimismMintableERC721Factory_optimism-goerli +// CheckBalanceLow ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export const optimismMintableErc721FactoryOptimismGoerliABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [ - { name: '_bridge', internalType: 'address', type: 'address' }, - { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, - ], - }, +export const checkBalanceLowABI = [ { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'deployer', - internalType: 'address', - type: 'address', + name: 'params', + internalType: 'struct CheckBalanceLow.Params', + type: 'tuple', + components: [ + { name: 'target', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + ], indexed: false, }, ], - name: 'OptimismMintableERC721Created', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'BRIDGE', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'REMOTE_CHAIN_ID', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_symbol', internalType: 'string', type: 'string' }, - ], - name: 'createOptimismMintableERC721', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], - name: 'isOptimismMintableERC721', + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export const optimismMintableErc721FactoryOptimismGoerliAddress = { - 420: '0x4200000000000000000000000000000000000017', +export const checkBalanceLowAddress = { + 1: '0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640', + 5: '0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640', + 420: '0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export const optimismMintableErc721FactoryOptimismGoerliConfig = { - address: optimismMintableErc721FactoryOptimismGoerliAddress, - abi: optimismMintableErc721FactoryOptimismGoerliABI, +export const checkBalanceLowConfig = { + address: checkBalanceLowAddress, + abi: checkBalanceLowABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// BaseFeeVault +// CheckGelatoLow ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export const baseFeeVaultABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], - }, +export const checkGelatoLowABI = [ { type: 'event', anonymous: false, inputs: [ { - name: 'value', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, - { - name: 'from', - internalType: 'address', - type: 'address', + name: 'params', + internalType: 'struct CheckGelatoLow.Params', + type: 'tuple', + components: [ + { name: 'treasury', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + { name: 'recipient', internalType: 'address', type: 'address' }, + ], indexed: false, }, ], - name: 'Withdrawal', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'MIN_WITHDRAWAL_AMOUNT', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'RECIPIENT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'totalProcessed', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [], - name: 'withdraw', - outputs: [], + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export const baseFeeVaultAddress = { - 420: '0x4200000000000000000000000000000000000019', +export const checkGelatoLowAddress = { + 1: '0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa', + 5: '0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa', + 420: '0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export const baseFeeVaultConfig = { - address: baseFeeVaultAddress, - abi: baseFeeVaultABI, +export const checkGelatoLowConfig = { + address: checkGelatoLowAddress, + abi: checkGelatoLowABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// GasPriceOracle +// CheckTrue ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export const gasPriceOracleABI = [ - { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'baseFee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, +export const checkTrueABI = [ { stateMutability: 'pure', type: 'function', - inputs: [], - name: 'decimals', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'gasPrice', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], - name: 'getL1Fee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], - name: 'getL1GasUsed', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1BaseFee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'overhead', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'scalar', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + inputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], + name: 'check', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export const gasPriceOracleAddress = { - 420: '0x420000000000000000000000000000000000000F', +export const checkTrueAddress = { + 1: '0x5c741a38cb11424711231777D71689C458eE835D', + 5: '0x5c741a38cb11424711231777D71689C458eE835D', + 420: '0x47443D0C184e022F19BD1578F5bca6B8a9F58E32', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export const gasPriceOracleConfig = { - address: gasPriceOracleAddress, - abi: gasPriceOracleABI, +export const checkTrueConfig = { + address: checkTrueAddress, + abi: checkTrueABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L1Block +// Drippie ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l1BlockABI = [ - { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, +export const drippieABI = [ { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'DEPOSITOR_ACCOUNT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'basefee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + indexed: false, + }, + ], + name: 'DripCreated', }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'batcherHash', - outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'hash', - outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1FeeOverhead', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1FeeScalar', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'number', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'sequenceNumber', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_number', internalType: 'uint64', type: 'uint64' }, - { name: '_timestamp', internalType: 'uint64', type: 'uint64' }, - { name: '_basefee', internalType: 'uint256', type: 'uint256' }, - { name: '_hash', internalType: 'bytes32', type: 'bytes32' }, - { name: '_sequenceNumber', internalType: 'uint64', type: 'uint64' }, - { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, - { name: '_l1FeeOverhead', internalType: 'uint256', type: 'uint256' }, - { name: '_l1FeeScalar', internalType: 'uint256', type: 'uint256' }, - ], - name: 'setL1BlockValues', - outputs: [], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'timestamp', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, -] as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) - */ -export const l1BlockAddress = { - 420: '0x4200000000000000000000000000000000000015', -} as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) - */ -export const l1BlockConfig = { - address: l1BlockAddress, - abi: l1BlockABI, -} as const - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L1FeeVault -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) - */ -export const l1FeeVaultABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'executor', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'timestamp', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'DripExecuted', }, { type: 'event', anonymous: false, inputs: [ { - name: 'value', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'from', - internalType: 'address', - type: 'address', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', indexed: false, }, ], - name: 'Withdrawal', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'MIN_WITHDRAWAL_AMOUNT', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'RECIPIENT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'totalProcessed', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'DripStatusUpdated', }, { - stateMutability: 'nonpayable', - type: 'function', - inputs: [], - name: 'withdraw', - outputs: [], - }, - { stateMutability: 'payable', type: 'receive' }, -] as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) - */ -export const l1FeeVaultAddress = { - 420: '0x420000000000000000000000000000000000001A', -} as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) - */ -export const l1FeeVaultConfig = { - address: l1FeeVaultAddress, - abi: l1FeeVaultABI, -} as const - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2CrossDomainMessenger -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) - */ -export const l2CrossDomainMessengerABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', + type: 'event', + anonymous: false, inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, { - name: '_l1CrossDomainMessenger', + name: 'newOwner', internalType: 'address', type: 'address', + indexed: true, }, ], + name: 'OwnerUpdated', }, { type: 'event', anonymous: false, inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, { - name: 'msgHash', - internalType: 'bytes32', - type: 'bytes32', - indexed: true, + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, }, ], - name: 'FailedRelayedMessage', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, - ], - name: 'Initialized', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ { - name: 'msgHash', - internalType: 'bytes32', - type: 'bytes32', + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', indexed: true, }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], - name: 'RelayedMessage', + name: 'WithdrewERC20', }, { type: 'event', anonymous: false, inputs: [ { - name: 'target', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'sender', + name: 'recipient', internalType: 'address', type: 'address', - indexed: false, - }, - { name: 'message', internalType: 'bytes', type: 'bytes', indexed: false }, - { - name: 'messageNonce', - internalType: 'uint256', - type: 'uint256', - indexed: false, + indexed: true, }, { - name: 'gasLimit', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'SentMessage', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ { - name: 'sender', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'value', + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, ], - name: 'SentMessageExtension1', + name: 'WithdrewETH', }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'MESSAGE_VERSION', - outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'MIN_GAS_CALLDATA_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + ], + name: 'create', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'OTHER_MESSENGER', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', + outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'RELAY_CALL_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', + outputs: [ + { + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, + ], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'RELAY_CONSTANT_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'RELAY_GAS_CHECK_BUFFER', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'RELAY_RESERVED_GAS', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], }, { - stateMutability: 'pure', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_message', internalType: 'bytes', type: 'bytes' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, ], - name: 'baseGas', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'failedMessages', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + name: 'status', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'initialize', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1CrossDomainMessenger', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'messageNonce', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_nonce', internalType: 'uint256', type: 'uint256' }, - { name: '_sender', internalType: 'address', type: 'address' }, - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_value', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint256', type: 'uint256' }, - { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], - name: 'relayMessage', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_message', internalType: 'bytes', type: 'bytes' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, ], - name: 'sendMessage', + name: 'withdrawERC721', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'successfulMessages', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], - }, - { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'xDomainMessageSender', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', + outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2CrossDomainMessengerAddress = { - 420: '0x4200000000000000000000000000000000000007', +export const drippieAddress = { + 1: '0x44b3A2a040057eBafC601A78647e805fd58B1f50', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2CrossDomainMessengerConfig = { - address: l2CrossDomainMessengerAddress, - abi: l2CrossDomainMessengerABI, +export const drippieConfig = { + address: drippieAddress, + abi: drippieABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2ERC721Bridge +// Drippie_goerli ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2Erc721BridgeABI = [ +export const drippieGoerliABI = [ { stateMutability: 'nonpayable', type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, inputs: [ - { name: '_messenger', internalType: 'address', type: 'address' }, - { name: '_otherBridge', internalType: 'address', type: 'address' }, + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + indexed: false, + }, ], + name: 'DripCreated', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'executor', internalType: 'address', type: 'address', + indexed: false, + }, + { + name: 'timestamp', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'DripExecuted', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'remoteToken', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + indexed: false, + }, + ], + name: 'DripStatusUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, + { + name: 'newOwner', internalType: 'address', type: 'address', indexed: true, }, + ], + name: 'OwnerUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'tokenId', + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ERC721BridgeFinalized', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'remoteToken', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'tokenId', + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, + ], + name: 'WithdrewERC20', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'ERC721BridgeInitiated', + name: 'WithdrewERC721', }, { - stateMutability: 'nonpayable', + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewETH', + }, + { + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC721', - outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC721To', - outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, ], - name: 'finalizeBridgeERC721', + name: 'create', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'messenger', + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', outputs: [ { - name: '', - internalType: 'contract CrossDomainMessenger', - type: 'address', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, ], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'otherBridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + ], + name: 'status', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + ], + name: 'withdrawERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', + outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2Erc721BridgeAddress = { - 420: '0x4200000000000000000000000000000000000014', +export const drippieGoerliAddress = { + 5: '0x44b3A2a040057eBafC601A78647e805fd58B1f50', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2Erc721BridgeConfig = { - address: l2Erc721BridgeAddress, - abi: l2Erc721BridgeABI, +export const drippieGoerliConfig = { + address: drippieGoerliAddress, + abi: drippieGoerliABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2StandardBridge +// Drippie_optimism-goerli ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export const l2StandardBridgeABI = [ +export const drippieOptimismGoerliABI = [ { stateMutability: 'nonpayable', type: 'constructor', - inputs: [ - { - name: '_otherBridge', - internalType: 'address payable', - type: 'address', - }, - ], + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], }, { type: 'event', anonymous: false, inputs: [ { - name: 'l1Token', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'l2Token', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], indexed: false, }, ], - name: 'DepositFinalized', + name: 'DripCreated', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'remoteToken', + name: 'executor', internalType: 'address', type: 'address', - indexed: true, + indexed: false, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'amount', + name: 'timestamp', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ERC20BridgeFinalized', + name: 'DripExecuted', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'remoteToken', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + indexed: false, + }, + ], + name: 'DripStatusUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, + { + name: 'newOwner', internalType: 'address', type: 'address', indexed: true, }, + ], + name: 'OwnerUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ERC20BridgeInitiated', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, { name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ETHBridgeFinalized', + name: 'WithdrewERC20', }, { type: 'event', anonymous: false, inputs: [ - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, }, { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'ETHBridgeInitiated', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ { - name: 'l1Token', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'l2Token', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'WithdrawalInitiated', + name: 'WithdrewETH', }, { - stateMutability: 'nonpayable', + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC20', - outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC20To', - outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, ], - name: 'bridgeETH', + name: 'create', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'bridgeETHTo', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [ - { name: '', internalType: 'address', type: 'address' }, - { name: '', internalType: 'address', type: 'address' }, + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', + outputs: [ + { + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, ], - name: 'deposits', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'finalizeBridgeERC20', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, ], - name: 'finalizeBridgeETH', + name: 'status', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l1Token', internalType: 'address', type: 'address' }, - { name: '_l2Token', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, { name: '_to', internalType: 'address', type: 'address' }, { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, ], - name: 'finalizeDeposit', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1TokenBridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'messenger', - outputs: [ - { - name: '', - internalType: 'contract CrossDomainMessenger', - type: 'address', - }, + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], + name: 'withdrawERC20', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', + outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address payable', type: 'address' }, { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, ], - name: 'withdraw', + name: 'withdrawETH', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_l2Token', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'withdrawTo', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', outputs: [], }, { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export const l2StandardBridgeAddress = { - 420: '0x4200000000000000000000000000000000000010', +export const drippieOptimismGoerliAddress = { + 420: '0x8D8d533C16D23847EB04EEB0925be8900Dd3af86', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export const l2StandardBridgeConfig = { - address: l2StandardBridgeAddress, - abi: l2StandardBridgeABI, +export const drippieOptimismGoerliConfig = { + address: drippieOptimismGoerliAddress, + abi: drippieOptimismGoerliABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2ToL1MessagePasser +// TeleportrWithdrawer ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export const l2ToL1MessagePasserABI = [ - { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, +export const teleportrWithdrawerABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, { type: 'event', anonymous: false, inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, { - name: 'nonce', + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'OwnerUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', internalType: 'uint256', type: 'uint256', + indexed: false, + }, + ], + name: 'ReceivedETH', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', indexed: true, }, { - name: 'sender', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, { - name: 'target', + name: 'asset', internalType: 'address', type: 'address', indexed: true, }, { - name: 'value', + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, + ], + name: 'WithdrewERC20', + }, + { + type: 'event', + anonymous: false, + inputs: [ { - name: 'gasLimit', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, }, - { name: 'data', internalType: 'bytes', type: 'bytes', indexed: false }, { - name: 'withdrawalHash', - internalType: 'bytes32', - type: 'bytes32', - indexed: false, + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'MessagePassed', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, { name: 'amount', internalType: 'uint256', type: 'uint256', - indexed: true, + indexed: false, }, ], - name: 'WithdrawerBalanceBurnt', + name: 'WithdrewETH', + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MESSAGE_VERSION', - outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + name: 'data', + outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'recipient', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], + name: 'setData', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + name: 'setRecipient', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', + inputs: [{ name: '_teleportr', internalType: 'address', type: 'address' }], + name: 'setTeleportr', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', inputs: [], - name: 'burn', + name: 'teleportr', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_gasLimit', internalType: 'uint256', type: 'uint256' }, - { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], - name: 'initiateWithdrawal', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'messageNonce', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'sentMessages', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', + outputs: [], + }, + { + stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'withdrawFromTeleportr', + outputs: [], }, { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export const l2ToL1MessagePasserAddress = { - 420: '0x4200000000000000000000000000000000000016', +export const teleportrWithdrawerAddress = { + 1: '0x78A25524D90E3D0596558fb43789bD800a5c3007', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export const l2ToL1MessagePasserConfig = { - address: l2ToL1MessagePasserAddress, - abi: l2ToL1MessagePasserABI, +export const teleportrWithdrawerConfig = { + address: teleportrWithdrawerAddress, + abi: teleportrWithdrawerABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SequencerFeeVault +// MintManager ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export const sequencerFeeVaultABI = [ +export const mintManagerABI = [ { stateMutability: 'nonpayable', type: 'constructor', - inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + inputs: [ + { name: '_upgrader', internalType: 'address', type: 'address' }, + { name: '_governanceToken', internalType: 'address', type: 'address' }, + ], }, { type: 'event', anonymous: false, inputs: [ { - name: 'value', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'previousOwner', + internalType: 'address', + type: 'address', + indexed: true, }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'from', + name: 'newOwner', internalType: 'address', type: 'address', - indexed: false, + indexed: true, }, ], - name: 'Withdrawal', + name: 'OwnershipTransferred', }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MIN_WITHDRAWAL_AMOUNT', + name: 'DENOMINATOR', outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'RECIPIENT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'MINT_CAP', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'l1FeeWallet', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'MINT_PERIOD', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'totalProcessed', + name: 'governanceToken', + outputs: [ + { name: '', internalType: 'contract GovernanceToken', type: 'address' }, + ], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_account', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'mint', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'mintPermittedAfter', outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'withdraw', + name: 'renounceOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_newMintManager', internalType: 'address', type: 'address' }, + ], + name: 'upgrade', outputs: [], }, - { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export const sequencerFeeVaultAddress = { - 420: '0x4200000000000000000000000000000000000011', +export const mintManagerAddress = { + 10: '0x5C4e7Ba1E219E47948e6e3F55019A647bA501005', + 420: '0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export const sequencerFeeVaultConfig = { - address: sequencerFeeVaultAddress, - abi: sequencerFeeVaultABI, +export const mintManagerConfig = { + address: mintManagerAddress, + abi: mintManagerABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// eslintIgnore +// OptimismMintableERC721Factory ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/** + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_bridge', internalType: 'address', type: 'address' }, + { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'deployer', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'OptimismMintableERC721Created', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'bridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'createOptimismMintableERC721', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'isOptimismMintableERC721', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'remoteChainId', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryAddress = { + 10: '0x4200000000000000000000000000000000000017', +} as const + +/** + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryConfig = { + address: optimismMintableErc721FactoryAddress, + abi: optimismMintableErc721FactoryABI, +} as const + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Core +// OptimismMintableERC721Factory_optimism-goerli ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * Wraps __{@link getContract}__ with `abi` set to __{@link addressManagerABI}__. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function getAddressManager( - config: Omit & { - chainId?: keyof typeof addressManagerAddress - } -) { - return getContract({ - abi: addressManagerABI, - address: - addressManagerAddress[ - config.chainId as keyof typeof addressManagerAddress - ], - ...config, - }) -} +export const optimismMintableErc721FactoryOptimismGoerliABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_bridge', internalType: 'address', type: 'address' }, + { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'deployer', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'OptimismMintableERC721Created', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'BRIDGE', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'REMOTE_CHAIN_ID', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'createOptimismMintableERC721', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'isOptimismMintableERC721', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const /** - * Wraps __{@link readContract}__ with `abi` set to __{@link addressManagerABI}__. + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryOptimismGoerliAddress = { + 420: '0x4200000000000000000000000000000000000017', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryOptimismGoerliConfig = { + address: optimismMintableErc721FactoryOptimismGoerliAddress, + abi: optimismMintableErc721FactoryOptimismGoerliABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// AttestationStation +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + */ +export const attestationStationABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'creator', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'about', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'key', internalType: 'bytes32', type: 'bytes32', indexed: true }, + { name: 'val', internalType: 'bytes', type: 'bytes', indexed: false }, + ], + name: 'AttestationCreated', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { + name: '_attestations', + internalType: 'struct AttestationStation.AttestationData[]', + type: 'tuple[]', + components: [ + { name: 'about', internalType: 'address', type: 'address' }, + { name: 'key', internalType: 'bytes32', type: 'bytes32' }, + { name: 'val', internalType: 'bytes', type: 'bytes' }, + ], + }, + ], + name: 'attest', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_about', internalType: 'address', type: 'address' }, + { name: '_key', internalType: 'bytes32', type: 'bytes32' }, + { name: '_val', internalType: 'bytes', type: 'bytes' }, + ], + name: 'attest', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bytes32', type: 'bytes32' }, + ], + name: 'attestations', + outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + */ +export const attestationStationAddress = { + 10: '0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77', + 420: '0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + */ +export const attestationStationConfig = { + address: attestationStationAddress, + abi: attestationStationABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2ERC721Bridge +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + */ +export const l2Erc721BridgeABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_messenger', internalType: 'address', type: 'address' }, + { name: '_otherBridge', internalType: 'address', type: 'address' }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC721BridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC721BridgeInitiated', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC721', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC721To', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeERC721', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messenger', + outputs: [ + { + name: '', + internalType: 'contract CrossDomainMessenger', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'otherBridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + */ +export const l2Erc721BridgeAddress = { + 10: '0x4200000000000000000000000000000000000014', + 420: '0x4200000000000000000000000000000000000014', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + */ +export const l2Erc721BridgeConfig = { + address: l2Erc721BridgeAddress, + abi: l2Erc721BridgeABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Optimist +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export const optimistABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + { name: '_baseURIAttestor', internalType: 'address', type: 'address' }, + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + { + name: '_optimistAllowlist', + internalType: 'contract OptimistAllowlist', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'owner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'approved', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'Approval', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'owner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'operator', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'approved', internalType: 'bool', type: 'bool', indexed: false }, + ], + name: 'ApprovalForAll', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'Transfer', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ATTESTATION_STATION', + outputs: [ + { + name: '', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'BASE_URI_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'BASE_URI_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OPTIMIST_ALLOWLIST', + outputs: [ + { name: '', internalType: 'contract OptimistAllowlist', type: 'address' }, + ], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'uint256', type: 'uint256' }, + ], + name: 'approve', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'owner', internalType: 'address', type: 'address' }], + name: 'balanceOf', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'baseURI', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'burn', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'getApproved', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: 'owner', internalType: 'address', type: 'address' }, + { name: 'operator', internalType: 'address', type: 'address' }, + ], + name: 'isApprovedForAll', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + name: 'isOnAllowList', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + name: 'mint', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'name', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'ownerOf', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + ], + name: 'safeTransferFrom', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'safeTransferFrom', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bool', type: 'bool' }, + ], + name: 'setApprovalForAll', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }], + name: 'supportsInterface', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'symbol', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + name: 'tokenIdOfAddress', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'tokenURI', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + ], + name: 'transferFrom', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export const optimistAddress = { + 10: '0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5', + 420: '0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export const optimistConfig = { + address: optimistAddress, + abi: optimistABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// OptimistAllowlist +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + */ +export const optimistAllowlistABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + { name: '_allowlistAttestor', internalType: 'address', type: 'address' }, + { + name: '_coinbaseQuestAttestor', + internalType: 'address', + type: 'address', + }, + { name: '_optimistInviter', internalType: 'address', type: 'address' }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ALLOWLIST_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ATTESTATION_STATION', + outputs: [ + { + name: '', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'COINBASE_QUEST_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OPTIMIST_CAN_MINT_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OPTIMIST_INVITER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_claimer', internalType: 'address', type: 'address' }], + name: 'isAllowedToMint', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + */ +export const optimistAllowlistAddress = { + 10: '0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180', + 420: '0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + */ +export const optimistAllowlistConfig = { + address: optimistAllowlistAddress, + abi: optimistAllowlistABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// OptimistInviter +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export const optimistInviterABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_inviteGranter', internalType: 'address', type: 'address' }, + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'issuer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'claimer', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'InviteClaimed', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ATTESTATION_STATION', + outputs: [ + { + name: '', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'CAN_INVITE_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'CLAIMABLE_INVITE_TYPEHASH', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'EIP712_VERSION', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'INVITE_GRANTER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_COMMITMENT_PERIOD', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_claimer', internalType: 'address', type: 'address' }, + { + name: '_claimableInvite', + internalType: 'struct OptimistInviter.ClaimableInvite', + type: 'tuple', + components: [ + { name: 'issuer', internalType: 'address', type: 'address' }, + { name: 'nonce', internalType: 'bytes32', type: 'bytes32' }, + ], + }, + { name: '_signature', internalType: 'bytes', type: 'bytes' }, + ], + name: 'claimInvite', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_commitment', internalType: 'bytes32', type: 'bytes32' }], + name: 'commitInvite', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'commitmentTimestamps', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'inviteCounts', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_accounts', internalType: 'address[]', type: 'address[]' }, + { name: '_inviteCount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'setInviteCounts', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bytes32', type: 'bytes32' }, + ], + name: 'usedNonces', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export const optimistInviterAddress = { + 10: '0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929', + 420: '0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export const optimistInviterConfig = { + address: optimistInviterAddress, + abi: optimistInviterABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// BaseFeeVault +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export const baseFeeVaultABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Withdrawal', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_WITHDRAWAL_AMOUNT', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RECIPIENT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'totalProcessed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'withdraw', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export const baseFeeVaultAddress = { + 420: '0x4200000000000000000000000000000000000019', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export const baseFeeVaultConfig = { + address: baseFeeVaultAddress, + abi: baseFeeVaultABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GasPriceOracle +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + */ +export const gasPriceOracleABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'baseFee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [], + name: 'decimals', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'gasPrice', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], + name: 'getL1Fee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], + name: 'getL1GasUsed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1BaseFee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'overhead', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'scalar', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + */ +export const gasPriceOracleAddress = { + 420: '0x420000000000000000000000000000000000000F', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + */ +export const gasPriceOracleConfig = { + address: gasPriceOracleAddress, + abi: gasPriceOracleABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L1Block +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + */ +export const l1BlockABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'DEPOSITOR_ACCOUNT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'basefee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'batcherHash', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'hash', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1FeeOverhead', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1FeeScalar', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'number', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'sequenceNumber', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_number', internalType: 'uint64', type: 'uint64' }, + { name: '_timestamp', internalType: 'uint64', type: 'uint64' }, + { name: '_basefee', internalType: 'uint256', type: 'uint256' }, + { name: '_hash', internalType: 'bytes32', type: 'bytes32' }, + { name: '_sequenceNumber', internalType: 'uint64', type: 'uint64' }, + { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, + { name: '_l1FeeOverhead', internalType: 'uint256', type: 'uint256' }, + { name: '_l1FeeScalar', internalType: 'uint256', type: 'uint256' }, + ], + name: 'setL1BlockValues', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'timestamp', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + */ +export const l1BlockAddress = { + 420: '0x4200000000000000000000000000000000000015', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + */ +export const l1BlockConfig = { + address: l1BlockAddress, + abi: l1BlockABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L1FeeVault +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export const l1FeeVaultABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Withdrawal', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_WITHDRAWAL_AMOUNT', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RECIPIENT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'totalProcessed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'withdraw', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export const l1FeeVaultAddress = { + 420: '0x420000000000000000000000000000000000001A', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export const l1FeeVaultConfig = { + address: l1FeeVaultAddress, + abi: l1FeeVaultABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2CrossDomainMessenger +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export const l2CrossDomainMessengerABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_l1CrossDomainMessenger', + internalType: 'address', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'msgHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + ], + name: 'FailedRelayedMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'msgHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + ], + name: 'RelayedMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'target', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: false, + }, + { name: 'message', internalType: 'bytes', type: 'bytes', indexed: false }, + { + name: 'messageNonce', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'gasLimit', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'SentMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'SentMessageExtension1', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MESSAGE_VERSION', + outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_CALLDATA_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OTHER_MESSENGER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_CALL_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_CONSTANT_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_GAS_CHECK_BUFFER', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_RESERVED_GAS', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [ + { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + ], + name: 'baseGas', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'failedMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1CrossDomainMessenger', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messageNonce', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_nonce', internalType: 'uint256', type: 'uint256' }, + { name: '_sender', internalType: 'address', type: 'address' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint256', type: 'uint256' }, + { name: '_message', internalType: 'bytes', type: 'bytes' }, + ], + name: 'relayMessage', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + ], + name: 'sendMessage', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'successfulMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'xDomainMessageSender', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export const l2CrossDomainMessengerAddress = { + 420: '0x4200000000000000000000000000000000000007', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export const l2CrossDomainMessengerConfig = { + address: l2CrossDomainMessengerAddress, + abi: l2CrossDomainMessengerABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2StandardBridge +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + */ +export const l2StandardBridgeABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_otherBridge', + internalType: 'address payable', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'l1Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'l2Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'DepositFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC20BridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC20BridgeInitiated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ETHBridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ETHBridgeInitiated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'l1Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'l2Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'WithdrawalInitiated', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC20To', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeETH', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeETHTo', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'address', type: 'address' }, + ], + name: 'deposits', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeERC20', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeETH', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_l1Token', internalType: 'address', type: 'address' }, + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeDeposit', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1TokenBridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messenger', + outputs: [ + { + name: '', + internalType: 'contract CrossDomainMessenger', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'withdraw', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'withdrawTo', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + */ +export const l2StandardBridgeAddress = { + 420: '0x4200000000000000000000000000000000000010', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + */ +export const l2StandardBridgeConfig = { + address: l2StandardBridgeAddress, + abi: l2StandardBridgeABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2ToL1MessagePasser +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + */ +export const l2ToL1MessagePasserABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nonce', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'target', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'gasLimit', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'data', internalType: 'bytes', type: 'bytes', indexed: false }, + { + name: 'withdrawalHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: false, + }, + ], + name: 'MessagePassed', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'WithdrawerBalanceBurnt', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MESSAGE_VERSION', + outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'burn', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_gasLimit', internalType: 'uint256', type: 'uint256' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'initiateWithdrawal', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messageNonce', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'sentMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + */ +export const l2ToL1MessagePasserAddress = { + 420: '0x4200000000000000000000000000000000000016', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + */ +export const l2ToL1MessagePasserConfig = { + address: l2ToL1MessagePasserAddress, + abi: l2ToL1MessagePasserABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// SequencerFeeVault +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + */ +export const sequencerFeeVaultABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Withdrawal', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_WITHDRAWAL_AMOUNT', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RECIPIENT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1FeeWallet', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'totalProcessed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'withdraw', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + */ +export const sequencerFeeVaultAddress = { + 420: '0x4200000000000000000000000000000000000011', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + */ +export const sequencerFeeVaultConfig = { + address: sequencerFeeVaultAddress, + abi: sequencerFeeVaultABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// eslintIgnore +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Core +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link addressManagerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function getAddressManager( + config: Omit & { + chainId?: keyof typeof addressManagerAddress + } +) { + return getContract({ + abi: addressManagerABI, + address: + addressManagerAddress[ + config.chainId as keyof typeof addressManagerAddress + ], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link addressManagerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function readAddressManager< + TAbi extends readonly unknown[] = typeof addressManagerABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof addressManagerAddress + } +) { + return readContract({ + abi: addressManagerABI, + address: + addressManagerAddress[ + config.chainId as keyof typeof addressManagerAddress + ], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link addressManagerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function writeAddressManager< + TFunctionName extends string, + TMode extends WriteContractMode, + TChainId extends number = keyof typeof addressManagerAddress +>( + config: + | (Omit< + WriteContractPreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof addressManagerAddress + }) + | (Omit< + WriteContractUnpreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof addressManagerAddress + }) +) { + return writeContract({ + abi: addressManagerABI, + address: + addressManagerAddress[ + config.chainId as keyof typeof addressManagerAddress + ], + ...config, + } as unknown as WriteContractArgs) +} + +/** + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link addressManagerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function prepareWriteAddressManager< + TAbi extends readonly unknown[] = typeof addressManagerABI, + TFunctionName extends string = string +>( + config: Omit< + PrepareWriteContractConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof addressManagerAddress } +) { + return prepareWriteContract({ + abi: addressManagerABI, + address: + addressManagerAddress[ + config.chainId as keyof typeof addressManagerAddress + ], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link addressManagerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function watchAddressManagerEvent< + TAbi extends readonly unknown[] = typeof addressManagerABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof addressManagerAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: addressManagerABI, + address: + addressManagerAddress[ + config.chainId as keyof typeof addressManagerAddress + ], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function getL1CrossDomainMessenger( + config: Omit & { + chainId?: keyof typeof l1CrossDomainMessengerAddress + } +) { + return getContract({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + config.chainId as keyof typeof l1CrossDomainMessengerAddress + ], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function readL1CrossDomainMessenger< + TAbi extends readonly unknown[] = typeof l1CrossDomainMessengerABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof l1CrossDomainMessengerAddress + } +) { + return readContract({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + config.chainId as keyof typeof l1CrossDomainMessengerAddress + ], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function writeL1CrossDomainMessenger< + TFunctionName extends string, + TMode extends WriteContractMode, + TChainId extends number = keyof typeof l1CrossDomainMessengerAddress +>( + config: + | (Omit< + WriteContractPreparedArgs< + typeof l1CrossDomainMessengerABI, + TFunctionName + >, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof l1CrossDomainMessengerAddress + }) + | (Omit< + WriteContractUnpreparedArgs< + typeof l1CrossDomainMessengerABI, + TFunctionName + >, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof l1CrossDomainMessengerAddress + }) +) { + return writeContract({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + config.chainId as keyof typeof l1CrossDomainMessengerAddress + ], + ...config, + } as unknown as WriteContractArgs) +} + +/** + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function prepareWriteL1CrossDomainMessenger< + TAbi extends readonly unknown[] = typeof l1CrossDomainMessengerABI, + TFunctionName extends string = string +>( + config: Omit< + PrepareWriteContractConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } +) { + return prepareWriteContract({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + config.chainId as keyof typeof l1CrossDomainMessengerAddress + ], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function watchL1CrossDomainMessengerEvent< + TAbi extends readonly unknown[] = typeof l1CrossDomainMessengerABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + config.chainId as keyof typeof l1CrossDomainMessengerAddress + ], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function getL1Erc721Bridge( + config: Omit & { + chainId?: keyof typeof l1Erc721BridgeAddress + } +) { + return getContract({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[ + config.chainId as keyof typeof l1Erc721BridgeAddress + ], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function readL1Erc721Bridge< + TAbi extends readonly unknown[] = typeof l1Erc721BridgeABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof l1Erc721BridgeAddress + } +) { + return readContract({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[ + config.chainId as keyof typeof l1Erc721BridgeAddress + ], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function writeL1Erc721Bridge< + TFunctionName extends string, + TMode extends WriteContractMode, + TChainId extends number = keyof typeof l1Erc721BridgeAddress +>( + config: + | (Omit< + WriteContractPreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof l1Erc721BridgeAddress + }) + | (Omit< + WriteContractUnpreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof l1Erc721BridgeAddress + }) +) { + return writeContract({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[ + config.chainId as keyof typeof l1Erc721BridgeAddress + ], + ...config, + } as unknown as WriteContractArgs) +} + +/** + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function prepareWriteL1Erc721Bridge< + TAbi extends readonly unknown[] = typeof l1Erc721BridgeABI, + TFunctionName extends string = string +>( + config: Omit< + PrepareWriteContractConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } +) { + return prepareWriteContract({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[ + config.chainId as keyof typeof l1Erc721BridgeAddress + ], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function watchL1Erc721BridgeEvent< + TAbi extends readonly unknown[] = typeof l1Erc721BridgeABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1Erc721BridgeAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[ + config.chainId as keyof typeof l1Erc721BridgeAddress + ], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function getL1StandardBridge( + config: Omit & { + chainId?: keyof typeof l1StandardBridgeAddress + } +) { + return getContract({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[ + config.chainId as keyof typeof l1StandardBridgeAddress + ], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function readL1StandardBridge< + TAbi extends readonly unknown[] = typeof l1StandardBridgeABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof l1StandardBridgeAddress + } +) { + return readContract({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[ + config.chainId as keyof typeof l1StandardBridgeAddress + ], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function writeL1StandardBridge< + TFunctionName extends string, + TMode extends WriteContractMode, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: + | (Omit< + WriteContractPreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof l1StandardBridgeAddress + }) + | (Omit< + WriteContractUnpreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof l1StandardBridgeAddress + }) +) { + return writeContract({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[ + config.chainId as keyof typeof l1StandardBridgeAddress + ], + ...config, + } as unknown as WriteContractArgs) +} + +/** + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function prepareWriteL1StandardBridge< + TAbi extends readonly unknown[] = typeof l1StandardBridgeABI, + TFunctionName extends string = string +>( + config: Omit< + PrepareWriteContractConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1StandardBridgeAddress } +) { + return prepareWriteContract({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[ + config.chainId as keyof typeof l1StandardBridgeAddress + ], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function watchL1StandardBridgeEvent< + TAbi extends readonly unknown[] = typeof l1StandardBridgeABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1StandardBridgeAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[ + config.chainId as keyof typeof l1StandardBridgeAddress + ], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link l2OutputOracleABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function getL2OutputOracle( + config: Omit & { + chainId?: keyof typeof l2OutputOracleAddress + } +) { + return getContract({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[ + config.chainId as keyof typeof l2OutputOracleAddress + ], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link l2OutputOracleABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function readL2OutputOracle< + TAbi extends readonly unknown[] = typeof l2OutputOracleABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof l2OutputOracleAddress + } +) { + return readContract({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[ + config.chainId as keyof typeof l2OutputOracleAddress + ], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link l2OutputOracleABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function writeL2OutputOracle< + TFunctionName extends string, + TMode extends WriteContractMode, + TChainId extends number = keyof typeof l2OutputOracleAddress +>( + config: + | (Omit< + WriteContractPreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof l2OutputOracleAddress + }) + | (Omit< + WriteContractUnpreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof l2OutputOracleAddress + }) +) { + return writeContract({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[ + config.chainId as keyof typeof l2OutputOracleAddress + ], + ...config, + } as unknown as WriteContractArgs) +} + +/** + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link l2OutputOracleABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function prepareWriteL2OutputOracle< + TAbi extends readonly unknown[] = typeof l2OutputOracleABI, + TFunctionName extends string = string +>( + config: Omit< + PrepareWriteContractConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l2OutputOracleAddress } +) { + return prepareWriteContract({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[ + config.chainId as keyof typeof l2OutputOracleAddress + ], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link l2OutputOracleABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function watchL2OutputOracleEvent< + TAbi extends readonly unknown[] = typeof l2OutputOracleABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l2OutputOracleAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[ + config.chainId as keyof typeof l2OutputOracleAddress + ], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function getOptimismMintableErc20Factory( + config: Omit & { + chainId?: keyof typeof optimismMintableErc20FactoryAddress + } +) { + return getContract({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + config.chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function readOptimismMintableErc20Factory< + TAbi extends readonly unknown[] = typeof optimismMintableErc20FactoryABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof optimismMintableErc20FactoryAddress + } +) { + return readContract({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + config.chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function writeOptimismMintableErc20Factory< + TFunctionName extends string, + TMode extends WriteContractMode, + TChainId extends number = keyof typeof optimismMintableErc20FactoryAddress +>( + config: + | (Omit< + WriteContractPreparedArgs< + typeof optimismMintableErc20FactoryABI, + TFunctionName + >, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof optimismMintableErc20FactoryAddress + }) + | (Omit< + WriteContractUnpreparedArgs< + typeof optimismMintableErc20FactoryABI, + TFunctionName + >, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof optimismMintableErc20FactoryAddress + }) +) { + return writeContract({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + config.chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + ...config, + } as unknown as WriteContractArgs) +} + +/** + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function prepareWriteOptimismMintableErc20Factory< + TAbi extends readonly unknown[] = typeof optimismMintableErc20FactoryABI, + TFunctionName extends string = string +>( + config: Omit< + PrepareWriteContractConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } +) { + return prepareWriteContract({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + config.chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function watchOptimismMintableErc20FactoryEvent< + TAbi extends readonly unknown[] = typeof optimismMintableErc20FactoryABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + config.chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link optimismPortalABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function getOptimismPortal( + config: Omit & { + chainId?: keyof typeof optimismPortalAddress + } +) { + return getContract({ + abi: optimismPortalABI, + address: + optimismPortalAddress[ + config.chainId as keyof typeof optimismPortalAddress + ], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link optimismPortalABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function readOptimismPortal< + TAbi extends readonly unknown[] = typeof optimismPortalABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof optimismPortalAddress + } +) { + return readContract({ + abi: optimismPortalABI, + address: + optimismPortalAddress[ + config.chainId as keyof typeof optimismPortalAddress + ], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link optimismPortalABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function writeOptimismPortal< + TFunctionName extends string, + TMode extends WriteContractMode, + TChainId extends number = keyof typeof optimismPortalAddress +>( + config: + | (Omit< + WriteContractPreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof optimismPortalAddress + }) + | (Omit< + WriteContractUnpreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof optimismPortalAddress + }) +) { + return writeContract({ + abi: optimismPortalABI, + address: + optimismPortalAddress[ + config.chainId as keyof typeof optimismPortalAddress + ], + ...config, + } as unknown as WriteContractArgs) +} + +/** + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link optimismPortalABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function prepareWriteOptimismPortal< + TAbi extends readonly unknown[] = typeof optimismPortalABI, + TFunctionName extends string = string +>( + config: Omit< + PrepareWriteContractConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimismPortalAddress } +) { + return prepareWriteContract({ + abi: optimismPortalABI, + address: + optimismPortalAddress[ + config.chainId as keyof typeof optimismPortalAddress + ], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link optimismPortalABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function watchOptimismPortalEvent< + TAbi extends readonly unknown[] = typeof optimismPortalABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimismPortalAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: optimismPortalABI, + address: + optimismPortalAddress[ + config.chainId as keyof typeof optimismPortalAddress + ], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link portalSenderABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + */ +export function getPortalSender( + config: Omit & { + chainId?: keyof typeof portalSenderAddress + } +) { + return getContract({ + abi: portalSenderABI, + address: + portalSenderAddress[config.chainId as keyof typeof portalSenderAddress], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link portalSenderABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + */ +export function readPortalSender< + TAbi extends readonly unknown[] = typeof portalSenderABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof portalSenderAddress + } +) { + return readContract({ + abi: portalSenderABI, + address: + portalSenderAddress[config.chainId as keyof typeof portalSenderAddress], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link portalSenderABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + */ +export function writePortalSender< + TFunctionName extends string, + TMode extends WriteContractMode, + TChainId extends number = keyof typeof portalSenderAddress +>( + config: + | (Omit< + WriteContractPreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof portalSenderAddress + }) + | (Omit< + WriteContractUnpreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof portalSenderAddress + }) +) { + return writeContract({ + abi: portalSenderABI, + address: + portalSenderAddress[config.chainId as keyof typeof portalSenderAddress], + ...config, + } as unknown as WriteContractArgs) +} + +/** + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link portalSenderABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + */ +export function prepareWritePortalSender< + TAbi extends readonly unknown[] = typeof portalSenderABI, + TFunctionName extends string = string +>( + config: Omit< + PrepareWriteContractConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof portalSenderAddress } +) { + return prepareWriteContract({ + abi: portalSenderABI, + address: + portalSenderAddress[config.chainId as keyof typeof portalSenderAddress], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link proxyAdminABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function getProxyAdmin( + config: Omit & { + chainId?: keyof typeof proxyAdminAddress + } +) { + return getContract({ + abi: proxyAdminABI, + address: + proxyAdminAddress[config.chainId as keyof typeof proxyAdminAddress], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link proxyAdminABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function readProxyAdmin< + TAbi extends readonly unknown[] = typeof proxyAdminABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof proxyAdminAddress + } +) { + return readContract({ + abi: proxyAdminABI, + address: + proxyAdminAddress[config.chainId as keyof typeof proxyAdminAddress], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link proxyAdminABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function writeProxyAdmin< + TFunctionName extends string, + TMode extends WriteContractMode, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: + | (Omit< + WriteContractPreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof proxyAdminAddress + }) + | (Omit< + WriteContractUnpreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof proxyAdminAddress + }) +) { + return writeContract({ + abi: proxyAdminABI, + address: + proxyAdminAddress[config.chainId as keyof typeof proxyAdminAddress], + ...config, + } as unknown as WriteContractArgs) +} + +/** + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link proxyAdminABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function prepareWriteProxyAdmin< + TAbi extends readonly unknown[] = typeof proxyAdminABI, + TFunctionName extends string = string +>( + config: Omit< + PrepareWriteContractConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof proxyAdminAddress } +) { + return prepareWriteContract({ + abi: proxyAdminABI, + address: + proxyAdminAddress[config.chainId as keyof typeof proxyAdminAddress], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link proxyAdminABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function watchProxyAdminEvent< + TAbi extends readonly unknown[] = typeof proxyAdminABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof proxyAdminAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: proxyAdminABI, + address: + proxyAdminAddress[config.chainId as keyof typeof proxyAdminAddress], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link systemConfigABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function getSystemConfig( + config: Omit & { + chainId?: keyof typeof systemConfigAddress + } +) { + return getContract({ + abi: systemConfigABI, + address: + systemConfigAddress[config.chainId as keyof typeof systemConfigAddress], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link systemConfigABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function readSystemConfig< + TAbi extends readonly unknown[] = typeof systemConfigABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof systemConfigAddress + } +) { + return readContract({ + abi: systemConfigABI, + address: + systemConfigAddress[config.chainId as keyof typeof systemConfigAddress], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link systemConfigABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function writeSystemConfig< + TFunctionName extends string, + TMode extends WriteContractMode, + TChainId extends number = keyof typeof systemConfigAddress +>( + config: + | (Omit< + WriteContractPreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof systemConfigAddress + }) + | (Omit< + WriteContractUnpreparedArgs, + 'abi' | 'address' + > & { + mode: TMode + chainId?: TMode extends 'prepared' + ? TChainId + : keyof typeof systemConfigAddress + }) +) { + return writeContract({ + abi: systemConfigABI, + address: + systemConfigAddress[config.chainId as keyof typeof systemConfigAddress], + ...config, + } as unknown as WriteContractArgs) +} + +/** + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link systemConfigABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function prepareWriteSystemConfig< + TAbi extends readonly unknown[] = typeof systemConfigABI, + TFunctionName extends string = string +>( + config: Omit< + PrepareWriteContractConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof systemConfigAddress } +) { + return prepareWriteContract({ + abi: systemConfigABI, + address: + systemConfigAddress[config.chainId as keyof typeof systemConfigAddress], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link systemConfigABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function watchSystemConfigEvent< + TAbi extends readonly unknown[] = typeof systemConfigABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof systemConfigAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: systemConfigABI, + address: + systemConfigAddress[config.chainId as keyof typeof systemConfigAddress], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link systemDictatorABI}__. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + */ +export function getSystemDictator( + config: Omit & { + chainId?: keyof typeof systemDictatorAddress + } +) { + return getContract({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link systemDictatorABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function readAddressManager< - TAbi extends readonly unknown[] = typeof addressManagerABI, +export function readSystemDictator< + TAbi extends readonly unknown[] = typeof systemDictatorABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof addressManagerAddress + chainId?: keyof typeof systemDictatorAddress } ) { return readContract({ - abi: addressManagerABI, - address: - addressManagerAddress[ - config.chainId as keyof typeof addressManagerAddress - ], + abi: systemDictatorABI, + address: systemDictatorAddress[1], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link addressManagerABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link systemDictatorABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function writeAddressManager< +export function writeSystemDictator< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof addressManagerAddress + TChainId extends number = keyof typeof systemDictatorAddress >( config: | (Omit< - WriteContractPreparedArgs, + WriteContractPreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof addressManagerAddress + : keyof typeof systemDictatorAddress }) | (Omit< - WriteContractUnpreparedArgs, + WriteContractUnpreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof addressManagerAddress + : keyof typeof systemDictatorAddress }) ) { return writeContract({ - abi: addressManagerABI, - address: - addressManagerAddress[ - config.chainId as keyof typeof addressManagerAddress - ], + abi: systemDictatorABI, + address: systemDictatorAddress[1], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link addressManagerABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link systemDictatorABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function prepareWriteAddressManager< - TAbi extends readonly unknown[] = typeof addressManagerABI, +export function prepareWriteSystemDictator< + TAbi extends readonly unknown[] = typeof systemDictatorABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof addressManagerAddress } + > & { chainId?: keyof typeof systemDictatorAddress } ) { return prepareWriteContract({ - abi: addressManagerABI, - address: - addressManagerAddress[ - config.chainId as keyof typeof addressManagerAddress - ], + abi: systemDictatorABI, + address: systemDictatorAddress[1], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link addressManagerABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link systemDictatorABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function watchAddressManagerEvent< - TAbi extends readonly unknown[] = typeof addressManagerABI, +export function watchSystemDictatorEvent< + TAbi extends readonly unknown[] = typeof systemDictatorABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof addressManagerAddress }, + > & { chainId?: keyof typeof systemDictatorAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: addressManagerABI, - address: - addressManagerAddress[ - config.chainId as keyof typeof addressManagerAddress - ], + abi: systemDictatorABI, + address: systemDictatorAddress[1], ...config, } as WatchContractEventConfig, callback @@ -5264,65 +9345,56 @@ export function watchAddressManagerEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link systemDictatorGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function getL1CrossDomainMessenger( +export function getSystemDictatorGoerli( config: Omit & { - chainId?: keyof typeof l1CrossDomainMessengerAddress + chainId?: keyof typeof systemDictatorGoerliAddress } ) { return getContract({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - config.chainId as keyof typeof l1CrossDomainMessengerAddress - ], + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link systemDictatorGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function readL1CrossDomainMessenger< - TAbi extends readonly unknown[] = typeof l1CrossDomainMessengerABI, +export function readSystemDictatorGoerli< + TAbi extends readonly unknown[] = typeof systemDictatorGoerliABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof l1CrossDomainMessengerAddress + chainId?: keyof typeof systemDictatorGoerliAddress } ) { return readContract({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - config.chainId as keyof typeof l1CrossDomainMessengerAddress - ], + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link systemDictatorGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function writeL1CrossDomainMessenger< +export function writeSystemDictatorGoerli< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof l1CrossDomainMessengerAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: | (Omit< WriteContractPreparedArgs< - typeof l1CrossDomainMessengerABI, + typeof systemDictatorGoerliABI, TFunctionName >, 'abi' | 'address' @@ -5330,11 +9402,11 @@ export function writeL1CrossDomainMessenger< mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof l1CrossDomainMessengerAddress + : keyof typeof systemDictatorGoerliAddress }) | (Omit< WriteContractUnpreparedArgs< - typeof l1CrossDomainMessengerABI, + typeof systemDictatorGoerliABI, TFunctionName >, 'abi' | 'address' @@ -5342,67 +9414,56 @@ export function writeL1CrossDomainMessenger< mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof l1CrossDomainMessengerAddress + : keyof typeof systemDictatorGoerliAddress }) ) { return writeContract({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - config.chainId as keyof typeof l1CrossDomainMessengerAddress - ], + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link systemDictatorGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function prepareWriteL1CrossDomainMessenger< - TAbi extends readonly unknown[] = typeof l1CrossDomainMessengerABI, +export function prepareWriteSystemDictatorGoerli< + TAbi extends readonly unknown[] = typeof systemDictatorGoerliABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } + > & { chainId?: keyof typeof systemDictatorGoerliAddress } ) { return prepareWriteContract({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - config.chainId as keyof typeof l1CrossDomainMessengerAddress - ], + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link systemDictatorGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function watchL1CrossDomainMessengerEvent< - TAbi extends readonly unknown[] = typeof l1CrossDomainMessengerABI, +export function watchSystemDictatorGoerliEvent< + TAbi extends readonly unknown[] = typeof systemDictatorGoerliABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress }, + > & { chainId?: keyof typeof systemDictatorGoerliAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - config.chainId as keyof typeof l1CrossDomainMessengerAddress - ], + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], ...config, } as WatchContractEventConfig, callback @@ -5410,138 +9471,207 @@ export function watchL1CrossDomainMessengerEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link assetReceiverABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function getL1Erc721Bridge( +export function getAssetReceiver( config: Omit & { - chainId?: keyof typeof l1Erc721BridgeAddress + chainId?: keyof typeof assetReceiverAddress } ) { return getContract({ - abi: l1Erc721BridgeABI, + abi: assetReceiverABI, address: - l1Erc721BridgeAddress[ - config.chainId as keyof typeof l1Erc721BridgeAddress - ], + assetReceiverAddress[config.chainId as keyof typeof assetReceiverAddress], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link assetReceiverABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function readL1Erc721Bridge< - TAbi extends readonly unknown[] = typeof l1Erc721BridgeABI, +export function readAssetReceiver< + TAbi extends readonly unknown[] = typeof assetReceiverABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof l1Erc721BridgeAddress + chainId?: keyof typeof assetReceiverAddress } ) { return readContract({ - abi: l1Erc721BridgeABI, + abi: assetReceiverABI, address: - l1Erc721BridgeAddress[ - config.chainId as keyof typeof l1Erc721BridgeAddress - ], + assetReceiverAddress[config.chainId as keyof typeof assetReceiverAddress], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link assetReceiverABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function writeL1Erc721Bridge< +export function writeAssetReceiver< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof l1Erc721BridgeAddress + TChainId extends number = keyof typeof assetReceiverAddress >( config: | (Omit< - WriteContractPreparedArgs, + WriteContractPreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof l1Erc721BridgeAddress + : keyof typeof assetReceiverAddress }) | (Omit< - WriteContractUnpreparedArgs, + WriteContractUnpreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof l1Erc721BridgeAddress + : keyof typeof assetReceiverAddress }) ) { return writeContract({ - abi: l1Erc721BridgeABI, + abi: assetReceiverABI, address: - l1Erc721BridgeAddress[ - config.chainId as keyof typeof l1Erc721BridgeAddress - ], + assetReceiverAddress[config.chainId as keyof typeof assetReceiverAddress], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link assetReceiverABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function prepareWriteL1Erc721Bridge< - TAbi extends readonly unknown[] = typeof l1Erc721BridgeABI, +export function prepareWriteAssetReceiver< + TAbi extends readonly unknown[] = typeof assetReceiverABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } + > & { chainId?: keyof typeof assetReceiverAddress } +) { + return prepareWriteContract({ + abi: assetReceiverABI, + address: + assetReceiverAddress[config.chainId as keyof typeof assetReceiverAddress], + ...config, + } as unknown as PrepareWriteContractConfig) +} + +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link assetReceiverABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + */ +export function watchAssetReceiverEvent< + TAbi extends readonly unknown[] = typeof assetReceiverABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof assetReceiverAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: assetReceiverABI, + address: + assetReceiverAddress[ + config.chainId as keyof typeof assetReceiverAddress + ], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link checkBalanceHighABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) + */ +export function getCheckBalanceHigh( + config: Omit & { + chainId?: keyof typeof checkBalanceHighAddress + } +) { + return getContract({ + abi: checkBalanceHighABI, + address: + checkBalanceHighAddress[ + config.chainId as keyof typeof checkBalanceHighAddress + ], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link checkBalanceHighABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) + */ +export function readCheckBalanceHigh< + TAbi extends readonly unknown[] = typeof checkBalanceHighABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof checkBalanceHighAddress + } ) { - return prepareWriteContract({ - abi: l1Erc721BridgeABI, + return readContract({ + abi: checkBalanceHighABI, address: - l1Erc721BridgeAddress[ - config.chainId as keyof typeof l1Erc721BridgeAddress + checkBalanceHighAddress[ + config.chainId as keyof typeof checkBalanceHighAddress ], ...config, - } as unknown as PrepareWriteContractConfig) + } as unknown as ReadContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link checkBalanceHighABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export function watchL1Erc721BridgeEvent< - TAbi extends readonly unknown[] = typeof l1Erc721BridgeABI, +export function watchCheckBalanceHighEvent< + TAbi extends readonly unknown[] = typeof checkBalanceHighABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l1Erc721BridgeAddress }, + > & { chainId?: keyof typeof checkBalanceHighAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: l1Erc721BridgeABI, + abi: checkBalanceHighABI, address: - l1Erc721BridgeAddress[ - config.chainId as keyof typeof l1Erc721BridgeAddress + checkBalanceHighAddress[ + config.chainId as keyof typeof checkBalanceHighAddress ], ...config, } as WatchContractEventConfig, @@ -5550,138 +9680,152 @@ export function watchL1Erc721BridgeEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link checkBalanceLowABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export function getL1StandardBridge( +export function getCheckBalanceLow( config: Omit & { - chainId?: keyof typeof l1StandardBridgeAddress + chainId?: keyof typeof checkBalanceLowAddress } ) { return getContract({ - abi: l1StandardBridgeABI, + abi: checkBalanceLowABI, address: - l1StandardBridgeAddress[ - config.chainId as keyof typeof l1StandardBridgeAddress + checkBalanceLowAddress[ + config.chainId as keyof typeof checkBalanceLowAddress ], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link checkBalanceLowABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export function readL1StandardBridge< - TAbi extends readonly unknown[] = typeof l1StandardBridgeABI, +export function readCheckBalanceLow< + TAbi extends readonly unknown[] = typeof checkBalanceLowABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof l1StandardBridgeAddress + chainId?: keyof typeof checkBalanceLowAddress } ) { return readContract({ - abi: l1StandardBridgeABI, + abi: checkBalanceLowABI, address: - l1StandardBridgeAddress[ - config.chainId as keyof typeof l1StandardBridgeAddress + checkBalanceLowAddress[ + config.chainId as keyof typeof checkBalanceLowAddress ], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link checkBalanceLowABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export function writeL1StandardBridge< - TFunctionName extends string, - TMode extends WriteContractMode, - TChainId extends number = keyof typeof l1StandardBridgeAddress +export function watchCheckBalanceLowEvent< + TAbi extends readonly unknown[] = typeof checkBalanceLowABI, + TEventName extends string = string >( - config: - | (Omit< - WriteContractPreparedArgs, - 'abi' | 'address' - > & { - mode: TMode - chainId?: TMode extends 'prepared' - ? TChainId - : keyof typeof l1StandardBridgeAddress - }) - | (Omit< - WriteContractUnpreparedArgs, - 'abi' | 'address' - > & { - mode: TMode - chainId?: TMode extends 'prepared' - ? TChainId - : keyof typeof l1StandardBridgeAddress - }) + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof checkBalanceLowAddress }, + callback: WatchContractEventCallback ) { - return writeContract({ - abi: l1StandardBridgeABI, + return watchContractEvent( + { + abi: checkBalanceLowABI, + address: + checkBalanceLowAddress[ + config.chainId as keyof typeof checkBalanceLowAddress + ], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link checkGelatoLowABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) + */ +export function getCheckGelatoLow( + config: Omit & { + chainId?: keyof typeof checkGelatoLowAddress + } +) { + return getContract({ + abi: checkGelatoLowABI, address: - l1StandardBridgeAddress[ - config.chainId as keyof typeof l1StandardBridgeAddress + checkGelatoLowAddress[ + config.chainId as keyof typeof checkGelatoLowAddress ], ...config, - } as unknown as WriteContractArgs) + }) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link checkGelatoLowABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export function prepareWriteL1StandardBridge< - TAbi extends readonly unknown[] = typeof l1StandardBridgeABI, +export function readCheckGelatoLow< + TAbi extends readonly unknown[] = typeof checkGelatoLowABI, TFunctionName extends string = string >( - config: Omit< - PrepareWriteContractConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l1StandardBridgeAddress } + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof checkGelatoLowAddress + } ) { - return prepareWriteContract({ - abi: l1StandardBridgeABI, + return readContract({ + abi: checkGelatoLowABI, address: - l1StandardBridgeAddress[ - config.chainId as keyof typeof l1StandardBridgeAddress + checkGelatoLowAddress[ + config.chainId as keyof typeof checkGelatoLowAddress ], ...config, - } as unknown as PrepareWriteContractConfig) + } as unknown as ReadContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link checkGelatoLowABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export function watchL1StandardBridgeEvent< - TAbi extends readonly unknown[] = typeof l1StandardBridgeABI, +export function watchCheckGelatoLowEvent< + TAbi extends readonly unknown[] = typeof checkGelatoLowABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l1StandardBridgeAddress }, + > & { chainId?: keyof typeof checkGelatoLowAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: l1StandardBridgeABI, + abi: checkGelatoLowABI, address: - l1StandardBridgeAddress[ - config.chainId as keyof typeof l1StandardBridgeAddress + checkGelatoLowAddress[ + config.chainId as keyof typeof checkGelatoLowAddress ], ...config, } as WatchContractEventConfig, @@ -5690,139 +9834,156 @@ export function watchL1StandardBridgeEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link l2OutputOracleABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link checkTrueABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export function getL2OutputOracle( +export function getCheckTrue( config: Omit & { - chainId?: keyof typeof l2OutputOracleAddress + chainId?: keyof typeof checkTrueAddress } ) { return getContract({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[ - config.chainId as keyof typeof l2OutputOracleAddress - ], + abi: checkTrueABI, + address: checkTrueAddress[config.chainId as keyof typeof checkTrueAddress], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link l2OutputOracleABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link checkTrueABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export function readL2OutputOracle< - TAbi extends readonly unknown[] = typeof l2OutputOracleABI, +export function readCheckTrue< + TAbi extends readonly unknown[] = typeof checkTrueABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof l2OutputOracleAddress + chainId?: keyof typeof checkTrueAddress } ) { return readContract({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[ - config.chainId as keyof typeof l2OutputOracleAddress - ], + abi: checkTrueABI, + address: checkTrueAddress[config.chainId as keyof typeof checkTrueAddress], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link l2OutputOracleABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link drippieABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function writeL2OutputOracle< +export function getDrippie( + config: Omit & { + chainId?: keyof typeof drippieAddress + } +) { + return getContract({ abi: drippieABI, address: drippieAddress[1], ...config }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link drippieABI}__. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function readDrippie< + TAbi extends readonly unknown[] = typeof drippieABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof drippieAddress + } +) { + return readContract({ + abi: drippieABI, + address: drippieAddress[1], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link drippieABI}__. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function writeDrippie< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof l2OutputOracleAddress + TChainId extends number = keyof typeof drippieAddress >( config: | (Omit< - WriteContractPreparedArgs, + WriteContractPreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof l2OutputOracleAddress + : keyof typeof drippieAddress }) | (Omit< - WriteContractUnpreparedArgs, + WriteContractUnpreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof l2OutputOracleAddress + : keyof typeof drippieAddress }) ) { return writeContract({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[ - config.chainId as keyof typeof l2OutputOracleAddress - ], + abi: drippieABI, + address: drippieAddress[1], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link l2OutputOracleABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link drippieABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function prepareWriteL2OutputOracle< - TAbi extends readonly unknown[] = typeof l2OutputOracleABI, +export function prepareWriteDrippie< + TAbi extends readonly unknown[] = typeof drippieABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l2OutputOracleAddress } + > & { chainId?: keyof typeof drippieAddress } ) { return prepareWriteContract({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[ - config.chainId as keyof typeof l2OutputOracleAddress - ], + abi: drippieABI, + address: drippieAddress[1], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link l2OutputOracleABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link drippieABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function watchL2OutputOracleEvent< - TAbi extends readonly unknown[] = typeof l2OutputOracleABI, +export function watchDrippieEvent< + TAbi extends readonly unknown[] = typeof drippieABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l2OutputOracleAddress }, + > & { chainId?: keyof typeof drippieAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[ - config.chainId as keyof typeof l2OutputOracleAddress - ], + abi: drippieABI, + address: drippieAddress[1], ...config, } as WatchContractEventConfig, callback @@ -5830,150 +9991,119 @@ export function watchL2OutputOracleEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link drippieGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function getOptimismMintableErc20Factory( +export function getDrippieGoerli( config: Omit & { - chainId?: keyof typeof optimismMintableErc20FactoryAddress + chainId?: keyof typeof drippieGoerliAddress } ) { return getContract({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - config.chainId as keyof typeof optimismMintableErc20FactoryAddress - ], + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link drippieGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function readOptimismMintableErc20Factory< - TAbi extends readonly unknown[] = typeof optimismMintableErc20FactoryABI, +export function readDrippieGoerli< + TAbi extends readonly unknown[] = typeof drippieGoerliABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof optimismMintableErc20FactoryAddress + chainId?: keyof typeof drippieGoerliAddress } ) { return readContract({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - config.chainId as keyof typeof optimismMintableErc20FactoryAddress - ], + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link drippieGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function writeOptimismMintableErc20Factory< +export function writeDrippieGoerli< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof optimismMintableErc20FactoryAddress + TChainId extends number = keyof typeof drippieGoerliAddress >( config: | (Omit< - WriteContractPreparedArgs< - typeof optimismMintableErc20FactoryABI, - TFunctionName - >, + WriteContractPreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof optimismMintableErc20FactoryAddress + : keyof typeof drippieGoerliAddress }) | (Omit< - WriteContractUnpreparedArgs< - typeof optimismMintableErc20FactoryABI, - TFunctionName - >, + WriteContractUnpreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof optimismMintableErc20FactoryAddress + : keyof typeof drippieGoerliAddress }) ) { return writeContract({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - config.chainId as keyof typeof optimismMintableErc20FactoryAddress - ], + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link drippieGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function prepareWriteOptimismMintableErc20Factory< - TAbi extends readonly unknown[] = typeof optimismMintableErc20FactoryABI, +export function prepareWriteDrippieGoerli< + TAbi extends readonly unknown[] = typeof drippieGoerliABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } + > & { chainId?: keyof typeof drippieGoerliAddress } ) { return prepareWriteContract({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - config.chainId as keyof typeof optimismMintableErc20FactoryAddress - ], + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link drippieGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function watchOptimismMintableErc20FactoryEvent< - TAbi extends readonly unknown[] = typeof optimismMintableErc20FactoryABI, +export function watchDrippieGoerliEvent< + TAbi extends readonly unknown[] = typeof drippieGoerliABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress }, + > & { chainId?: keyof typeof drippieGoerliAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - config.chainId as keyof typeof optimismMintableErc20FactoryAddress - ], + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], ...config, } as WatchContractEventConfig, callback @@ -5981,139 +10111,125 @@ export function watchOptimismMintableErc20FactoryEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link optimismPortalABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link drippieOptimismGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function getOptimismPortal( +export function getDrippieOptimismGoerli( config: Omit & { - chainId?: keyof typeof optimismPortalAddress + chainId?: keyof typeof drippieOptimismGoerliAddress } ) { return getContract({ - abi: optimismPortalABI, - address: - optimismPortalAddress[ - config.chainId as keyof typeof optimismPortalAddress - ], + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link optimismPortalABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link drippieOptimismGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function readOptimismPortal< - TAbi extends readonly unknown[] = typeof optimismPortalABI, +export function readDrippieOptimismGoerli< + TAbi extends readonly unknown[] = typeof drippieOptimismGoerliABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof optimismPortalAddress + chainId?: keyof typeof drippieOptimismGoerliAddress } ) { return readContract({ - abi: optimismPortalABI, - address: - optimismPortalAddress[ - config.chainId as keyof typeof optimismPortalAddress - ], + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link optimismPortalABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link drippieOptimismGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function writeOptimismPortal< +export function writeDrippieOptimismGoerli< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof optimismPortalAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: | (Omit< - WriteContractPreparedArgs, + WriteContractPreparedArgs< + typeof drippieOptimismGoerliABI, + TFunctionName + >, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof optimismPortalAddress + : keyof typeof drippieOptimismGoerliAddress }) | (Omit< - WriteContractUnpreparedArgs, + WriteContractUnpreparedArgs< + typeof drippieOptimismGoerliABI, + TFunctionName + >, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof optimismPortalAddress + : keyof typeof drippieOptimismGoerliAddress }) ) { return writeContract({ - abi: optimismPortalABI, - address: - optimismPortalAddress[ - config.chainId as keyof typeof optimismPortalAddress - ], + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link optimismPortalABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link drippieOptimismGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function prepareWriteOptimismPortal< - TAbi extends readonly unknown[] = typeof optimismPortalABI, +export function prepareWriteDrippieOptimismGoerli< + TAbi extends readonly unknown[] = typeof drippieOptimismGoerliABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof optimismPortalAddress } + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } ) { return prepareWriteContract({ - abi: optimismPortalABI, - address: - optimismPortalAddress[ - config.chainId as keyof typeof optimismPortalAddress - ], + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link optimismPortalABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link drippieOptimismGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function watchOptimismPortalEvent< - TAbi extends readonly unknown[] = typeof optimismPortalABI, +export function watchDrippieOptimismGoerliEvent< + TAbi extends readonly unknown[] = typeof drippieOptimismGoerliABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof optimismPortalAddress }, + > & { chainId?: keyof typeof drippieOptimismGoerliAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: optimismPortalABI, - address: - optimismPortalAddress[ - config.chainId as keyof typeof optimismPortalAddress - ], + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], ...config, } as WatchContractEventConfig, callback @@ -6121,232 +10237,252 @@ export function watchOptimismPortalEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link portalSenderABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link teleportrWithdrawerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function getPortalSender( +export function getTeleportrWithdrawer( config: Omit & { - chainId?: keyof typeof portalSenderAddress + chainId?: keyof typeof teleportrWithdrawerAddress } ) { return getContract({ - abi: portalSenderABI, - address: - portalSenderAddress[config.chainId as keyof typeof portalSenderAddress], + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link portalSenderABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link teleportrWithdrawerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function readPortalSender< - TAbi extends readonly unknown[] = typeof portalSenderABI, +export function readTeleportrWithdrawer< + TAbi extends readonly unknown[] = typeof teleportrWithdrawerABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof portalSenderAddress + chainId?: keyof typeof teleportrWithdrawerAddress } ) { return readContract({ - abi: portalSenderABI, - address: - portalSenderAddress[config.chainId as keyof typeof portalSenderAddress], + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link portalSenderABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link teleportrWithdrawerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function writePortalSender< +export function writeTeleportrWithdrawer< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof portalSenderAddress + TChainId extends number = keyof typeof teleportrWithdrawerAddress >( config: | (Omit< - WriteContractPreparedArgs, + WriteContractPreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof portalSenderAddress + : keyof typeof teleportrWithdrawerAddress }) | (Omit< - WriteContractUnpreparedArgs, + WriteContractUnpreparedArgs< + typeof teleportrWithdrawerABI, + TFunctionName + >, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof portalSenderAddress + : keyof typeof teleportrWithdrawerAddress }) ) { return writeContract({ - abi: portalSenderABI, - address: - portalSenderAddress[config.chainId as keyof typeof portalSenderAddress], + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link portalSenderABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link teleportrWithdrawerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function prepareWritePortalSender< - TAbi extends readonly unknown[] = typeof portalSenderABI, +export function prepareWriteTeleportrWithdrawer< + TAbi extends readonly unknown[] = typeof teleportrWithdrawerABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof portalSenderAddress } + > & { chainId?: keyof typeof teleportrWithdrawerAddress } ) { return prepareWriteContract({ - abi: portalSenderABI, - address: - portalSenderAddress[config.chainId as keyof typeof portalSenderAddress], + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link proxyAdminABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link teleportrWithdrawerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function getProxyAdmin( +export function watchTeleportrWithdrawerEvent< + TAbi extends readonly unknown[] = typeof teleportrWithdrawerABI, + TEventName extends string = string +>( + config: Omit< + WatchContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof teleportrWithdrawerAddress }, + callback: WatchContractEventCallback +) { + return watchContractEvent( + { + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + ...config, + } as WatchContractEventConfig, + callback + ) +} + +/** + * Wraps __{@link getContract}__ with `abi` set to __{@link mintManagerABI}__. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + */ +export function getMintManager( config: Omit & { - chainId?: keyof typeof proxyAdminAddress + chainId?: keyof typeof mintManagerAddress } ) { return getContract({ - abi: proxyAdminABI, + abi: mintManagerABI, address: - proxyAdminAddress[config.chainId as keyof typeof proxyAdminAddress], + mintManagerAddress[config.chainId as keyof typeof mintManagerAddress], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link proxyAdminABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link mintManagerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function readProxyAdmin< - TAbi extends readonly unknown[] = typeof proxyAdminABI, +export function readMintManager< + TAbi extends readonly unknown[] = typeof mintManagerABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof proxyAdminAddress + chainId?: keyof typeof mintManagerAddress } ) { return readContract({ - abi: proxyAdminABI, + abi: mintManagerABI, address: - proxyAdminAddress[config.chainId as keyof typeof proxyAdminAddress], + mintManagerAddress[config.chainId as keyof typeof mintManagerAddress], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link proxyAdminABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link mintManagerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function writeProxyAdmin< +export function writeMintManager< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof mintManagerAddress >( config: | (Omit< - WriteContractPreparedArgs, + WriteContractPreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof proxyAdminAddress + : keyof typeof mintManagerAddress }) | (Omit< - WriteContractUnpreparedArgs, + WriteContractUnpreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof proxyAdminAddress + : keyof typeof mintManagerAddress }) ) { return writeContract({ - abi: proxyAdminABI, + abi: mintManagerABI, address: - proxyAdminAddress[config.chainId as keyof typeof proxyAdminAddress], + mintManagerAddress[config.chainId as keyof typeof mintManagerAddress], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link proxyAdminABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link mintManagerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function prepareWriteProxyAdmin< - TAbi extends readonly unknown[] = typeof proxyAdminABI, +export function prepareWriteMintManager< + TAbi extends readonly unknown[] = typeof mintManagerABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof proxyAdminAddress } + > & { chainId?: keyof typeof mintManagerAddress } ) { return prepareWriteContract({ - abi: proxyAdminABI, + abi: mintManagerABI, address: - proxyAdminAddress[config.chainId as keyof typeof proxyAdminAddress], + mintManagerAddress[config.chainId as keyof typeof mintManagerAddress], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link proxyAdminABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link mintManagerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function watchProxyAdminEvent< - TAbi extends readonly unknown[] = typeof proxyAdminABI, +export function watchMintManagerEvent< + TAbi extends readonly unknown[] = typeof mintManagerABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof proxyAdminAddress }, + > & { chainId?: keyof typeof mintManagerAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: proxyAdminABI, + abi: mintManagerABI, address: - proxyAdminAddress[config.chainId as keyof typeof proxyAdminAddress], + mintManagerAddress[config.chainId as keyof typeof mintManagerAddress], ...config, } as WatchContractEventConfig, callback @@ -6354,129 +10490,125 @@ export function watchProxyAdminEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link systemConfigABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function getSystemConfig( +export function getOptimismMintableErc721Factory( config: Omit & { - chainId?: keyof typeof systemConfigAddress + chainId?: keyof typeof optimismMintableErc721FactoryAddress } ) { return getContract({ - abi: systemConfigABI, - address: - systemConfigAddress[config.chainId as keyof typeof systemConfigAddress], + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link systemConfigABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function readSystemConfig< - TAbi extends readonly unknown[] = typeof systemConfigABI, +export function readOptimismMintableErc721Factory< + TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof systemConfigAddress + chainId?: keyof typeof optimismMintableErc721FactoryAddress } ) { return readContract({ - abi: systemConfigABI, - address: - systemConfigAddress[config.chainId as keyof typeof systemConfigAddress], + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link systemConfigABI}__. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * Wraps __{@link writeContract}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function writeSystemConfig< +export function writeOptimismMintableErc721Factory< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof systemConfigAddress + TChainId extends number = keyof typeof optimismMintableErc721FactoryAddress >( config: | (Omit< - WriteContractPreparedArgs, + WriteContractPreparedArgs< + typeof optimismMintableErc721FactoryABI, + TFunctionName + >, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof systemConfigAddress + : keyof typeof optimismMintableErc721FactoryAddress }) | (Omit< - WriteContractUnpreparedArgs, + WriteContractUnpreparedArgs< + typeof optimismMintableErc721FactoryABI, + TFunctionName + >, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof systemConfigAddress + : keyof typeof optimismMintableErc721FactoryAddress }) ) { return writeContract({ - abi: systemConfigABI, - address: - systemConfigAddress[config.chainId as keyof typeof systemConfigAddress], + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link systemConfigABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function prepareWriteSystemConfig< - TAbi extends readonly unknown[] = typeof systemConfigABI, +export function prepareWriteOptimismMintableErc721Factory< + TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof systemConfigAddress } + > & { chainId?: keyof typeof optimismMintableErc721FactoryAddress } ) { return prepareWriteContract({ - abi: systemConfigABI, - address: - systemConfigAddress[config.chainId as keyof typeof systemConfigAddress], + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link systemConfigABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function watchSystemConfigEvent< - TAbi extends readonly unknown[] = typeof systemConfigABI, +export function watchOptimismMintableErc721FactoryEvent< + TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof systemConfigAddress }, + > & { chainId?: keyof typeof optimismMintableErc721FactoryAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: systemConfigABI, - address: - systemConfigAddress[config.chainId as keyof typeof systemConfigAddress], + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], ...config, } as WatchContractEventConfig, callback @@ -6484,119 +10616,129 @@ export function watchSystemConfigEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link systemDictatorABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function getSystemDictator( +export function getOptimismMintableErc721FactoryOptimismGoerli( config: Omit & { - chainId?: keyof typeof systemDictatorAddress + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress } ) { return getContract({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link systemDictatorABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function readSystemDictator< - TAbi extends readonly unknown[] = typeof systemDictatorABI, +export function readOptimismMintableErc721FactoryOptimismGoerli< + TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryOptimismGoerliABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof systemDictatorAddress + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress } ) { return readContract({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link systemDictatorABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function writeSystemDictator< +export function writeOptimismMintableErc721FactoryOptimismGoerli< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof systemDictatorAddress + TChainId extends number = keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress >( config: | (Omit< - WriteContractPreparedArgs, + WriteContractPreparedArgs< + typeof optimismMintableErc721FactoryOptimismGoerliABI, + TFunctionName + >, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof systemDictatorAddress + : keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress }) | (Omit< - WriteContractUnpreparedArgs, + WriteContractUnpreparedArgs< + typeof optimismMintableErc721FactoryOptimismGoerliABI, + TFunctionName + >, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof systemDictatorAddress + : keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress }) ) { return writeContract({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link systemDictatorABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function prepareWriteSystemDictator< - TAbi extends readonly unknown[] = typeof systemDictatorABI, +export function prepareWriteOptimismMintableErc721FactoryOptimismGoerli< + TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryOptimismGoerliABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof systemDictatorAddress } + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + } ) { return prepareWriteContract({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link systemDictatorABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function watchSystemDictatorEvent< - TAbi extends readonly unknown[] = typeof systemDictatorABI, +export function watchOptimismMintableErc721FactoryOptimismGoerliEvent< + TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryOptimismGoerliABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof systemDictatorAddress }, + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: systemDictatorABI, - address: systemDictatorAddress[1], + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], ...config, } as WatchContractEventConfig, callback @@ -6604,68 +10746,74 @@ export function watchSystemDictatorEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link systemDictatorGoerliABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link attestationStationABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function getSystemDictatorGoerli( +export function getAttestationStation( config: Omit & { - chainId?: keyof typeof systemDictatorGoerliAddress + chainId?: keyof typeof attestationStationAddress } ) { return getContract({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], + abi: attestationStationABI, + address: + attestationStationAddress[ + config.chainId as keyof typeof attestationStationAddress + ], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link systemDictatorGoerliABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link attestationStationABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function readSystemDictatorGoerli< - TAbi extends readonly unknown[] = typeof systemDictatorGoerliABI, +export function readAttestationStation< + TAbi extends readonly unknown[] = typeof attestationStationABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof systemDictatorGoerliAddress + chainId?: keyof typeof attestationStationAddress } ) { return readContract({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], + abi: attestationStationABI, + address: + attestationStationAddress[ + config.chainId as keyof typeof attestationStationAddress + ], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link systemDictatorGoerliABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link attestationStationABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function writeSystemDictatorGoerli< +export function writeAttestationStation< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof systemDictatorGoerliAddress + TChainId extends number = keyof typeof attestationStationAddress >( config: | (Omit< - WriteContractPreparedArgs< - typeof systemDictatorGoerliABI, - TFunctionName - >, + WriteContractPreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof systemDictatorGoerliAddress + : keyof typeof attestationStationAddress }) | (Omit< WriteContractUnpreparedArgs< - typeof systemDictatorGoerliABI, + typeof attestationStationABI, TFunctionName >, 'abi' | 'address' @@ -6673,56 +10821,67 @@ export function writeSystemDictatorGoerli< mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof systemDictatorGoerliAddress + : keyof typeof attestationStationAddress }) ) { return writeContract({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], + abi: attestationStationABI, + address: + attestationStationAddress[ + config.chainId as keyof typeof attestationStationAddress + ], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link systemDictatorGoerliABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link attestationStationABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function prepareWriteSystemDictatorGoerli< - TAbi extends readonly unknown[] = typeof systemDictatorGoerliABI, +export function prepareWriteAttestationStation< + TAbi extends readonly unknown[] = typeof attestationStationABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } + > & { chainId?: keyof typeof attestationStationAddress } ) { return prepareWriteContract({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], + abi: attestationStationABI, + address: + attestationStationAddress[ + config.chainId as keyof typeof attestationStationAddress + ], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link systemDictatorGoerliABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link attestationStationABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function watchSystemDictatorGoerliEvent< - TAbi extends readonly unknown[] = typeof systemDictatorGoerliABI, +export function watchAttestationStationEvent< + TAbi extends readonly unknown[] = typeof attestationStationABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof systemDictatorGoerliAddress }, + > & { chainId?: keyof typeof attestationStationAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], + abi: attestationStationABI, + address: + attestationStationAddress[ + config.chainId as keyof typeof attestationStationAddress + ], ...config, } as WatchContractEventConfig, callback @@ -6730,129 +10889,139 @@ export function watchSystemDictatorGoerliEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link mintManagerABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link l2Erc721BridgeABI}__. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function getMintManager( +export function getL2Erc721Bridge( config: Omit & { - chainId?: keyof typeof mintManagerAddress + chainId?: keyof typeof l2Erc721BridgeAddress } ) { return getContract({ - abi: mintManagerABI, + abi: l2Erc721BridgeABI, address: - mintManagerAddress[config.chainId as keyof typeof mintManagerAddress], + l2Erc721BridgeAddress[ + config.chainId as keyof typeof l2Erc721BridgeAddress + ], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link mintManagerABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link l2Erc721BridgeABI}__. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function readMintManager< - TAbi extends readonly unknown[] = typeof mintManagerABI, +export function readL2Erc721Bridge< + TAbi extends readonly unknown[] = typeof l2Erc721BridgeABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof mintManagerAddress + chainId?: keyof typeof l2Erc721BridgeAddress } ) { return readContract({ - abi: mintManagerABI, + abi: l2Erc721BridgeABI, address: - mintManagerAddress[config.chainId as keyof typeof mintManagerAddress], + l2Erc721BridgeAddress[ + config.chainId as keyof typeof l2Erc721BridgeAddress + ], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link mintManagerABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link l2Erc721BridgeABI}__. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function writeMintManager< +export function writeL2Erc721Bridge< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof mintManagerAddress + TChainId extends number = keyof typeof l2Erc721BridgeAddress >( config: | (Omit< - WriteContractPreparedArgs, + WriteContractPreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof mintManagerAddress + : keyof typeof l2Erc721BridgeAddress }) | (Omit< - WriteContractUnpreparedArgs, + WriteContractUnpreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof mintManagerAddress + : keyof typeof l2Erc721BridgeAddress }) ) { return writeContract({ - abi: mintManagerABI, + abi: l2Erc721BridgeABI, address: - mintManagerAddress[config.chainId as keyof typeof mintManagerAddress], + l2Erc721BridgeAddress[ + config.chainId as keyof typeof l2Erc721BridgeAddress + ], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link mintManagerABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link l2Erc721BridgeABI}__. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function prepareWriteMintManager< - TAbi extends readonly unknown[] = typeof mintManagerABI, +export function prepareWriteL2Erc721Bridge< + TAbi extends readonly unknown[] = typeof l2Erc721BridgeABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof mintManagerAddress } + > & { chainId?: keyof typeof l2Erc721BridgeAddress } ) { return prepareWriteContract({ - abi: mintManagerABI, + abi: l2Erc721BridgeABI, address: - mintManagerAddress[config.chainId as keyof typeof mintManagerAddress], + l2Erc721BridgeAddress[ + config.chainId as keyof typeof l2Erc721BridgeAddress + ], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link mintManagerABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link l2Erc721BridgeABI}__. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function watchMintManagerEvent< - TAbi extends readonly unknown[] = typeof mintManagerABI, +export function watchL2Erc721BridgeEvent< + TAbi extends readonly unknown[] = typeof l2Erc721BridgeABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof mintManagerAddress }, + > & { chainId?: keyof typeof l2Erc721BridgeAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: mintManagerABI, + abi: l2Erc721BridgeABI, address: - mintManagerAddress[config.chainId as keyof typeof mintManagerAddress], + l2Erc721BridgeAddress[ + config.chainId as keyof typeof l2Erc721BridgeAddress + ], ...config, } as WatchContractEventConfig, callback @@ -6860,125 +11029,124 @@ export function watchMintManagerEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link optimistABI}__. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function getOptimismMintableErc721Factory( +export function getOptimist( config: Omit & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress + chainId?: keyof typeof optimistAddress } ) { return getContract({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], + abi: optimistABI, + address: optimistAddress[config.chainId as keyof typeof optimistAddress], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link optimistABI}__. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function readOptimismMintableErc721Factory< - TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryABI, +export function readOptimist< + TAbi extends readonly unknown[] = typeof optimistABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress + chainId?: keyof typeof optimistAddress } ) { return readContract({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], + abi: optimistABI, + address: optimistAddress[config.chainId as keyof typeof optimistAddress], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * Wraps __{@link writeContract}__ with `abi` set to __{@link optimistABI}__. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function writeOptimismMintableErc721Factory< +export function writeOptimist< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof optimismMintableErc721FactoryAddress + TChainId extends number = keyof typeof optimistAddress >( config: | (Omit< - WriteContractPreparedArgs< - typeof optimismMintableErc721FactoryABI, - TFunctionName - >, + WriteContractPreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof optimismMintableErc721FactoryAddress + : keyof typeof optimistAddress }) | (Omit< - WriteContractUnpreparedArgs< - typeof optimismMintableErc721FactoryABI, - TFunctionName - >, + WriteContractUnpreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof optimismMintableErc721FactoryAddress + : keyof typeof optimistAddress }) ) { return writeContract({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], + abi: optimistABI, + address: optimistAddress[config.chainId as keyof typeof optimistAddress], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link optimistABI}__. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function prepareWriteOptimismMintableErc721Factory< - TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryABI, +export function prepareWriteOptimist< + TAbi extends readonly unknown[] = typeof optimistABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { chainId?: keyof typeof optimismMintableErc721FactoryAddress } + > & { chainId?: keyof typeof optimistAddress } ) { return prepareWriteContract({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], + abi: optimistABI, + address: optimistAddress[config.chainId as keyof typeof optimistAddress], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link optimistABI}__. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function watchOptimismMintableErc721FactoryEvent< - TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryABI, +export function watchOptimistEvent< + TAbi extends readonly unknown[] = typeof optimistABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof optimismMintableErc721FactoryAddress }, + > & { chainId?: keyof typeof optimistAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], + abi: optimistABI, + address: optimistAddress[config.chainId as keyof typeof optimistAddress], ...config, } as WatchContractEventConfig, callback @@ -6986,129 +11154,184 @@ export function watchOptimismMintableErc721FactoryEvent< } /** - * Wraps __{@link getContract}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link optimistAllowlistABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function getOptimismMintableErc721FactoryOptimismGoerli( +export function getOptimistAllowlist( config: Omit & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + chainId?: keyof typeof optimistAllowlistAddress } ) { return getContract({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + config.chainId as keyof typeof optimistAllowlistAddress + ], ...config, }) } /** - * Wraps __{@link readContract}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. + * Wraps __{@link readContract}__ with `abi` set to __{@link optimistAllowlistABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function readOptimismMintableErc721FactoryOptimismGoerli< - TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryOptimismGoerliABI, +export function readOptimistAllowlist< + TAbi extends readonly unknown[] = typeof optimistAllowlistABI, TFunctionName extends string = string >( config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + chainId?: keyof typeof optimistAllowlistAddress } ) { return readContract({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + config.chainId as keyof typeof optimistAllowlistAddress + ], ...config, } as unknown as ReadContractConfig) } /** - * Wraps __{@link writeContract}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. + * Wraps __{@link getContract}__ with `abi` set to __{@link optimistInviterABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function writeOptimismMintableErc721FactoryOptimismGoerli< +export function getOptimistInviter( + config: Omit & { + chainId?: keyof typeof optimistInviterAddress + } +) { + return getContract({ + abi: optimistInviterABI, + address: + optimistInviterAddress[ + config.chainId as keyof typeof optimistInviterAddress + ], + ...config, + }) +} + +/** + * Wraps __{@link readContract}__ with `abi` set to __{@link optimistInviterABI}__. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export function readOptimistInviter< + TAbi extends readonly unknown[] = typeof optimistInviterABI, + TFunctionName extends string = string +>( + config: Omit, 'abi' | 'address'> & { + chainId?: keyof typeof optimistInviterAddress + } +) { + return readContract({ + abi: optimistInviterABI, + address: + optimistInviterAddress[ + config.chainId as keyof typeof optimistInviterAddress + ], + ...config, + } as unknown as ReadContractConfig) +} + +/** + * Wraps __{@link writeContract}__ with `abi` set to __{@link optimistInviterABI}__. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export function writeOptimistInviter< TFunctionName extends string, TMode extends WriteContractMode, - TChainId extends number = keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + TChainId extends number = keyof typeof optimistInviterAddress >( config: | (Omit< - WriteContractPreparedArgs< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName - >, + WriteContractPreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + : keyof typeof optimistInviterAddress }) | (Omit< - WriteContractUnpreparedArgs< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName - >, + WriteContractUnpreparedArgs, 'abi' | 'address' > & { mode: TMode chainId?: TMode extends 'prepared' ? TChainId - : keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + : keyof typeof optimistInviterAddress }) ) { return writeContract({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + abi: optimistInviterABI, + address: + optimistInviterAddress[ + config.chainId as keyof typeof optimistInviterAddress + ], ...config, - } as unknown as WriteContractArgs) + } as unknown as WriteContractArgs) } /** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. + * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link optimistInviterABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function prepareWriteOptimismMintableErc721FactoryOptimismGoerli< - TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryOptimismGoerliABI, +export function prepareWriteOptimistInviter< + TAbi extends readonly unknown[] = typeof optimistInviterABI, TFunctionName extends string = string >( config: Omit< PrepareWriteContractConfig, 'abi' | 'address' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - } + > & { chainId?: keyof typeof optimistInviterAddress } ) { return prepareWriteContract({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + abi: optimistInviterABI, + address: + optimistInviterAddress[ + config.chainId as keyof typeof optimistInviterAddress + ], ...config, } as unknown as PrepareWriteContractConfig) } /** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link optimistInviterABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function watchOptimismMintableErc721FactoryOptimismGoerliEvent< - TAbi extends readonly unknown[] = typeof optimismMintableErc721FactoryOptimismGoerliABI, +export function watchOptimistInviterEvent< + TAbi extends readonly unknown[] = typeof optimistInviterABI, TEventName extends string = string >( config: Omit< WatchContractEventConfig, 'abi' | 'address' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - }, + > & { chainId?: keyof typeof optimistInviterAddress }, callback: WatchContractEventCallback ) { return watchContractEvent( { - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + abi: optimistInviterABI, + address: + optimistInviterAddress[ + config.chainId as keyof typeof optimistInviterAddress + ], ...config, } as WatchContractEventConfig, callback @@ -7613,126 +11836,6 @@ export function watchL2CrossDomainMessengerEvent< ) } -/** - * Wraps __{@link getContract}__ with `abi` set to __{@link l2Erc721BridgeABI}__. - * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) - */ -export function getL2Erc721Bridge( - config: Omit & { - chainId?: keyof typeof l2Erc721BridgeAddress - } -) { - return getContract({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - ...config, - }) -} - -/** - * Wraps __{@link readContract}__ with `abi` set to __{@link l2Erc721BridgeABI}__. - * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) - */ -export function readL2Erc721Bridge< - TAbi extends readonly unknown[] = typeof l2Erc721BridgeABI, - TFunctionName extends string = string ->( - config: Omit, 'abi' | 'address'> & { - chainId?: keyof typeof l2Erc721BridgeAddress - } -) { - return readContract({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - ...config, - } as unknown as ReadContractConfig) -} - -/** - * Wraps __{@link writeContract}__ with `abi` set to __{@link l2Erc721BridgeABI}__. - * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) - */ -export function writeL2Erc721Bridge< - TFunctionName extends string, - TMode extends WriteContractMode, - TChainId extends number = keyof typeof l2Erc721BridgeAddress ->( - config: - | (Omit< - WriteContractPreparedArgs, - 'abi' | 'address' - > & { - mode: TMode - chainId?: TMode extends 'prepared' - ? TChainId - : keyof typeof l2Erc721BridgeAddress - }) - | (Omit< - WriteContractUnpreparedArgs, - 'abi' | 'address' - > & { - mode: TMode - chainId?: TMode extends 'prepared' - ? TChainId - : keyof typeof l2Erc721BridgeAddress - }) -) { - return writeContract({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - ...config, - } as unknown as WriteContractArgs) -} - -/** - * Wraps __{@link prepareWriteContract}__ with `abi` set to __{@link l2Erc721BridgeABI}__. - * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) - */ -export function prepareWriteL2Erc721Bridge< - TAbi extends readonly unknown[] = typeof l2Erc721BridgeABI, - TFunctionName extends string = string ->( - config: Omit< - PrepareWriteContractConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } -) { - return prepareWriteContract({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - ...config, - } as unknown as PrepareWriteContractConfig) -} - -/** - * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link l2Erc721BridgeABI}__. - * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) - */ -export function watchL2Erc721BridgeEvent< - TAbi extends readonly unknown[] = typeof l2Erc721BridgeABI, - TEventName extends string = string ->( - config: Omit< - WatchContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l2Erc721BridgeAddress }, - callback: WatchContractEventCallback -) { - return watchContractEvent( - { - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - ...config, - } as WatchContractEventConfig, - callback - ) -} - /** * Wraps __{@link getContract}__ with `abi` set to __{@link l2StandardBridgeABI}__. * diff --git a/packages/contracts-ts/src/constants.ts b/packages/contracts-ts/src/constants.ts index c7c4986104971..3a7ceb822619a 100644 --- a/packages/contracts-ts/src/constants.ts +++ b/packages/contracts-ts/src/constants.ts @@ -1,4 +1,4 @@ -// Generated by @wagmi/cli@1.3.0 on 7/13/2023 at 5:05:36 PM +// Generated by @wagmi/cli@1.3.0 on 7/14/2023 at 10:11:26 AM /* eslint-disable */ @@ -3381,1965 +3381,6760 @@ export const systemDictatorGoerliConfig = { } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// MintManager +// AssetReceiver ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export const mintManagerABI = [ +export const assetReceiverABI = [ { stateMutability: 'nonpayable', type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, inputs: [ - { name: '_upgrader', internalType: 'address', type: 'address' }, - { name: '_governanceToken', internalType: 'address', type: 'address' }, + { name: 'user', internalType: 'address', type: 'address', indexed: true }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, ], + name: 'OwnerUpdated', }, { type: 'event', anonymous: false, inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, { - name: 'previousOwner', + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'ReceivedETH', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'newOwner', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], - name: 'OwnershipTransferred', + name: 'WithdrewERC20', }, { - stateMutability: 'view', + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, + ], + name: 'WithdrewERC721', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewETH', + }, + { + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'DENOMINATOR', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'MINT_CAP', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MINT_PERIOD', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'governanceToken', - outputs: [ - { name: '', internalType: 'contract GovernanceToken', type: 'address' }, - ], + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_account', internalType: 'address', type: 'address' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, { name: '_amount', internalType: 'uint256', type: 'uint256' }, ], - name: 'mint', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'mintPermittedAfter', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'owner', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + ], + name: 'withdrawERC20', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'renounceOwnership', + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], - name: 'transferOwnership', + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_newMintManager', internalType: 'address', type: 'address' }, - ], - name: 'upgrade', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, ] as const /** - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export const mintManagerAddress = { - 10: '0x5C4e7Ba1E219E47948e6e3F55019A647bA501005', - 420: '0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76', +export const assetReceiverAddress = { + 1: '0x15DdA60616Ffca20371ED1659dBB78E888f65556', + 10: '0x15DdA60616Ffca20371ED1659dBB78E888f65556', } as const /** - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export const mintManagerConfig = { - address: mintManagerAddress, - abi: mintManagerABI, +export const assetReceiverConfig = { + address: assetReceiverAddress, + abi: assetReceiverABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// OptimismMintableERC721Factory +// CheckBalanceHigh ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export const optimismMintableErc721FactoryABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [ - { name: '_bridge', internalType: 'address', type: 'address' }, - { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, - ], - }, +export const checkBalanceHighABI = [ { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'deployer', - internalType: 'address', - type: 'address', + name: 'params', + internalType: 'struct CheckBalanceHigh.Params', + type: 'tuple', + components: [ + { name: 'target', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + ], indexed: false, }, ], - name: 'OptimismMintableERC721Created', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'bridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_symbol', internalType: 'string', type: 'string' }, - ], - name: 'createOptimismMintableERC721', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], - name: 'isOptimismMintableERC721', + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'remoteChainId', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, ] as const /** - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export const optimismMintableErc721FactoryAddress = { - 10: '0x4200000000000000000000000000000000000017', +export const checkBalanceHighAddress = { + 1: '0x7eC64a8a591bFf829ff6C8be76074D540ACb813F', + 5: '0x7eC64a8a591bFf829ff6C8be76074D540ACb813F', + 420: '0x5d7103853f12109A7d27F118e54BbC654ad847E9', } as const /** - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export const optimismMintableErc721FactoryConfig = { - address: optimismMintableErc721FactoryAddress, - abi: optimismMintableErc721FactoryABI, +export const checkBalanceHighConfig = { + address: checkBalanceHighAddress, + abi: checkBalanceHighABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// OptimismMintableERC721Factory_optimism-goerli +// CheckBalanceLow ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export const optimismMintableErc721FactoryOptimismGoerliABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [ - { name: '_bridge', internalType: 'address', type: 'address' }, - { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, - ], - }, +export const checkBalanceLowABI = [ { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'deployer', - internalType: 'address', - type: 'address', + name: 'params', + internalType: 'struct CheckBalanceLow.Params', + type: 'tuple', + components: [ + { name: 'target', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + ], indexed: false, }, ], - name: 'OptimismMintableERC721Created', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'BRIDGE', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'REMOTE_CHAIN_ID', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_symbol', internalType: 'string', type: 'string' }, - ], - name: 'createOptimismMintableERC721', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], - name: 'isOptimismMintableERC721', + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export const optimismMintableErc721FactoryOptimismGoerliAddress = { - 420: '0x4200000000000000000000000000000000000017', +export const checkBalanceLowAddress = { + 1: '0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640', + 5: '0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640', + 420: '0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export const optimismMintableErc721FactoryOptimismGoerliConfig = { - address: optimismMintableErc721FactoryOptimismGoerliAddress, - abi: optimismMintableErc721FactoryOptimismGoerliABI, +export const checkBalanceLowConfig = { + address: checkBalanceLowAddress, + abi: checkBalanceLowABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// BaseFeeVault +// CheckGelatoLow ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export const baseFeeVaultABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], - }, +export const checkGelatoLowABI = [ { type: 'event', anonymous: false, inputs: [ { - name: 'value', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, - { - name: 'from', - internalType: 'address', - type: 'address', + name: 'params', + internalType: 'struct CheckGelatoLow.Params', + type: 'tuple', + components: [ + { name: 'treasury', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + { name: 'recipient', internalType: 'address', type: 'address' }, + ], indexed: false, }, ], - name: 'Withdrawal', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'MIN_WITHDRAWAL_AMOUNT', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'RECIPIENT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'totalProcessed', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [], - name: 'withdraw', - outputs: [], + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export const baseFeeVaultAddress = { - 420: '0x4200000000000000000000000000000000000019', +export const checkGelatoLowAddress = { + 1: '0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa', + 5: '0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa', + 420: '0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export const baseFeeVaultConfig = { - address: baseFeeVaultAddress, - abi: baseFeeVaultABI, +export const checkGelatoLowConfig = { + address: checkGelatoLowAddress, + abi: checkGelatoLowABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// GasPriceOracle +// CheckTrue ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export const gasPriceOracleABI = [ - { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'baseFee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, +export const checkTrueABI = [ { stateMutability: 'pure', type: 'function', - inputs: [], - name: 'decimals', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'gasPrice', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], - name: 'getL1Fee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], - name: 'getL1GasUsed', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1BaseFee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'overhead', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'scalar', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + inputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], + name: 'check', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export const gasPriceOracleAddress = { - 420: '0x420000000000000000000000000000000000000F', +export const checkTrueAddress = { + 1: '0x5c741a38cb11424711231777D71689C458eE835D', + 5: '0x5c741a38cb11424711231777D71689C458eE835D', + 420: '0x47443D0C184e022F19BD1578F5bca6B8a9F58E32', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export const gasPriceOracleConfig = { - address: gasPriceOracleAddress, - abi: gasPriceOracleABI, +export const checkTrueConfig = { + address: checkTrueAddress, + abi: checkTrueABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L1Block +// Drippie ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l1BlockABI = [ - { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, +export const drippieABI = [ { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'DEPOSITOR_ACCOUNT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'basefee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + indexed: false, + }, + ], + name: 'DripCreated', }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'batcherHash', - outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'hash', - outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1FeeOverhead', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1FeeScalar', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'number', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'sequenceNumber', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_number', internalType: 'uint64', type: 'uint64' }, - { name: '_timestamp', internalType: 'uint64', type: 'uint64' }, - { name: '_basefee', internalType: 'uint256', type: 'uint256' }, - { name: '_hash', internalType: 'bytes32', type: 'bytes32' }, - { name: '_sequenceNumber', internalType: 'uint64', type: 'uint64' }, - { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, - { name: '_l1FeeOverhead', internalType: 'uint256', type: 'uint256' }, - { name: '_l1FeeScalar', internalType: 'uint256', type: 'uint256' }, - ], - name: 'setL1BlockValues', - outputs: [], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'timestamp', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, -] as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) - */ -export const l1BlockAddress = { - 420: '0x4200000000000000000000000000000000000015', -} as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) - */ -export const l1BlockConfig = { - address: l1BlockAddress, - abi: l1BlockABI, -} as const - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L1FeeVault -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) - */ -export const l1FeeVaultABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'executor', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'timestamp', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'DripExecuted', }, { type: 'event', anonymous: false, inputs: [ { - name: 'value', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'from', - internalType: 'address', - type: 'address', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', indexed: false, }, ], - name: 'Withdrawal', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'MIN_WITHDRAWAL_AMOUNT', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'RECIPIENT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'totalProcessed', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'DripStatusUpdated', }, { - stateMutability: 'nonpayable', - type: 'function', - inputs: [], - name: 'withdraw', - outputs: [], - }, - { stateMutability: 'payable', type: 'receive' }, -] as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) - */ -export const l1FeeVaultAddress = { - 420: '0x420000000000000000000000000000000000001A', -} as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) - */ -export const l1FeeVaultConfig = { - address: l1FeeVaultAddress, - abi: l1FeeVaultABI, -} as const - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2CrossDomainMessenger -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) - */ -export const l2CrossDomainMessengerABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', + type: 'event', + anonymous: false, inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, { - name: '_l1CrossDomainMessenger', + name: 'newOwner', internalType: 'address', type: 'address', + indexed: true, }, ], + name: 'OwnerUpdated', }, { type: 'event', anonymous: false, inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, { - name: 'msgHash', - internalType: 'bytes32', - type: 'bytes32', - indexed: true, + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, }, ], - name: 'FailedRelayedMessage', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, - ], - name: 'Initialized', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ { - name: 'msgHash', - internalType: 'bytes32', - type: 'bytes32', + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', indexed: true, }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], - name: 'RelayedMessage', + name: 'WithdrewERC20', }, { type: 'event', anonymous: false, inputs: [ { - name: 'target', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'sender', + name: 'recipient', internalType: 'address', type: 'address', - indexed: false, - }, - { name: 'message', internalType: 'bytes', type: 'bytes', indexed: false }, - { - name: 'messageNonce', - internalType: 'uint256', - type: 'uint256', - indexed: false, + indexed: true, }, { - name: 'gasLimit', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'SentMessage', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ { - name: 'sender', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'value', + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, ], - name: 'SentMessageExtension1', + name: 'WithdrewETH', }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'MESSAGE_VERSION', - outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'MIN_GAS_CALLDATA_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + ], + name: 'create', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'OTHER_MESSENGER', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', + outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'RELAY_CALL_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', + outputs: [ + { + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, + ], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'RELAY_CONSTANT_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'RELAY_GAS_CHECK_BUFFER', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'RELAY_RESERVED_GAS', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], }, { - stateMutability: 'pure', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_message', internalType: 'bytes', type: 'bytes' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, ], - name: 'baseGas', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'failedMessages', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + name: 'status', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'initialize', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1CrossDomainMessenger', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'messageNonce', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_nonce', internalType: 'uint256', type: 'uint256' }, - { name: '_sender', internalType: 'address', type: 'address' }, - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_value', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint256', type: 'uint256' }, - { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], - name: 'relayMessage', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_message', internalType: 'bytes', type: 'bytes' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, ], - name: 'sendMessage', + name: 'withdrawERC721', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'successfulMessages', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], - }, - { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'xDomainMessageSender', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', + outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2CrossDomainMessengerAddress = { - 420: '0x4200000000000000000000000000000000000007', +export const drippieAddress = { + 1: '0x44b3A2a040057eBafC601A78647e805fd58B1f50', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2CrossDomainMessengerConfig = { - address: l2CrossDomainMessengerAddress, - abi: l2CrossDomainMessengerABI, +export const drippieConfig = { + address: drippieAddress, + abi: drippieABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2ERC721Bridge +// Drippie_goerli ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2Erc721BridgeABI = [ +export const drippieGoerliABI = [ { stateMutability: 'nonpayable', type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, inputs: [ - { name: '_messenger', internalType: 'address', type: 'address' }, - { name: '_otherBridge', internalType: 'address', type: 'address' }, + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + indexed: false, + }, ], + name: 'DripCreated', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'executor', internalType: 'address', type: 'address', + indexed: false, + }, + { + name: 'timestamp', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'DripExecuted', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'remoteToken', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + indexed: false, + }, + ], + name: 'DripStatusUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, + { + name: 'newOwner', internalType: 'address', type: 'address', indexed: true, }, + ], + name: 'OwnerUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'tokenId', + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ERC721BridgeFinalized', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'remoteToken', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'tokenId', + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, + ], + name: 'WithdrewERC20', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'ERC721BridgeInitiated', + name: 'WithdrewERC721', }, { - stateMutability: 'nonpayable', + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewETH', + }, + { + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC721', - outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC721To', - outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, ], - name: 'finalizeBridgeERC721', + name: 'create', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'messenger', + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', outputs: [ { - name: '', - internalType: 'contract CrossDomainMessenger', - type: 'address', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, ], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'otherBridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + ], + name: 'status', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + ], + name: 'withdrawERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', + outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2Erc721BridgeAddress = { - 420: '0x4200000000000000000000000000000000000014', +export const drippieGoerliAddress = { + 5: '0x44b3A2a040057eBafC601A78647e805fd58B1f50', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2Erc721BridgeConfig = { - address: l2Erc721BridgeAddress, - abi: l2Erc721BridgeABI, +export const drippieGoerliConfig = { + address: drippieGoerliAddress, + abi: drippieGoerliABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2StandardBridge +// Drippie_optimism-goerli ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export const l2StandardBridgeABI = [ +export const drippieOptimismGoerliABI = [ { stateMutability: 'nonpayable', type: 'constructor', - inputs: [ - { - name: '_otherBridge', - internalType: 'address payable', - type: 'address', - }, - ], + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], }, { type: 'event', anonymous: false, inputs: [ { - name: 'l1Token', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'l2Token', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], indexed: false, }, ], - name: 'DepositFinalized', + name: 'DripCreated', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'remoteToken', + name: 'executor', internalType: 'address', type: 'address', - indexed: true, + indexed: false, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'amount', + name: 'timestamp', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ERC20BridgeFinalized', + name: 'DripExecuted', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'remoteToken', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + indexed: false, + }, + ], + name: 'DripStatusUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, + { + name: 'newOwner', internalType: 'address', type: 'address', indexed: true, }, + ], + name: 'OwnerUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ERC20BridgeInitiated', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, { name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ETHBridgeFinalized', + name: 'WithdrewERC20', }, { type: 'event', anonymous: false, inputs: [ - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, }, { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'ETHBridgeInitiated', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ { - name: 'l1Token', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'l2Token', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'WithdrawalInitiated', + name: 'WithdrewETH', }, { - stateMutability: 'nonpayable', + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC20', - outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC20To', - outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, ], - name: 'bridgeETH', + name: 'create', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'bridgeETHTo', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [ - { name: '', internalType: 'address', type: 'address' }, - { name: '', internalType: 'address', type: 'address' }, + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', + outputs: [ + { + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, ], - name: 'deposits', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'finalizeBridgeERC20', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, ], - name: 'finalizeBridgeETH', + name: 'status', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l1Token', internalType: 'address', type: 'address' }, - { name: '_l2Token', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, { name: '_to', internalType: 'address', type: 'address' }, { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, ], - name: 'finalizeDeposit', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1TokenBridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'messenger', - outputs: [ - { - name: '', - internalType: 'contract CrossDomainMessenger', - type: 'address', - }, + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], + name: 'withdrawERC20', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', + outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address payable', type: 'address' }, { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, ], - name: 'withdraw', + name: 'withdrawETH', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_l2Token', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'withdrawTo', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', outputs: [], }, { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export const l2StandardBridgeAddress = { - 420: '0x4200000000000000000000000000000000000010', +export const drippieOptimismGoerliAddress = { + 420: '0x8D8d533C16D23847EB04EEB0925be8900Dd3af86', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export const l2StandardBridgeConfig = { - address: l2StandardBridgeAddress, - abi: l2StandardBridgeABI, +export const drippieOptimismGoerliConfig = { + address: drippieOptimismGoerliAddress, + abi: drippieOptimismGoerliABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2ToL1MessagePasser +// TeleportrWithdrawer ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export const l2ToL1MessagePasserABI = [ - { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, +export const teleportrWithdrawerABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, { type: 'event', anonymous: false, inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, { - name: 'nonce', + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'OwnerUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', internalType: 'uint256', type: 'uint256', + indexed: false, + }, + ], + name: 'ReceivedETH', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', indexed: true, }, { - name: 'sender', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, { - name: 'target', + name: 'asset', internalType: 'address', type: 'address', indexed: true, }, { - name: 'value', + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, + ], + name: 'WithdrewERC20', + }, + { + type: 'event', + anonymous: false, + inputs: [ { - name: 'gasLimit', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, }, - { name: 'data', internalType: 'bytes', type: 'bytes', indexed: false }, { - name: 'withdrawalHash', - internalType: 'bytes32', - type: 'bytes32', - indexed: false, + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'MessagePassed', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, { name: 'amount', internalType: 'uint256', type: 'uint256', - indexed: true, + indexed: false, }, ], - name: 'WithdrawerBalanceBurnt', + name: 'WithdrewETH', + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MESSAGE_VERSION', - outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + name: 'data', + outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'recipient', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], + name: 'setData', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + name: 'setRecipient', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', + inputs: [{ name: '_teleportr', internalType: 'address', type: 'address' }], + name: 'setTeleportr', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', inputs: [], - name: 'burn', + name: 'teleportr', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_gasLimit', internalType: 'uint256', type: 'uint256' }, - { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], - name: 'initiateWithdrawal', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'messageNonce', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'sentMessages', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', + outputs: [], + }, + { + stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'withdrawFromTeleportr', + outputs: [], }, { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export const l2ToL1MessagePasserAddress = { - 420: '0x4200000000000000000000000000000000000016', +export const teleportrWithdrawerAddress = { + 1: '0x78A25524D90E3D0596558fb43789bD800a5c3007', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export const l2ToL1MessagePasserConfig = { - address: l2ToL1MessagePasserAddress, - abi: l2ToL1MessagePasserABI, +export const teleportrWithdrawerConfig = { + address: teleportrWithdrawerAddress, + abi: teleportrWithdrawerABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SequencerFeeVault +// MintManager ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export const sequencerFeeVaultABI = [ +export const mintManagerABI = [ { stateMutability: 'nonpayable', type: 'constructor', - inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + inputs: [ + { name: '_upgrader', internalType: 'address', type: 'address' }, + { name: '_governanceToken', internalType: 'address', type: 'address' }, + ], }, { type: 'event', anonymous: false, inputs: [ { - name: 'value', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'previousOwner', + internalType: 'address', + type: 'address', + indexed: true, }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'from', + name: 'newOwner', internalType: 'address', type: 'address', - indexed: false, + indexed: true, }, ], - name: 'Withdrawal', + name: 'OwnershipTransferred', }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MIN_WITHDRAWAL_AMOUNT', + name: 'DENOMINATOR', outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'RECIPIENT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'MINT_CAP', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'l1FeeWallet', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'MINT_PERIOD', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'totalProcessed', + name: 'governanceToken', + outputs: [ + { name: '', internalType: 'contract GovernanceToken', type: 'address' }, + ], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_account', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'mint', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'mintPermittedAfter', outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'withdraw', + name: 'renounceOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_newMintManager', internalType: 'address', type: 'address' }, + ], + name: 'upgrade', outputs: [], }, - { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export const sequencerFeeVaultAddress = { - 420: '0x4200000000000000000000000000000000000011', +export const mintManagerAddress = { + 10: '0x5C4e7Ba1E219E47948e6e3F55019A647bA501005', + 420: '0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export const sequencerFeeVaultConfig = { - address: sequencerFeeVaultAddress, - abi: sequencerFeeVaultABI, +export const mintManagerConfig = { + address: mintManagerAddress, + abi: mintManagerABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// eslintIgnore -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// addressesByContractByNetwork +// OptimismMintableERC721Factory ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const addresses = { - AddressManager: { - '1': '0xdE1FCfB0851916CA5101820A69b13a4E276bd81F', - '5': '0xa6f73589243a6A7a9023b1Fa0651b1d89c177111', +/** + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_bridge', internalType: 'address', type: 'address' }, + { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, + ], }, - L1CrossDomainMessenger: { - '1': '0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1', - '5': '0x5086d1eEF304eb5284A0f6720f79403b4e9bE294', + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'deployer', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'OptimismMintableERC721Created', }, - L1ERC721Bridge: { - '1': '0x5a7749f83b81B301cAb5f48EB8516B986DAef23D', - '5': '0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9', + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'bridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, - L1StandardBridge: { - '1': '0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1', - '5': '0x636Af16bf2f682dD3109e60102b8E1A089FedAa8', + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'createOptimismMintableERC721', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, - L2OutputOracle: { - '1': '0xdfe97868233d1aa22e815a266982f2cf17685a27', - '5': '0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0', + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'isOptimismMintableERC721', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - OptimismMintableERC20Factory: { - '1': '0x4200000000000000000000000000000000000012', - '5': '0x4200000000000000000000000000000000000012', - '420': '0x4200000000000000000000000000000000000012', + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'remoteChainId', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, - OptimismPortal: { - '1': '0xbEb5Fc579115071764c7423A4f12eDde41f106Ed', - '5': '0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383', + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], }, - PortalSender: { - '1': '0x0A893d9576b9cFD9EF78595963dc973238E78210', - '5': '0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4', +] as const + +/** + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryAddress = { + 10: '0x4200000000000000000000000000000000000017', +} as const + +/** + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryConfig = { + address: optimismMintableErc721FactoryAddress, + abi: optimismMintableErc721FactoryABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// OptimismMintableERC721Factory_optimism-goerli +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryOptimismGoerliABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_bridge', internalType: 'address', type: 'address' }, + { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, + ], }, - ProxyAdmin: { - '1': '0x4200000000000000000000000000000000000018', - '5': '0x4200000000000000000000000000000000000018', + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'deployer', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'OptimismMintableERC721Created', }, - SystemConfig: { - '1': '0x229047fed2591dbec1eF1118d64F7aF3dB9EB290', - '5': '0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60', + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'BRIDGE', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, - SystemDictator: { '1': '0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB' }, - SystemDictator_goerli: { '5': '0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971' }, - MintManager: { - '10': '0x5C4e7Ba1E219E47948e6e3F55019A647bA501005', - '420': '0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76', + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'REMOTE_CHAIN_ID', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, - OptimismMintableERC721Factory: { - '10': '0x4200000000000000000000000000000000000017', + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'createOptimismMintableERC721', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, - 'OptimismMintableERC721Factory_optimism-goerli': { - '420': '0x4200000000000000000000000000000000000017', + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'isOptimismMintableERC721', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - BaseFeeVault: { '420': '0x4200000000000000000000000000000000000019' }, - GasPriceOracle: { '420': '0x420000000000000000000000000000000000000F' }, - L1Block: { '420': '0x4200000000000000000000000000000000000015' }, - L1FeeVault: { '420': '0x420000000000000000000000000000000000001a' }, - L2CrossDomainMessenger: { - '420': '0x4200000000000000000000000000000000000007', + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], }, - L2ERC721Bridge: { '420': '0x4200000000000000000000000000000000000014' }, - L2StandardBridge: { '420': '0x4200000000000000000000000000000000000010' }, - L2ToL1MessagePasser: { '420': '0x4200000000000000000000000000000000000016' }, - SequencerFeeVault: { '420': '0x4200000000000000000000000000000000000011' }, -} as const -export const predeploys = { - LegacyMessagePasser: { - address: '0x4200000000000000000000000000000000000000', - introduced: 'Legacy', - deprecated: true, - proxied: true, - }, - DeployerWhitelist: { - address: '0x4200000000000000000000000000000000000002', - introduced: 'Legacy', - deprecated: true, - proxied: true, - }, - LegacyERC20ETH: { - address: '0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000', - introduced: 'Legacy', - deprecated: true, - proxied: false, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryOptimismGoerliAddress = { + 420: '0x4200000000000000000000000000000000000017', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryOptimismGoerliConfig = { + address: optimismMintableErc721FactoryOptimismGoerliAddress, + abi: optimismMintableErc721FactoryOptimismGoerliABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// AttestationStation +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + */ +export const attestationStationABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'creator', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'about', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'key', internalType: 'bytes32', type: 'bytes32', indexed: true }, + { name: 'val', internalType: 'bytes', type: 'bytes', indexed: false }, + ], + name: 'AttestationCreated', }, - WETH9: { - address: '0x4200000000000000000000000000000000000006', - introduced: 'Legacy', - deprecated: false, - proxied: false, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { + name: '_attestations', + internalType: 'struct AttestationStation.AttestationData[]', + type: 'tuple[]', + components: [ + { name: 'about', internalType: 'address', type: 'address' }, + { name: 'key', internalType: 'bytes32', type: 'bytes32' }, + { name: 'val', internalType: 'bytes', type: 'bytes' }, + ], + }, + ], + name: 'attest', + outputs: [], }, - L2CrossDomainMessenger: { - address: '0x4200000000000000000000000000000000000007', - introduced: 'Legacy', - deprecated: false, - proxied: true, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_about', internalType: 'address', type: 'address' }, + { name: '_key', internalType: 'bytes32', type: 'bytes32' }, + { name: '_val', internalType: 'bytes', type: 'bytes' }, + ], + name: 'attest', + outputs: [], }, - L2StandardBridge: { - address: '0x4200000000000000000000000000000000000010', - introduced: 'Legacy', - deprecated: false, - proxied: true, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bytes32', type: 'bytes32' }, + ], + name: 'attestations', + outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], }, - SequencerFeeVault: { - address: '0x4200000000000000000000000000000000000011', - introduced: 'Legacy', - deprecated: false, - proxied: true, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], }, - OptimismMintableERC20Factory: { - address: '0x4200000000000000000000000000000000000012', - introduced: 'Legacy', - deprecated: false, - proxied: true, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + */ +export const attestationStationAddress = { + 10: '0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77', + 420: '0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + */ +export const attestationStationConfig = { + address: attestationStationAddress, + abi: attestationStationABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2ERC721Bridge +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + */ +export const l2Erc721BridgeABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_messenger', internalType: 'address', type: 'address' }, + { name: '_otherBridge', internalType: 'address', type: 'address' }, + ], }, - L1BlockNumber: { - address: '0x4200000000000000000000000000000000000013', - introduced: 'Legacy', - deprecated: true, - proxied: true, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC721BridgeFinalized', }, - GasPriceOracle: { - address: '0x420000000000000000000000000000000000000F', - introduced: 'Legacy', - deprecated: false, - proxied: true, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC721BridgeInitiated', }, - GovernanceToken: { - address: '0x4200000000000000000000000000000000000042', - introduced: 'Legacy', - deprecated: false, - proxied: false, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC721', + outputs: [], }, - L1Block: { - address: '0x4200000000000000000000000000000000000015', - introduced: 'Bedrock', - deprecated: false, - proxied: true, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC721To', + outputs: [], }, - L2ToL1MessagePasser: { - address: '0x4200000000000000000000000000000000000016', - introduced: 'Bedrock', - deprecated: false, - proxied: true, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeERC721', + outputs: [], }, - L2ERC721Bridge: { - address: '0x4200000000000000000000000000000000000014', - introduced: 'Legacy', - deprecated: false, - proxied: true, - }, - OptimismMintableERC721Factory: { - address: '0x4200000000000000000000000000000000000017', - introduced: 'Bedrock', - deprecated: false, - proxied: true, - }, - ProxyAdmin: { - address: '0x4200000000000000000000000000000000000018', - introduced: 'Bedrock', - deprecated: false, - proxied: true, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messenger', + outputs: [ + { + name: '', + internalType: 'contract CrossDomainMessenger', + type: 'address', + }, + ], }, - BaseFeeVault: { - address: '0x4200000000000000000000000000000000000019', - introduced: 'Bedrock', - deprecated: false, - proxied: true, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'otherBridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, - L1FeeVault: { - address: '0x420000000000000000000000000000000000001a', - introduced: 'Bedrock', - deprecated: false, - proxied: true, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], }, -} +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + */ +export const l2Erc721BridgeAddress = { + 10: '0x4200000000000000000000000000000000000014', + 420: '0x4200000000000000000000000000000000000014', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + */ +export const l2Erc721BridgeConfig = { + address: l2Erc721BridgeAddress, + abi: l2Erc721BridgeABI, +} as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// abisByContractByNetwork +// Optimist ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const abis = { - AddressManager: [ +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export const optimistABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + { name: '_baseURIAttestor', internalType: 'address', type: 'address' }, + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + { + name: '_optimistAllowlist', + internalType: 'contract OptimistAllowlist', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'owner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'approved', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'Approval', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'owner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'operator', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'approved', internalType: 'bool', type: 'bool', indexed: false }, + ], + name: 'ApprovalForAll', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'Transfer', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ATTESTATION_STATION', + outputs: [ + { + name: '', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'BASE_URI_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'BASE_URI_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OPTIMIST_ALLOWLIST', + outputs: [ + { name: '', internalType: 'contract OptimistAllowlist', type: 'address' }, + ], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'uint256', type: 'uint256' }, + ], + name: 'approve', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'owner', internalType: 'address', type: 'address' }], + name: 'balanceOf', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'baseURI', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'burn', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'getApproved', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: 'owner', internalType: 'address', type: 'address' }, + { name: 'operator', internalType: 'address', type: 'address' }, + ], + name: 'isApprovedForAll', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + name: 'isOnAllowList', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + name: 'mint', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'name', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'ownerOf', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + ], + name: 'safeTransferFrom', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'safeTransferFrom', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bool', type: 'bool' }, + ], + name: 'setApprovalForAll', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }], + name: 'supportsInterface', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'symbol', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + name: 'tokenIdOfAddress', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'tokenURI', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + ], + name: 'transferFrom', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export const optimistAddress = { + 10: '0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5', + 420: '0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export const optimistConfig = { + address: optimistAddress, + abi: optimistABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// OptimistAllowlist +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + */ +export const optimistAllowlistABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + { name: '_allowlistAttestor', internalType: 'address', type: 'address' }, + { + name: '_coinbaseQuestAttestor', + internalType: 'address', + type: 'address', + }, + { name: '_optimistInviter', internalType: 'address', type: 'address' }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ALLOWLIST_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ATTESTATION_STATION', + outputs: [ + { + name: '', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'COINBASE_QUEST_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OPTIMIST_CAN_MINT_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OPTIMIST_INVITER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_claimer', internalType: 'address', type: 'address' }], + name: 'isAllowedToMint', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + */ +export const optimistAllowlistAddress = { + 10: '0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180', + 420: '0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + */ +export const optimistAllowlistConfig = { + address: optimistAllowlistAddress, + abi: optimistAllowlistABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// OptimistInviter +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export const optimistInviterABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_inviteGranter', internalType: 'address', type: 'address' }, + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'issuer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'claimer', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'InviteClaimed', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ATTESTATION_STATION', + outputs: [ + { + name: '', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'CAN_INVITE_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'CLAIMABLE_INVITE_TYPEHASH', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'EIP712_VERSION', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'INVITE_GRANTER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_COMMITMENT_PERIOD', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_claimer', internalType: 'address', type: 'address' }, + { + name: '_claimableInvite', + internalType: 'struct OptimistInviter.ClaimableInvite', + type: 'tuple', + components: [ + { name: 'issuer', internalType: 'address', type: 'address' }, + { name: 'nonce', internalType: 'bytes32', type: 'bytes32' }, + ], + }, + { name: '_signature', internalType: 'bytes', type: 'bytes' }, + ], + name: 'claimInvite', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_commitment', internalType: 'bytes32', type: 'bytes32' }], + name: 'commitInvite', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'commitmentTimestamps', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'inviteCounts', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_accounts', internalType: 'address[]', type: 'address[]' }, + { name: '_inviteCount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'setInviteCounts', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bytes32', type: 'bytes32' }, + ], + name: 'usedNonces', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export const optimistInviterAddress = { + 10: '0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929', + 420: '0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export const optimistInviterConfig = { + address: optimistInviterAddress, + abi: optimistInviterABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// BaseFeeVault +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export const baseFeeVaultABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Withdrawal', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_WITHDRAWAL_AMOUNT', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RECIPIENT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'totalProcessed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'withdraw', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export const baseFeeVaultAddress = { + 420: '0x4200000000000000000000000000000000000019', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export const baseFeeVaultConfig = { + address: baseFeeVaultAddress, + abi: baseFeeVaultABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GasPriceOracle +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + */ +export const gasPriceOracleABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'baseFee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [], + name: 'decimals', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'gasPrice', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], + name: 'getL1Fee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], + name: 'getL1GasUsed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1BaseFee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'overhead', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'scalar', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + */ +export const gasPriceOracleAddress = { + 420: '0x420000000000000000000000000000000000000F', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + */ +export const gasPriceOracleConfig = { + address: gasPriceOracleAddress, + abi: gasPriceOracleABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L1Block +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + */ +export const l1BlockABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'DEPOSITOR_ACCOUNT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'basefee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'batcherHash', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'hash', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1FeeOverhead', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1FeeScalar', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'number', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'sequenceNumber', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_number', internalType: 'uint64', type: 'uint64' }, + { name: '_timestamp', internalType: 'uint64', type: 'uint64' }, + { name: '_basefee', internalType: 'uint256', type: 'uint256' }, + { name: '_hash', internalType: 'bytes32', type: 'bytes32' }, + { name: '_sequenceNumber', internalType: 'uint64', type: 'uint64' }, + { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, + { name: '_l1FeeOverhead', internalType: 'uint256', type: 'uint256' }, + { name: '_l1FeeScalar', internalType: 'uint256', type: 'uint256' }, + ], + name: 'setL1BlockValues', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'timestamp', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + */ +export const l1BlockAddress = { + 420: '0x4200000000000000000000000000000000000015', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + */ +export const l1BlockConfig = { + address: l1BlockAddress, + abi: l1BlockABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L1FeeVault +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export const l1FeeVaultABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Withdrawal', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_WITHDRAWAL_AMOUNT', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RECIPIENT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'totalProcessed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'withdraw', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export const l1FeeVaultAddress = { + 420: '0x420000000000000000000000000000000000001A', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export const l1FeeVaultConfig = { + address: l1FeeVaultAddress, + abi: l1FeeVaultABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2CrossDomainMessenger +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export const l2CrossDomainMessengerABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_l1CrossDomainMessenger', + internalType: 'address', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'msgHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + ], + name: 'FailedRelayedMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'msgHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + ], + name: 'RelayedMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'target', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: false, + }, + { name: 'message', internalType: 'bytes', type: 'bytes', indexed: false }, + { + name: 'messageNonce', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'gasLimit', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'SentMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'SentMessageExtension1', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MESSAGE_VERSION', + outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_CALLDATA_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OTHER_MESSENGER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_CALL_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_CONSTANT_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_GAS_CHECK_BUFFER', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_RESERVED_GAS', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [ + { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + ], + name: 'baseGas', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'failedMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1CrossDomainMessenger', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messageNonce', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_nonce', internalType: 'uint256', type: 'uint256' }, + { name: '_sender', internalType: 'address', type: 'address' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint256', type: 'uint256' }, + { name: '_message', internalType: 'bytes', type: 'bytes' }, + ], + name: 'relayMessage', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + ], + name: 'sendMessage', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'successfulMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'xDomainMessageSender', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export const l2CrossDomainMessengerAddress = { + 420: '0x4200000000000000000000000000000000000007', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export const l2CrossDomainMessengerConfig = { + address: l2CrossDomainMessengerAddress, + abi: l2CrossDomainMessengerABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2StandardBridge +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + */ +export const l2StandardBridgeABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_otherBridge', + internalType: 'address payable', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'l1Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'l2Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'DepositFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC20BridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC20BridgeInitiated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ETHBridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ETHBridgeInitiated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'l1Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'l2Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'WithdrawalInitiated', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC20To', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeETH', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeETHTo', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'address', type: 'address' }, + ], + name: 'deposits', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeERC20', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeETH', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_l1Token', internalType: 'address', type: 'address' }, + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeDeposit', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1TokenBridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messenger', + outputs: [ + { + name: '', + internalType: 'contract CrossDomainMessenger', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'withdraw', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'withdrawTo', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + */ +export const l2StandardBridgeAddress = { + 420: '0x4200000000000000000000000000000000000010', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + */ +export const l2StandardBridgeConfig = { + address: l2StandardBridgeAddress, + abi: l2StandardBridgeABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2ToL1MessagePasser +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + */ +export const l2ToL1MessagePasserABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nonce', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'target', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'gasLimit', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'data', internalType: 'bytes', type: 'bytes', indexed: false }, + { + name: 'withdrawalHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: false, + }, + ], + name: 'MessagePassed', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'WithdrawerBalanceBurnt', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MESSAGE_VERSION', + outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'burn', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_gasLimit', internalType: 'uint256', type: 'uint256' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'initiateWithdrawal', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messageNonce', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'sentMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + */ +export const l2ToL1MessagePasserAddress = { + 420: '0x4200000000000000000000000000000000000016', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + */ +export const l2ToL1MessagePasserConfig = { + address: l2ToL1MessagePasserAddress, + abi: l2ToL1MessagePasserABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// SequencerFeeVault +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + */ +export const sequencerFeeVaultABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Withdrawal', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_WITHDRAWAL_AMOUNT', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RECIPIENT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1FeeWallet', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'totalProcessed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'withdraw', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + */ +export const sequencerFeeVaultAddress = { + 420: '0x4200000000000000000000000000000000000011', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + */ +export const sequencerFeeVaultConfig = { + address: sequencerFeeVaultAddress, + abi: sequencerFeeVaultABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// eslintIgnore +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// addressesByContractByNetwork +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const addresses = { + AddressManager: { + '1': '0xdE1FCfB0851916CA5101820A69b13a4E276bd81F', + '5': '0xa6f73589243a6A7a9023b1Fa0651b1d89c177111', + }, + L1CrossDomainMessenger: { + '1': '0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1', + '5': '0x5086d1eEF304eb5284A0f6720f79403b4e9bE294', + }, + L1ERC721Bridge: { + '1': '0x5a7749f83b81B301cAb5f48EB8516B986DAef23D', + '5': '0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9', + }, + L1StandardBridge: { + '1': '0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1', + '5': '0x636Af16bf2f682dD3109e60102b8E1A089FedAa8', + }, + L2OutputOracle: { + '1': '0xdfe97868233d1aa22e815a266982f2cf17685a27', + '5': '0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0', + }, + OptimismMintableERC20Factory: { + '1': '0x4200000000000000000000000000000000000012', + '5': '0x4200000000000000000000000000000000000012', + '420': '0x4200000000000000000000000000000000000012', + }, + OptimismPortal: { + '1': '0xbEb5Fc579115071764c7423A4f12eDde41f106Ed', + '5': '0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383', + }, + PortalSender: { + '1': '0x0A893d9576b9cFD9EF78595963dc973238E78210', + '5': '0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4', + }, + ProxyAdmin: { + '1': '0x4200000000000000000000000000000000000018', + '5': '0x4200000000000000000000000000000000000018', + }, + SystemConfig: { + '1': '0x229047fed2591dbec1eF1118d64F7aF3dB9EB290', + '5': '0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60', + }, + SystemDictator: { '1': '0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB' }, + SystemDictator_goerli: { '5': '0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971' }, + AssetReceiver: { + '1': '0x15DdA60616Ffca20371ED1659dBB78E888f65556', + '10': '0x15DdA60616Ffca20371ED1659dBB78E888f65556', + }, + CheckBalanceHigh: { + '1': '0x7eC64a8a591bFf829ff6C8be76074D540ACb813F', + '5': '0x7eC64a8a591bFf829ff6C8be76074D540ACb813F', + '420': '0x5d7103853f12109A7d27F118e54BbC654ad847E9', + }, + CheckBalanceLow: { + '1': '0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640', + '5': '0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640', + '420': '0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474', + }, + CheckGelatoLow: { + '1': '0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa', + '5': '0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa', + '420': '0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862', + }, + CheckTrue: { + '1': '0x5c741a38cb11424711231777D71689C458eE835D', + '5': '0x5c741a38cb11424711231777D71689C458eE835D', + '420': '0x47443D0C184e022F19BD1578F5bca6B8a9F58E32', + }, + Drippie: { '1': '0x44b3A2a040057eBafC601A78647e805fd58B1f50' }, + Drippie_goerli: { '5': '0x44b3A2a040057eBafC601A78647e805fd58B1f50' }, + 'Drippie_optimism-goerli': { + '420': '0x8D8d533C16D23847EB04EEB0925be8900Dd3af86', + }, + TeleportrWithdrawer: { '1': '0x78A25524D90E3D0596558fb43789bD800a5c3007' }, + MintManager: { + '10': '0x5C4e7Ba1E219E47948e6e3F55019A647bA501005', + '420': '0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76', + }, + OptimismMintableERC721Factory: { + '10': '0x4200000000000000000000000000000000000017', + }, + 'OptimismMintableERC721Factory_optimism-goerli': { + '420': '0x4200000000000000000000000000000000000017', + }, + AttestationStation: { + '10': '0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77', + '420': '0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77', + }, + L2ERC721Bridge: { + '10': '0x4200000000000000000000000000000000000014', + '420': '0x4200000000000000000000000000000000000014', + }, + Optimist: { + '10': '0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5', + '420': '0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5', + }, + OptimistAllowlist: { + '10': '0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180', + '420': '0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180', + }, + OptimistInviter: { + '10': '0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929', + '420': '0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929', + }, + BaseFeeVault: { '420': '0x4200000000000000000000000000000000000019' }, + GasPriceOracle: { '420': '0x420000000000000000000000000000000000000F' }, + L1Block: { '420': '0x4200000000000000000000000000000000000015' }, + L1FeeVault: { '420': '0x420000000000000000000000000000000000001a' }, + L2CrossDomainMessenger: { + '420': '0x4200000000000000000000000000000000000007', + }, + L2StandardBridge: { '420': '0x4200000000000000000000000000000000000010' }, + L2ToL1MessagePasser: { '420': '0x4200000000000000000000000000000000000016' }, + SequencerFeeVault: { '420': '0x4200000000000000000000000000000000000011' }, +} as const +export const predeploys = { + LegacyMessagePasser: { + address: '0x4200000000000000000000000000000000000000', + introduced: 'Legacy', + deprecated: true, + proxied: true, + }, + DeployerWhitelist: { + address: '0x4200000000000000000000000000000000000002', + introduced: 'Legacy', + deprecated: true, + proxied: true, + }, + LegacyERC20ETH: { + address: '0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000', + introduced: 'Legacy', + deprecated: true, + proxied: false, + }, + WETH9: { + address: '0x4200000000000000000000000000000000000006', + introduced: 'Legacy', + deprecated: false, + proxied: false, + }, + L2CrossDomainMessenger: { + address: '0x4200000000000000000000000000000000000007', + introduced: 'Legacy', + deprecated: false, + proxied: true, + }, + L2StandardBridge: { + address: '0x4200000000000000000000000000000000000010', + introduced: 'Legacy', + deprecated: false, + proxied: true, + }, + SequencerFeeVault: { + address: '0x4200000000000000000000000000000000000011', + introduced: 'Legacy', + deprecated: false, + proxied: true, + }, + OptimismMintableERC20Factory: { + address: '0x4200000000000000000000000000000000000012', + introduced: 'Legacy', + deprecated: false, + proxied: true, + }, + L1BlockNumber: { + address: '0x4200000000000000000000000000000000000013', + introduced: 'Legacy', + deprecated: true, + proxied: true, + }, + GasPriceOracle: { + address: '0x420000000000000000000000000000000000000F', + introduced: 'Legacy', + deprecated: false, + proxied: true, + }, + GovernanceToken: { + address: '0x4200000000000000000000000000000000000042', + introduced: 'Legacy', + deprecated: false, + proxied: false, + }, + L1Block: { + address: '0x4200000000000000000000000000000000000015', + introduced: 'Bedrock', + deprecated: false, + proxied: true, + }, + L2ToL1MessagePasser: { + address: '0x4200000000000000000000000000000000000016', + introduced: 'Bedrock', + deprecated: false, + proxied: true, + }, + L2ERC721Bridge: { + address: '0x4200000000000000000000000000000000000014', + introduced: 'Legacy', + deprecated: false, + proxied: true, + }, + OptimismMintableERC721Factory: { + address: '0x4200000000000000000000000000000000000017', + introduced: 'Bedrock', + deprecated: false, + proxied: true, + }, + ProxyAdmin: { + address: '0x4200000000000000000000000000000000000018', + introduced: 'Bedrock', + deprecated: false, + proxied: true, + }, + BaseFeeVault: { + address: '0x4200000000000000000000000000000000000019', + introduced: 'Bedrock', + deprecated: false, + proxied: true, + }, + L1FeeVault: { + address: '0x420000000000000000000000000000000000001a', + introduced: 'Bedrock', + deprecated: false, + proxied: true, + }, +} + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// abisByContractByNetwork +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const abis = { + AddressManager: [ + { + type: 'event', + anonymous: false, + inputs: [ + { + name: '_name', + internalType: 'string', + type: 'string', + indexed: true, + }, + { + name: '_newAddress', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: '_oldAddress', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'AddressSet', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'previousOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'OwnershipTransferred', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'getAddress', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'renounceOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_address', internalType: 'address', type: 'address' }, + ], + name: 'setAddress', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], + }, + ], + L1CrossDomainMessenger: [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_portal', + internalType: 'contract OptimismPortal', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'msgHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + ], + name: 'FailedRelayedMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'version', + internalType: 'uint8', + type: 'uint8', + indexed: false, + }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'msgHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + ], + name: 'RelayedMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'target', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'message', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + { + name: 'messageNonce', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'gasLimit', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'SentMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'SentMessageExtension1', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MESSAGE_VERSION', + outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_CALLDATA_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OTHER_MESSENGER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'PORTAL', + outputs: [ + { name: '', internalType: 'contract OptimismPortal', type: 'address' }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_CALL_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_CONSTANT_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_GAS_CHECK_BUFFER', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_RESERVED_GAS', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [ + { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + ], + name: 'baseGas', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'failedMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messageNonce', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_nonce', internalType: 'uint256', type: 'uint256' }, + { name: '_sender', internalType: 'address', type: 'address' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint256', type: 'uint256' }, + { name: '_message', internalType: 'bytes', type: 'bytes' }, + ], + name: 'relayMessage', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + ], + name: 'sendMessage', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'successfulMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'xDomainMessageSender', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + ], + L1ERC721Bridge: [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_messenger', internalType: 'address', type: 'address' }, + { name: '_otherBridge', internalType: 'address', type: 'address' }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'to', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC721BridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'to', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC721BridgeInitiated', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC721', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC721To', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'uint256', type: 'uint256' }, + ], + name: 'deposits', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeERC721', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messenger', + outputs: [ + { + name: '', + internalType: 'contract CrossDomainMessenger', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'otherBridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + ], + L1StandardBridge: [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_messenger', + internalType: 'address payable', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'to', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC20BridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'to', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC20BridgeInitiated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'l1Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'l2Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'to', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC20DepositInitiated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'l1Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'l2Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'to', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC20WithdrawalFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ETHBridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ETHBridgeInitiated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ETHDepositInitiated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ETHWithdrawalFinalized', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC20To', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeETH', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeETHTo', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_l1Token', internalType: 'address', type: 'address' }, + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'depositERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_l1Token', internalType: 'address', type: 'address' }, + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'depositERC20To', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'depositETH', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'depositETHTo', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'address', type: 'address' }, + ], + name: 'deposits', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeERC20', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeETH', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_l1Token', internalType: 'address', type: 'address' }, + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeERC20Withdrawal', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeETHWithdrawal', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l2TokenBridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messenger', + outputs: [ + { + name: '', + internalType: 'contract CrossDomainMessenger', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { stateMutability: 'payable', type: 'receive' }, + ], + L2OutputOracle: [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_submissionInterval', + internalType: 'uint256', + type: 'uint256', + }, + { name: '_l2BlockTime', internalType: 'uint256', type: 'uint256' }, + { + name: '_startingBlockNumber', + internalType: 'uint256', + type: 'uint256', + }, + { + name: '_startingTimestamp', + internalType: 'uint256', + type: 'uint256', + }, + { name: '_proposer', internalType: 'address', type: 'address' }, + { name: '_challenger', internalType: 'address', type: 'address' }, + { + name: '_finalizationPeriodSeconds', + internalType: 'uint256', + type: 'uint256', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'version', + internalType: 'uint8', + type: 'uint8', + indexed: false, + }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'outputRoot', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + { + name: 'l2OutputIndex', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + { + name: 'l2BlockNumber', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + { + name: 'l1Timestamp', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'OutputProposed', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'prevNextOutputIndex', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + { + name: 'newNextOutputIndex', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'OutputsDeleted', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'CHALLENGER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'FINALIZATION_PERIOD_SECONDS', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'L2_BLOCK_TIME', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'PROPOSER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'SUBMISSION_INTERVAL', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '_l2BlockNumber', internalType: 'uint256', type: 'uint256' }, + ], + name: 'computeL2Timestamp', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_l2OutputIndex', internalType: 'uint256', type: 'uint256' }, + ], + name: 'deleteL2Outputs', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '_l2OutputIndex', internalType: 'uint256', type: 'uint256' }, + ], + name: 'getL2Output', + outputs: [ + { + name: '', + internalType: 'struct Types.OutputProposal', + type: 'tuple', + components: [ + { name: 'outputRoot', internalType: 'bytes32', type: 'bytes32' }, + { name: 'timestamp', internalType: 'uint128', type: 'uint128' }, + { name: 'l2BlockNumber', internalType: 'uint128', type: 'uint128' }, + ], + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '_l2BlockNumber', internalType: 'uint256', type: 'uint256' }, + ], + name: 'getL2OutputAfter', + outputs: [ + { + name: '', + internalType: 'struct Types.OutputProposal', + type: 'tuple', + components: [ + { name: 'outputRoot', internalType: 'bytes32', type: 'bytes32' }, + { name: 'timestamp', internalType: 'uint128', type: 'uint128' }, + { name: 'l2BlockNumber', internalType: 'uint128', type: 'uint128' }, + ], + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '_l2BlockNumber', internalType: 'uint256', type: 'uint256' }, + ], + name: 'getL2OutputIndexAfter', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { + name: '_startingBlockNumber', + internalType: 'uint256', + type: 'uint256', + }, + { + name: '_startingTimestamp', + internalType: 'uint256', + type: 'uint256', + }, + ], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'latestBlockNumber', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'latestOutputIndex', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'nextBlockNumber', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'nextOutputIndex', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_outputRoot', internalType: 'bytes32', type: 'bytes32' }, + { name: '_l2BlockNumber', internalType: 'uint256', type: 'uint256' }, + { name: '_l1BlockHash', internalType: 'bytes32', type: 'bytes32' }, + { name: '_l1BlockNumber', internalType: 'uint256', type: 'uint256' }, + ], + name: 'proposeL2Output', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'startingBlockNumber', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'startingTimestamp', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + ], + OptimismMintableERC20Factory: [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_bridge', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'deployer', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'OptimismMintableERC20Created', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'StandardL2TokenCreated', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'BRIDGE', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'createOptimismMintableERC20', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'createStandardL2Token', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + ], + OptimismPortal: [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_l2Oracle', + internalType: 'contract L2OutputOracle', + type: 'address', + }, + { name: '_guardian', internalType: 'address', type: 'address' }, + { name: '_paused', internalType: 'bool', type: 'bool' }, + { + name: '_config', + internalType: 'contract SystemConfig', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'version', + internalType: 'uint8', + type: 'uint8', + indexed: false, + }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'account', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Paused', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'version', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + { + name: 'opaqueData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'TransactionDeposited', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'account', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Unpaused', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawalHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + { name: 'success', internalType: 'bool', type: 'bool', indexed: false }, + ], + name: 'WithdrawalFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawalHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + ], + name: 'WithdrawalProven', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'GUARDIAN', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'L2_ORACLE', + outputs: [ + { name: '', internalType: 'contract L2OutputOracle', type: 'address' }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'SYSTEM_CONFIG', + outputs: [ + { name: '', internalType: 'contract SystemConfig', type: 'address' }, + ], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + { name: '_gasLimit', internalType: 'uint64', type: 'uint64' }, + { name: '_isCreation', internalType: 'bool', type: 'bool' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'depositTransaction', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [], + name: 'donateETH', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { + name: '_tx', + internalType: 'struct Types.WithdrawalTransaction', + type: 'tuple', + components: [ + { name: 'nonce', internalType: 'uint256', type: 'uint256' }, + { name: 'sender', internalType: 'address', type: 'address' }, + { name: 'target', internalType: 'address', type: 'address' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + { name: 'gasLimit', internalType: 'uint256', type: 'uint256' }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + ], + }, + ], + name: 'finalizeWithdrawalTransaction', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'finalizedWithdrawals', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_paused', internalType: 'bool', type: 'bool' }], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '_l2OutputIndex', internalType: 'uint256', type: 'uint256' }, + ], + name: 'isOutputFinalized', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l2Sender', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [{ name: '_byteCount', internalType: 'uint64', type: 'uint64' }], + name: 'minimumGasLimit', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'params', + outputs: [ + { name: 'prevBaseFee', internalType: 'uint128', type: 'uint128' }, + { name: 'prevBoughtGas', internalType: 'uint64', type: 'uint64' }, + { name: 'prevBlockNum', internalType: 'uint64', type: 'uint64' }, + ], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'pause', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'paused', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { + name: '_tx', + internalType: 'struct Types.WithdrawalTransaction', + type: 'tuple', + components: [ + { name: 'nonce', internalType: 'uint256', type: 'uint256' }, + { name: 'sender', internalType: 'address', type: 'address' }, + { name: 'target', internalType: 'address', type: 'address' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + { name: 'gasLimit', internalType: 'uint256', type: 'uint256' }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + ], + }, + { name: '_l2OutputIndex', internalType: 'uint256', type: 'uint256' }, + { + name: '_outputRootProof', + internalType: 'struct Types.OutputRootProof', + type: 'tuple', + components: [ + { name: 'version', internalType: 'bytes32', type: 'bytes32' }, + { name: 'stateRoot', internalType: 'bytes32', type: 'bytes32' }, + { + name: 'messagePasserStorageRoot', + internalType: 'bytes32', + type: 'bytes32', + }, + { + name: 'latestBlockhash', + internalType: 'bytes32', + type: 'bytes32', + }, + ], + }, + { name: '_withdrawalProof', internalType: 'bytes[]', type: 'bytes[]' }, + ], + name: 'proveWithdrawalTransaction', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'provenWithdrawals', + outputs: [ + { name: 'outputRoot', internalType: 'bytes32', type: 'bytes32' }, + { name: 'timestamp', internalType: 'uint128', type: 'uint128' }, + { name: 'l2OutputIndex', internalType: 'uint128', type: 'uint128' }, + ], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'unpause', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { stateMutability: 'payable', type: 'receive' }, + ], + PortalSender: [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_portal', + internalType: 'contract OptimismPortal', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'PORTAL', + outputs: [ + { name: '', internalType: 'contract OptimismPortal', type: 'address' }, + ], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'donate', + outputs: [], + }, + ], + ProxyAdmin: [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'previousOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'OwnershipTransferred', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'addressManager', + outputs: [ + { name: '', internalType: 'contract AddressManager', type: 'address' }, + ], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_proxy', internalType: 'address payable', type: 'address' }, + { name: '_newAdmin', internalType: 'address', type: 'address' }, + ], + name: 'changeProxyAdmin', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '_proxy', internalType: 'address payable', type: 'address' }, + ], + name: 'getProxyAdmin', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_proxy', internalType: 'address', type: 'address' }], + name: 'getProxyImplementation', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'implementationName', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'isUpgrading', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'proxyType', + outputs: [ + { name: '', internalType: 'enum ProxyAdmin.ProxyType', type: 'uint8' }, + ], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'renounceOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_address', internalType: 'address', type: 'address' }, + ], + name: 'setAddress', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { + name: '_address', + internalType: 'contract AddressManager', + type: 'address', + }, + ], + name: 'setAddressManager', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_address', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + ], + name: 'setImplementationName', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_address', internalType: 'address', type: 'address' }, + { + name: '_type', + internalType: 'enum ProxyAdmin.ProxyType', + type: 'uint8', + }, + ], + name: 'setProxyType', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_upgrading', internalType: 'bool', type: 'bool' }], + name: 'setUpgrading', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_proxy', internalType: 'address payable', type: 'address' }, + { name: '_implementation', internalType: 'address', type: 'address' }, + ], + name: 'upgrade', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_proxy', internalType: 'address payable', type: 'address' }, + { name: '_implementation', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'upgradeAndCall', + outputs: [], + }, + ], + SystemConfig: [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_owner', internalType: 'address', type: 'address' }, + { name: '_overhead', internalType: 'uint256', type: 'uint256' }, + { name: '_scalar', internalType: 'uint256', type: 'uint256' }, + { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, + { name: '_gasLimit', internalType: 'uint64', type: 'uint64' }, + { + name: '_unsafeBlockSigner', + internalType: 'address', + type: 'address', + }, + { + name: '_config', + internalType: 'struct ResourceMetering.ResourceConfig', + type: 'tuple', + components: [ + { + name: 'maxResourceLimit', + internalType: 'uint32', + type: 'uint32', + }, + { + name: 'elasticityMultiplier', + internalType: 'uint8', + type: 'uint8', + }, + { + name: 'baseFeeMaxChangeDenominator', + internalType: 'uint8', + type: 'uint8', + }, + { name: 'minimumBaseFee', internalType: 'uint32', type: 'uint32' }, + { name: 'systemTxMaxGas', internalType: 'uint32', type: 'uint32' }, + { + name: 'maximumBaseFee', + internalType: 'uint128', + type: 'uint128', + }, + ], + }, + ], + }, { type: 'event', anonymous: false, inputs: [ { - name: '_name', - internalType: 'string', - type: 'string', + name: 'version', + internalType: 'uint256', + type: 'uint256', indexed: true, }, { - name: '_newAddress', + name: 'updateType', + internalType: 'enum SystemConfig.UpdateType', + type: 'uint8', + indexed: true, + }, + { name: 'data', internalType: 'bytes', type: 'bytes', indexed: false }, + ], + name: 'ConfigUpdate', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'version', + internalType: 'uint8', + type: 'uint8', + indexed: false, + }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'previousOwner', internalType: 'address', type: 'address', - indexed: false, + indexed: true, }, { - name: '_oldAddress', + name: 'newOwner', internalType: 'address', type: 'address', - indexed: false, + indexed: true, + }, + ], + name: 'OwnershipTransferred', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'UNSAFE_BLOCK_SIGNER_SLOT', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'batcherHash', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'gasLimit', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_owner', internalType: 'address', type: 'address' }, + { name: '_overhead', internalType: 'uint256', type: 'uint256' }, + { name: '_scalar', internalType: 'uint256', type: 'uint256' }, + { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, + { name: '_gasLimit', internalType: 'uint64', type: 'uint64' }, + { + name: '_unsafeBlockSigner', + internalType: 'address', + type: 'address', + }, + { + name: '_config', + internalType: 'struct ResourceMetering.ResourceConfig', + type: 'tuple', + components: [ + { + name: 'maxResourceLimit', + internalType: 'uint32', + type: 'uint32', + }, + { + name: 'elasticityMultiplier', + internalType: 'uint8', + type: 'uint8', + }, + { + name: 'baseFeeMaxChangeDenominator', + internalType: 'uint8', + type: 'uint8', + }, + { name: 'minimumBaseFee', internalType: 'uint32', type: 'uint32' }, + { name: 'systemTxMaxGas', internalType: 'uint32', type: 'uint32' }, + { + name: 'maximumBaseFee', + internalType: 'uint128', + type: 'uint128', + }, + ], }, ], - name: 'AddressSet', + name: 'initialize', + outputs: [], }, { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'previousOwner', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'newOwner', - internalType: 'address', - type: 'address', - indexed: true, - }, - ], - name: 'OwnershipTransferred', + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'minimumGasLimit', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '_name', internalType: 'string', type: 'string' }], - name: 'getAddress', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [], + name: 'overhead', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', @@ -5356,1336 +10151,1654 @@ export const abis = { outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', - inputs: [ - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_address', internalType: 'address', type: 'address' }, + inputs: [], + name: 'resourceConfig', + outputs: [ + { + name: '', + internalType: 'struct ResourceMetering.ResourceConfig', + type: 'tuple', + components: [ + { + name: 'maxResourceLimit', + internalType: 'uint32', + type: 'uint32', + }, + { + name: 'elasticityMultiplier', + internalType: 'uint8', + type: 'uint8', + }, + { + name: 'baseFeeMaxChangeDenominator', + internalType: 'uint8', + type: 'uint8', + }, + { name: 'minimumBaseFee', internalType: 'uint32', type: 'uint32' }, + { name: 'systemTxMaxGas', internalType: 'uint32', type: 'uint32' }, + { + name: 'maximumBaseFee', + internalType: 'uint128', + type: 'uint128', + }, + ], + }, ], - name: 'setAddress', - outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', - inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], - name: 'transferOwnership', - outputs: [], + inputs: [], + name: 'scalar', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, - ], - L1CrossDomainMessenger: [ { stateMutability: 'nonpayable', - type: 'constructor', - inputs: [ - { - name: '_portal', - internalType: 'contract OptimismPortal', - type: 'address', - }, - ], - }, - { - type: 'event', - anonymous: false, + type: 'function', inputs: [ - { - name: 'msgHash', - internalType: 'bytes32', - type: 'bytes32', - indexed: true, - }, + { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, ], - name: 'FailedRelayedMessage', + name: 'setBatcherHash', + outputs: [], }, { - type: 'event', - anonymous: false, + stateMutability: 'nonpayable', + type: 'function', inputs: [ - { - name: 'version', - internalType: 'uint8', - type: 'uint8', - indexed: false, - }, + { name: '_overhead', internalType: 'uint256', type: 'uint256' }, + { name: '_scalar', internalType: 'uint256', type: 'uint256' }, ], - name: 'Initialized', + name: 'setGasConfig', + outputs: [], }, { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'msgHash', - internalType: 'bytes32', - type: 'bytes32', - indexed: true, - }, - ], - name: 'RelayedMessage', + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_gasLimit', internalType: 'uint64', type: 'uint64' }], + name: 'setGasLimit', + outputs: [], }, { - type: 'event', - anonymous: false, + stateMutability: 'nonpayable', + type: 'function', inputs: [ { - name: 'target', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'sender', - internalType: 'address', - type: 'address', - indexed: false, - }, - { - name: 'message', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, - { - name: 'messageNonce', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { - name: 'gasLimit', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: '_config', + internalType: 'struct ResourceMetering.ResourceConfig', + type: 'tuple', + components: [ + { + name: 'maxResourceLimit', + internalType: 'uint32', + type: 'uint32', + }, + { + name: 'elasticityMultiplier', + internalType: 'uint8', + type: 'uint8', + }, + { + name: 'baseFeeMaxChangeDenominator', + internalType: 'uint8', + type: 'uint8', + }, + { name: 'minimumBaseFee', internalType: 'uint32', type: 'uint32' }, + { name: 'systemTxMaxGas', internalType: 'uint32', type: 'uint32' }, + { + name: 'maximumBaseFee', + internalType: 'uint128', + type: 'uint128', + }, + ], }, ], - name: 'SentMessage', + name: 'setResourceConfig', + outputs: [], }, { - type: 'event', - anonymous: false, + stateMutability: 'nonpayable', + type: 'function', inputs: [ { - name: 'sender', + name: '_unsafeBlockSigner', internalType: 'address', type: 'address', - indexed: true, - }, - { - name: 'value', - internalType: 'uint256', - type: 'uint256', - indexed: false, }, ], - name: 'SentMessageExtension1', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'MESSAGE_VERSION', - outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + name: 'setUnsafeBlockSigner', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'MIN_GAS_CALLDATA_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + name: 'unsafeBlockSigner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], }, + ], + SystemDictator: [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'OTHER_MESSENGER', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'version', + internalType: 'uint8', + type: 'uint8', + indexed: false, + }, + ], + name: 'Initialized', }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'PORTAL', - outputs: [ - { name: '', internalType: 'contract OptimismPortal', type: 'address' }, + type: 'event', + anonymous: false, + inputs: [ + { + name: 'previousOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, ], + name: 'OwnershipTransferred', }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'RELAY_CALL_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + name: 'EXIT_1_NO_RETURN_STEP', + outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'RELAY_CONSTANT_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + name: 'PROXY_TRANSFER_STEP', + outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'RELAY_GAS_CHECK_BUFFER', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + name: 'config', + outputs: [ + { + name: 'globalConfig', + internalType: 'struct SystemDictator.GlobalConfig', + type: 'tuple', + components: [ + { + name: 'addressManager', + internalType: 'contract AddressManager', + type: 'address', + }, + { + name: 'proxyAdmin', + internalType: 'contract ProxyAdmin', + type: 'address', + }, + { name: 'controller', internalType: 'address', type: 'address' }, + { name: 'finalOwner', internalType: 'address', type: 'address' }, + ], + }, + { + name: 'proxyAddressConfig', + internalType: 'struct SystemDictator.ProxyAddressConfig', + type: 'tuple', + components: [ + { + name: 'l2OutputOracleProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'optimismPortalProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1CrossDomainMessengerProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1StandardBridgeProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'optimismMintableERC20FactoryProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1ERC721BridgeProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'systemConfigProxy', + internalType: 'address', + type: 'address', + }, + ], + }, + { + name: 'implementationAddressConfig', + internalType: 'struct SystemDictator.ImplementationAddressConfig', + type: 'tuple', + components: [ + { + name: 'l2OutputOracleImpl', + internalType: 'contract L2OutputOracle', + type: 'address', + }, + { + name: 'optimismPortalImpl', + internalType: 'contract OptimismPortal', + type: 'address', + }, + { + name: 'l1CrossDomainMessengerImpl', + internalType: 'contract L1CrossDomainMessenger', + type: 'address', + }, + { + name: 'l1StandardBridgeImpl', + internalType: 'contract L1StandardBridge', + type: 'address', + }, + { + name: 'optimismMintableERC20FactoryImpl', + internalType: 'contract OptimismMintableERC20Factory', + type: 'address', + }, + { + name: 'l1ERC721BridgeImpl', + internalType: 'contract L1ERC721Bridge', + type: 'address', + }, + { + name: 'portalSenderImpl', + internalType: 'contract PortalSender', + type: 'address', + }, + { + name: 'systemConfigImpl', + internalType: 'contract SystemConfig', + type: 'address', + }, + ], + }, + { + name: 'systemConfigConfig', + internalType: 'struct SystemDictator.SystemConfigConfig', + type: 'tuple', + components: [ + { name: 'owner', internalType: 'address', type: 'address' }, + { name: 'overhead', internalType: 'uint256', type: 'uint256' }, + { name: 'scalar', internalType: 'uint256', type: 'uint256' }, + { name: 'batcherHash', internalType: 'bytes32', type: 'bytes32' }, + { name: 'gasLimit', internalType: 'uint64', type: 'uint64' }, + { + name: 'unsafeBlockSigner', + internalType: 'address', + type: 'address', + }, + { + name: 'resourceConfig', + internalType: 'struct ResourceMetering.ResourceConfig', + type: 'tuple', + components: [ + { + name: 'maxResourceLimit', + internalType: 'uint32', + type: 'uint32', + }, + { + name: 'elasticityMultiplier', + internalType: 'uint8', + type: 'uint8', + }, + { + name: 'baseFeeMaxChangeDenominator', + internalType: 'uint8', + type: 'uint8', + }, + { + name: 'minimumBaseFee', + internalType: 'uint32', + type: 'uint32', + }, + { + name: 'systemTxMaxGas', + internalType: 'uint32', + type: 'uint32', + }, + { + name: 'maximumBaseFee', + internalType: 'uint128', + type: 'uint128', + }, + ], + }, + ], + }, + ], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'RELAY_RESERVED_GAS', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'pure', - type: 'function', - inputs: [ - { name: '_message', internalType: 'bytes', type: 'bytes' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - ], - name: 'baseGas', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + name: 'currentStep', + outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'failedMessages', + inputs: [], + name: 'dynamicConfigSet', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'initialize', - outputs: [], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'messageNonce', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'payable', - type: 'function', - inputs: [ - { name: '_nonce', internalType: 'uint256', type: 'uint256' }, - { name: '_sender', internalType: 'address', type: 'address' }, - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_value', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint256', type: 'uint256' }, - { name: '_message', internalType: 'bytes', type: 'bytes' }, - ], - name: 'relayMessage', - outputs: [], - }, - { - stateMutability: 'payable', - type: 'function', - inputs: [ - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_message', internalType: 'bytes', type: 'bytes' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - ], - name: 'sendMessage', + name: 'exit1', outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'successfulMessages', + inputs: [], + name: 'exited', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'finalize', + outputs: [], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'xDomainMessageSender', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'finalized', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - ], - L1ERC721Bridge: [ { stateMutability: 'nonpayable', - type: 'constructor', - inputs: [ - { name: '_messenger', internalType: 'address', type: 'address' }, - { name: '_otherBridge', internalType: 'address', type: 'address' }, - ], - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'from', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'to', - internalType: 'address', - type: 'address', - indexed: false, - }, - { - name: 'tokenId', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, - ], - name: 'ERC721BridgeFinalized', - }, - { - type: 'event', - anonymous: false, + type: 'function', inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'from', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'to', - internalType: 'address', - type: 'address', - indexed: false, + name: '_config', + internalType: 'struct SystemDictator.DeployConfig', + type: 'tuple', + components: [ + { + name: 'globalConfig', + internalType: 'struct SystemDictator.GlobalConfig', + type: 'tuple', + components: [ + { + name: 'addressManager', + internalType: 'contract AddressManager', + type: 'address', + }, + { + name: 'proxyAdmin', + internalType: 'contract ProxyAdmin', + type: 'address', + }, + { + name: 'controller', + internalType: 'address', + type: 'address', + }, + { + name: 'finalOwner', + internalType: 'address', + type: 'address', + }, + ], + }, + { + name: 'proxyAddressConfig', + internalType: 'struct SystemDictator.ProxyAddressConfig', + type: 'tuple', + components: [ + { + name: 'l2OutputOracleProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'optimismPortalProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1CrossDomainMessengerProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1StandardBridgeProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'optimismMintableERC20FactoryProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1ERC721BridgeProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'systemConfigProxy', + internalType: 'address', + type: 'address', + }, + ], + }, + { + name: 'implementationAddressConfig', + internalType: 'struct SystemDictator.ImplementationAddressConfig', + type: 'tuple', + components: [ + { + name: 'l2OutputOracleImpl', + internalType: 'contract L2OutputOracle', + type: 'address', + }, + { + name: 'optimismPortalImpl', + internalType: 'contract OptimismPortal', + type: 'address', + }, + { + name: 'l1CrossDomainMessengerImpl', + internalType: 'contract L1CrossDomainMessenger', + type: 'address', + }, + { + name: 'l1StandardBridgeImpl', + internalType: 'contract L1StandardBridge', + type: 'address', + }, + { + name: 'optimismMintableERC20FactoryImpl', + internalType: 'contract OptimismMintableERC20Factory', + type: 'address', + }, + { + name: 'l1ERC721BridgeImpl', + internalType: 'contract L1ERC721Bridge', + type: 'address', + }, + { + name: 'portalSenderImpl', + internalType: 'contract PortalSender', + type: 'address', + }, + { + name: 'systemConfigImpl', + internalType: 'contract SystemConfig', + type: 'address', + }, + ], + }, + { + name: 'systemConfigConfig', + internalType: 'struct SystemDictator.SystemConfigConfig', + type: 'tuple', + components: [ + { name: 'owner', internalType: 'address', type: 'address' }, + { name: 'overhead', internalType: 'uint256', type: 'uint256' }, + { name: 'scalar', internalType: 'uint256', type: 'uint256' }, + { + name: 'batcherHash', + internalType: 'bytes32', + type: 'bytes32', + }, + { name: 'gasLimit', internalType: 'uint64', type: 'uint64' }, + { + name: 'unsafeBlockSigner', + internalType: 'address', + type: 'address', + }, + { + name: 'resourceConfig', + internalType: 'struct ResourceMetering.ResourceConfig', + type: 'tuple', + components: [ + { + name: 'maxResourceLimit', + internalType: 'uint32', + type: 'uint32', + }, + { + name: 'elasticityMultiplier', + internalType: 'uint8', + type: 'uint8', + }, + { + name: 'baseFeeMaxChangeDenominator', + internalType: 'uint8', + type: 'uint8', + }, + { + name: 'minimumBaseFee', + internalType: 'uint32', + type: 'uint32', + }, + { + name: 'systemTxMaxGas', + internalType: 'uint32', + type: 'uint32', + }, + { + name: 'maximumBaseFee', + internalType: 'uint128', + type: 'uint128', + }, + ], + }, + ], + }, + ], }, + ], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l2OutputOracleDynamicConfig', + outputs: [ { - name: 'tokenId', + name: 'l2OutputOracleStartingBlockNumber', internalType: 'uint256', type: 'uint256', - indexed: false, }, { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, + name: 'l2OutputOracleStartingTimestamp', + internalType: 'uint256', + type: 'uint256', }, ], - name: 'ERC721BridgeInitiated', }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'bridgeERC721', - outputs: [], + inputs: [], + name: 'oldL1CrossDomainMessenger', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'bridgeERC721To', - outputs: [], + inputs: [], + name: 'optimismPortalDynamicConfig', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { stateMutability: 'view', type: 'function', - inputs: [ - { name: '', internalType: 'address', type: 'address' }, - { name: '', internalType: 'address', type: 'address' }, - { name: '', internalType: 'uint256', type: 'uint256' }, - ], - name: 'deposits', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'finalizeBridgeERC721', + inputs: [], + name: 'phase1', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'messenger', - outputs: [ - { - name: '', - internalType: 'contract CrossDomainMessenger', - type: 'address', - }, - ], + name: 'phase2', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'otherBridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'renounceOwnership', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'step1', + outputs: [], }, - ], - L1StandardBridge: [ { stateMutability: 'nonpayable', - type: 'constructor', - inputs: [ - { - name: '_messenger', - internalType: 'address payable', - type: 'address', - }, - ], - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'from', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'to', - internalType: 'address', - type: 'address', - indexed: false, - }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, - ], - name: 'ERC20BridgeFinalized', + type: 'function', + inputs: [], + name: 'step2', + outputs: [], }, { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'from', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'to', - internalType: 'address', - type: 'address', - indexed: false, - }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, - ], - name: 'ERC20BridgeInitiated', + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'step3', + outputs: [], }, { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'l1Token', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'l2Token', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'from', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'to', - internalType: 'address', - type: 'address', - indexed: false, - }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, - ], - name: 'ERC20DepositInitiated', + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'step4', + outputs: [], }, { - type: 'event', - anonymous: false, + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'step5', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', inputs: [ { - name: 'l1Token', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'l2Token', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'from', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'to', - internalType: 'address', - type: 'address', - indexed: false, - }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: '_l2OutputOracleDynamicConfig', + internalType: 'struct SystemDictator.L2OutputOracleDynamicConfig', + type: 'tuple', + components: [ + { + name: 'l2OutputOracleStartingBlockNumber', + internalType: 'uint256', + type: 'uint256', + }, + { + name: 'l2OutputOracleStartingTimestamp', + internalType: 'uint256', + type: 'uint256', + }, + ], }, { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, + name: '_optimismPortalDynamicConfig', + internalType: 'bool', + type: 'bool', }, ], - name: 'ERC20WithdrawalFinalized', + name: 'updateDynamicConfig', + outputs: [], }, + ], + SystemDictator_goerli: [ { type: 'event', anonymous: false, inputs: [ { - name: 'from', - internalType: 'address', - type: 'address', - indexed: true, - }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', + name: 'version', + internalType: 'uint8', + type: 'uint8', indexed: false, }, ], - name: 'ETHBridgeFinalized', + name: 'Initialized', }, { type: 'event', anonymous: false, inputs: [ { - name: 'from', + name: 'previousOwner', internalType: 'address', type: 'address', indexed: true, }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, - ], - name: 'ETHBridgeInitiated', - }, - { - type: 'event', - anonymous: false, - inputs: [ { - name: 'from', + name: 'newOwner', internalType: 'address', type: 'address', indexed: true, }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ETHDepositInitiated', + name: 'OwnershipTransferred', }, { - type: 'event', - anonymous: false, - inputs: [ + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'EXIT_1_NO_RETURN_STEP', + outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'PROXY_TRANSFER_STEP', + outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'config', + outputs: [ { - name: 'from', - internalType: 'address', - type: 'address', - indexed: true, + name: 'globalConfig', + internalType: 'struct SystemDictator.GlobalConfig', + type: 'tuple', + components: [ + { + name: 'addressManager', + internalType: 'contract AddressManager', + type: 'address', + }, + { + name: 'proxyAdmin', + internalType: 'contract ProxyAdmin', + type: 'address', + }, + { name: 'controller', internalType: 'address', type: 'address' }, + { name: 'finalOwner', internalType: 'address', type: 'address' }, + ], }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'proxyAddressConfig', + internalType: 'struct SystemDictator.ProxyAddressConfig', + type: 'tuple', + components: [ + { + name: 'l2OutputOracleProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'optimismPortalProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1CrossDomainMessengerProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1StandardBridgeProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'optimismMintableERC20FactoryProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1ERC721BridgeProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'systemConfigProxy', + internalType: 'address', + type: 'address', + }, + ], + }, + { + name: 'implementationAddressConfig', + internalType: 'struct SystemDictator.ImplementationAddressConfig', + type: 'tuple', + components: [ + { + name: 'l2OutputOracleImpl', + internalType: 'contract L2OutputOracle', + type: 'address', + }, + { + name: 'optimismPortalImpl', + internalType: 'contract OptimismPortal', + type: 'address', + }, + { + name: 'l1CrossDomainMessengerImpl', + internalType: 'contract L1CrossDomainMessenger', + type: 'address', + }, + { + name: 'l1StandardBridgeImpl', + internalType: 'contract L1StandardBridge', + type: 'address', + }, + { + name: 'optimismMintableERC20FactoryImpl', + internalType: 'contract OptimismMintableERC20Factory', + type: 'address', + }, + { + name: 'l1ERC721BridgeImpl', + internalType: 'contract L1ERC721Bridge', + type: 'address', + }, + { + name: 'portalSenderImpl', + internalType: 'contract PortalSender', + type: 'address', + }, + { + name: 'systemConfigImpl', + internalType: 'contract SystemConfig', + type: 'address', + }, + ], }, { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, + name: 'systemConfigConfig', + internalType: 'struct SystemDictator.SystemConfigConfig', + type: 'tuple', + components: [ + { name: 'owner', internalType: 'address', type: 'address' }, + { name: 'overhead', internalType: 'uint256', type: 'uint256' }, + { name: 'scalar', internalType: 'uint256', type: 'uint256' }, + { name: 'batcherHash', internalType: 'bytes32', type: 'bytes32' }, + { name: 'gasLimit', internalType: 'uint64', type: 'uint64' }, + { + name: 'unsafeBlockSigner', + internalType: 'address', + type: 'address', + }, + ], }, ], - name: 'ETHWithdrawalFinalized', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'currentStep', + outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'dynamicConfigSet', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'bridgeERC20', + inputs: [], + name: 'exit1', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'bridgeERC20To', + inputs: [], + name: 'finalize', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'view', type: 'function', - inputs: [ - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'bridgeETH', - outputs: [], + inputs: [], + name: 'finalized', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { + name: '_config', + internalType: 'struct SystemDictator.DeployConfig', + type: 'tuple', + components: [ + { + name: 'globalConfig', + internalType: 'struct SystemDictator.GlobalConfig', + type: 'tuple', + components: [ + { + name: 'addressManager', + internalType: 'contract AddressManager', + type: 'address', + }, + { + name: 'proxyAdmin', + internalType: 'contract ProxyAdmin', + type: 'address', + }, + { + name: 'controller', + internalType: 'address', + type: 'address', + }, + { + name: 'finalOwner', + internalType: 'address', + type: 'address', + }, + ], + }, + { + name: 'proxyAddressConfig', + internalType: 'struct SystemDictator.ProxyAddressConfig', + type: 'tuple', + components: [ + { + name: 'l2OutputOracleProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'optimismPortalProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1CrossDomainMessengerProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1StandardBridgeProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'optimismMintableERC20FactoryProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'l1ERC721BridgeProxy', + internalType: 'address', + type: 'address', + }, + { + name: 'systemConfigProxy', + internalType: 'address', + type: 'address', + }, + ], + }, + { + name: 'implementationAddressConfig', + internalType: 'struct SystemDictator.ImplementationAddressConfig', + type: 'tuple', + components: [ + { + name: 'l2OutputOracleImpl', + internalType: 'contract L2OutputOracle', + type: 'address', + }, + { + name: 'optimismPortalImpl', + internalType: 'contract OptimismPortal', + type: 'address', + }, + { + name: 'l1CrossDomainMessengerImpl', + internalType: 'contract L1CrossDomainMessenger', + type: 'address', + }, + { + name: 'l1StandardBridgeImpl', + internalType: 'contract L1StandardBridge', + type: 'address', + }, + { + name: 'optimismMintableERC20FactoryImpl', + internalType: 'contract OptimismMintableERC20Factory', + type: 'address', + }, + { + name: 'l1ERC721BridgeImpl', + internalType: 'contract L1ERC721Bridge', + type: 'address', + }, + { + name: 'portalSenderImpl', + internalType: 'contract PortalSender', + type: 'address', + }, + { + name: 'systemConfigImpl', + internalType: 'contract SystemConfig', + type: 'address', + }, + ], + }, + { + name: 'systemConfigConfig', + internalType: 'struct SystemDictator.SystemConfigConfig', + type: 'tuple', + components: [ + { name: 'owner', internalType: 'address', type: 'address' }, + { name: 'overhead', internalType: 'uint256', type: 'uint256' }, + { name: 'scalar', internalType: 'uint256', type: 'uint256' }, + { + name: 'batcherHash', + internalType: 'bytes32', + type: 'bytes32', + }, + { name: 'gasLimit', internalType: 'uint64', type: 'uint64' }, + { + name: 'unsafeBlockSigner', + internalType: 'address', + type: 'address', + }, + ], + }, + ], + }, ], - name: 'bridgeETHTo', + name: 'initialize', outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', - inputs: [ - { name: '_l1Token', internalType: 'address', type: 'address' }, - { name: '_l2Token', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + inputs: [], + name: 'l2OutputOracleDynamicConfig', + outputs: [ + { + name: 'l2OutputOracleStartingBlockNumber', + internalType: 'uint256', + type: 'uint256', + }, + { + name: 'l2OutputOracleStartingTimestamp', + internalType: 'uint256', + type: 'uint256', + }, ], - name: 'depositERC20', - outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'oldL1CrossDomainMessenger', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', type: 'function', - inputs: [ - { name: '_l1Token', internalType: 'address', type: 'address' }, - { name: '_l2Token', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'depositERC20To', - outputs: [], + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'depositETH', + inputs: [], + name: 'renounceOwnership', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'depositETHTo', + inputs: [], + name: 'step1', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '', internalType: 'address', type: 'address' }, - { name: '', internalType: 'address', type: 'address' }, - ], - name: 'deposits', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [], + name: 'step2', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'finalizeBridgeERC20', + inputs: [], + name: 'step3', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'finalizeBridgeETH', + inputs: [], + name: 'step4', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_l1Token', internalType: 'address', type: 'address' }, - { name: '_l2Token', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'finalizeERC20Withdrawal', + inputs: [], + name: 'step5', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'finalizeETHWithdrawal', + inputs: [], + name: 'step6', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'l2TokenBridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'messenger', - outputs: [ + inputs: [ { - name: '', - internalType: 'contract CrossDomainMessenger', - type: 'address', + name: '_l2OutputOracleDynamicConfig', + internalType: 'struct SystemDictator.L2OutputOracleDynamicConfig', + type: 'tuple', + components: [ + { + name: 'l2OutputOracleStartingBlockNumber', + internalType: 'uint256', + type: 'uint256', + }, + { + name: 'l2OutputOracleStartingTimestamp', + internalType: 'uint256', + type: 'uint256', + }, + ], }, ], + name: 'updateL2OutputOracleDynamicConfig', + outputs: [], }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, - { stateMutability: 'payable', type: 'receive' }, ], - L2OutputOracle: [ + AssetReceiver: [ { stateMutability: 'nonpayable', type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, inputs: [ { - name: '_submissionInterval', - internalType: 'uint256', - type: 'uint256', + name: 'user', + internalType: 'address', + type: 'address', + indexed: true, }, - { name: '_l2BlockTime', internalType: 'uint256', type: 'uint256' }, { - name: '_startingBlockNumber', - internalType: 'uint256', - type: 'uint256', + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, }, + ], + name: 'OwnerUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ { - name: '_startingTimestamp', - internalType: 'uint256', - type: 'uint256', + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, }, - { name: '_proposer', internalType: 'address', type: 'address' }, - { name: '_challenger', internalType: 'address', type: 'address' }, { - name: '_finalizationPeriodSeconds', + name: 'amount', internalType: 'uint256', type: 'uint256', + indexed: false, }, ], + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ { - name: 'version', - internalType: 'uint8', - type: 'uint8', + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', indexed: false, }, ], - name: 'Initialized', + name: 'WithdrewERC20', }, { type: 'event', anonymous: false, inputs: [ { - name: 'outputRoot', - internalType: 'bytes32', - type: 'bytes32', + name: 'withdrawer', + internalType: 'address', + type: 'address', indexed: true, }, { - name: 'l2OutputIndex', - internalType: 'uint256', - type: 'uint256', + name: 'recipient', + internalType: 'address', + type: 'address', indexed: true, }, { - name: 'l2BlockNumber', - internalType: 'uint256', - type: 'uint256', + name: 'asset', + internalType: 'address', + type: 'address', indexed: true, }, { - name: 'l1Timestamp', + name: 'id', internalType: 'uint256', type: 'uint256', indexed: false, }, ], - name: 'OutputProposed', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ { - name: 'prevNextOutputIndex', - internalType: 'uint256', - type: 'uint256', + name: 'withdrawer', + internalType: 'address', + type: 'address', indexed: true, }, { - name: 'newNextOutputIndex', + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', internalType: 'uint256', type: 'uint256', - indexed: true, + indexed: false, }, ], - name: 'OutputsDeleted', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'CHALLENGER', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'WithdrewETH', }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'FINALIZATION_PERIOD_SECONDS', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'L2_BLOCK_TIME', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'PROPOSER', + name: 'owner', outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'SUBMISSION_INTERVAL', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l2BlockNumber', internalType: 'uint256', type: 'uint256' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, ], - name: 'computeL2Timestamp', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: 'withdrawERC20', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l2OutputIndex', internalType: 'uint256', type: 'uint256' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], - name: 'deleteL2Outputs', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l2OutputIndex', internalType: 'uint256', type: 'uint256' }, - ], - name: 'getL2Output', - outputs: [ - { - name: '', - internalType: 'struct Types.OutputProposal', - type: 'tuple', - components: [ - { name: 'outputRoot', internalType: 'bytes32', type: 'bytes32' }, - { name: 'timestamp', internalType: 'uint128', type: 'uint128' }, - { name: 'l2BlockNumber', internalType: 'uint128', type: 'uint128' }, - ], - }, + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, ], + name: 'withdrawERC721', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l2BlockNumber', internalType: 'uint256', type: 'uint256' }, - ], - name: 'getL2OutputAfter', - outputs: [ - { - name: '', - internalType: 'struct Types.OutputProposal', - type: 'tuple', - components: [ - { name: 'outputRoot', internalType: 'bytes32', type: 'bytes32' }, - { name: 'timestamp', internalType: 'uint128', type: 'uint128' }, - { name: 'l2BlockNumber', internalType: 'uint128', type: 'uint128' }, - ], - }, + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, ], + name: 'withdrawETH', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l2BlockNumber', internalType: 'uint256', type: 'uint256' }, + { name: '_to', internalType: 'address payable', type: 'address' }, ], - name: 'getL2OutputIndexAfter', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: 'withdrawETH', + outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, + ], + CheckBalanceHigh: [ { - stateMutability: 'nonpayable', - type: 'function', + type: 'event', + anonymous: false, inputs: [ { - name: '_startingBlockNumber', - internalType: 'uint256', - type: 'uint256', - }, - { - name: '_startingTimestamp', - internalType: 'uint256', - type: 'uint256', + name: 'params', + internalType: 'struct CheckBalanceHigh.Params', + type: 'tuple', + components: [ + { name: 'target', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + ], + indexed: false, }, ], - name: 'initialize', - outputs: [], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'latestBlockNumber', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'latestOutputIndex', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, + ], + CheckBalanceLow: [ { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'nextBlockNumber', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'params', + internalType: 'struct CheckBalanceLow.Params', + type: 'tuple', + components: [ + { name: 'target', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + ], + indexed: false, + }, + ], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'nextOutputIndex', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, + ], + CheckGelatoLow: [ { - stateMutability: 'payable', - type: 'function', + type: 'event', + anonymous: false, inputs: [ - { name: '_outputRoot', internalType: 'bytes32', type: 'bytes32' }, - { name: '_l2BlockNumber', internalType: 'uint256', type: 'uint256' }, - { name: '_l1BlockHash', internalType: 'bytes32', type: 'bytes32' }, - { name: '_l1BlockNumber', internalType: 'uint256', type: 'uint256' }, + { + name: 'params', + internalType: 'struct CheckGelatoLow.Params', + type: 'tuple', + components: [ + { name: 'treasury', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + { name: 'recipient', internalType: 'address', type: 'address' }, + ], + indexed: false, + }, ], - name: 'proposeL2Output', - outputs: [], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'startingBlockNumber', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'startingTimestamp', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, + ], + CheckTrue: [ { - stateMutability: 'view', + stateMutability: 'pure', type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + inputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], + name: 'check', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, ], - OptimismMintableERC20Factory: [ + Drippie: [ { stateMutability: 'nonpayable', type: 'constructor', - inputs: [{ name: '_bridge', internalType: 'address', type: 'address' }], + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, + name: 'name', + internalType: 'string', + type: 'string', + indexed: false, }, { - name: 'deployer', - internalType: 'address', - type: 'address', + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], indexed: false, }, ], - name: 'OptimismMintableERC20Created', + name: 'DripCreated', }, { type: 'event', anonymous: false, inputs: [ { - name: 'remoteToken', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, { - name: 'localToken', + name: 'name', + internalType: 'string', + type: 'string', + indexed: false, + }, + { + name: 'executor', internalType: 'address', type: 'address', - indexed: true, + indexed: false, + }, + { + name: 'timestamp', + internalType: 'uint256', + type: 'uint256', + indexed: false, }, ], - name: 'StandardL2TokenCreated', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'BRIDGE', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_symbol', internalType: 'string', type: 'string' }, - ], - name: 'createOptimismMintableERC20', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_symbol', internalType: 'string', type: 'string' }, - ], - name: 'createStandardL2Token', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'DripExecuted', }, - ], - OptimismPortal: [ { - stateMutability: 'nonpayable', - type: 'constructor', + type: 'event', + anonymous: false, inputs: [ { - name: '_l2Oracle', - internalType: 'contract L2OutputOracle', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, }, - { name: '_guardian', internalType: 'address', type: 'address' }, - { name: '_paused', internalType: 'bool', type: 'bool' }, { - name: '_config', - internalType: 'contract SystemConfig', - type: 'address', + name: 'name', + internalType: 'string', + type: 'string', + indexed: false, }, - ], - }, - { - type: 'event', - anonymous: false, - inputs: [ { - name: 'version', - internalType: 'uint8', + name: 'status', + internalType: 'enum Drippie.DripStatus', type: 'uint8', indexed: false, }, ], - name: 'Initialized', + name: 'DripStatusUpdated', }, { type: 'event', anonymous: false, inputs: [ { - name: 'account', + name: 'user', internalType: 'address', type: 'address', - indexed: false, + indexed: true, + }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, }, ], - name: 'Paused', + name: 'OwnerUpdated', }, { type: 'event', @@ -6697,367 +11810,663 @@ export const abis = { type: 'address', indexed: true, }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, { - name: 'version', + name: 'amount', internalType: 'uint256', type: 'uint256', - indexed: true, - }, - { - name: 'opaqueData', - internalType: 'bytes', - type: 'bytes', indexed: false, }, ], - name: 'TransactionDeposited', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ { - name: 'account', + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', internalType: 'address', type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', indexed: false, }, ], - name: 'Unpaused', + name: 'WithdrewERC20', }, { type: 'event', anonymous: false, inputs: [ { - name: 'withdrawalHash', - internalType: 'bytes32', - type: 'bytes32', + name: 'withdrawer', + internalType: 'address', + type: 'address', indexed: true, }, - { name: 'success', internalType: 'bool', type: 'bool', indexed: false }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'id', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], - name: 'WithdrawalFinalized', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ { - name: 'withdrawalHash', - internalType: 'bytes32', - type: 'bytes32', + name: 'withdrawer', + internalType: 'address', + type: 'address', indexed: true, }, { - name: 'from', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], - name: 'WithdrawalProven', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'GUARDIAN', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'WithdrewETH', }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'L2_ORACLE', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', outputs: [ - { name: '', internalType: 'contract L2OutputOracle', type: 'address' }, + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'SYSTEM_CONFIG', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'DELEGATECALL', outputs: [ - { name: '', internalType: 'contract SystemConfig', type: 'address' }, + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_value', internalType: 'uint256', type: 'uint256' }, - { name: '_gasLimit', internalType: 'uint64', type: 'uint64' }, - { name: '_isCreation', internalType: 'bool', type: 'bool' }, - { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, ], - name: 'depositTransaction', + name: 'create', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'donateETH', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', - inputs: [ + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', + outputs: [ { - name: '_tx', - internalType: 'struct Types.WithdrawalTransaction', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', type: 'tuple', components: [ - { name: 'nonce', internalType: 'uint256', type: 'uint256' }, - { name: 'sender', internalType: 'address', type: 'address' }, - { name: 'target', internalType: 'address', type: 'address' }, - { name: 'value', internalType: 'uint256', type: 'uint256' }, - { name: 'gasLimit', internalType: 'uint256', type: 'uint256' }, - { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, ], }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, ], - name: 'finalizeWithdrawalTransaction', - outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'finalizedWithdrawals', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, { stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: '_paused', internalType: 'bool', type: 'bool' }], - name: 'initialize', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l2OutputIndex', internalType: 'uint256', type: 'uint256' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, ], - name: 'isOutputFinalized', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + name: 'status', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'l2Sender', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', + outputs: [], }, { - stateMutability: 'pure', + stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: '_byteCount', internalType: 'uint64', type: 'uint64' }], - name: 'minimumGasLimit', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + ], + name: 'withdrawERC20', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'params', - outputs: [ - { name: 'prevBaseFee', internalType: 'uint128', type: 'uint128' }, - { name: 'prevBoughtGas', internalType: 'uint64', type: 'uint64' }, - { name: 'prevBlockNum', internalType: 'uint64', type: 'uint64' }, + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, ], + name: 'withdrawERC721', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'pause', + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'paused', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + ], + name: 'withdrawETH', + outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, + ], + Drippie_goerli: [ { stateMutability: 'nonpayable', - type: 'function', + type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, inputs: [ { - name: '_tx', - internalType: 'struct Types.WithdrawalTransaction', - type: 'tuple', - components: [ - { name: 'nonce', internalType: 'uint256', type: 'uint256' }, - { name: 'sender', internalType: 'address', type: 'address' }, - { name: 'target', internalType: 'address', type: 'address' }, - { name: 'value', internalType: 'uint256', type: 'uint256' }, - { name: 'gasLimit', internalType: 'uint256', type: 'uint256' }, - { name: 'data', internalType: 'bytes', type: 'bytes' }, - ], + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, }, - { name: '_l2OutputIndex', internalType: 'uint256', type: 'uint256' }, { - name: '_outputRootProof', - internalType: 'struct Types.OutputRootProof', + name: 'name', + internalType: 'string', + type: 'string', + indexed: false, + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', type: 'tuple', components: [ - { name: 'version', internalType: 'bytes32', type: 'bytes32' }, - { name: 'stateRoot', internalType: 'bytes32', type: 'bytes32' }, + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, { - name: 'messagePasserStorageRoot', - internalType: 'bytes32', - type: 'bytes32', + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, { - name: 'latestBlockhash', - internalType: 'bytes32', - type: 'bytes32', + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], }, ], + indexed: false, }, - { name: '_withdrawalProof', internalType: 'bytes[]', type: 'bytes[]' }, ], - name: 'proveWithdrawalTransaction', - outputs: [], + name: 'DripCreated', }, { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'provenWithdrawals', - outputs: [ - { name: 'outputRoot', internalType: 'bytes32', type: 'bytes32' }, - { name: 'timestamp', internalType: 'uint128', type: 'uint128' }, - { name: 'l2OutputIndex', internalType: 'uint128', type: 'uint128' }, + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { + name: 'name', + internalType: 'string', + type: 'string', + indexed: false, + }, + { + name: 'executor', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'timestamp', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], + name: 'DripExecuted', }, { - stateMutability: 'nonpayable', - type: 'function', - inputs: [], - name: 'unpause', - outputs: [], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { + name: 'name', + internalType: 'string', + type: 'string', + indexed: false, + }, + { + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + indexed: false, + }, + ], + name: 'DripStatusUpdated', }, - { stateMutability: 'payable', type: 'receive' }, - ], - PortalSender: [ { - stateMutability: 'nonpayable', - type: 'constructor', + type: 'event', + anonymous: false, inputs: [ { - name: '_portal', - internalType: 'contract OptimismPortal', + name: 'user', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'newOwner', + internalType: 'address', type: 'address', + indexed: true, }, ], + name: 'OwnerUpdated', }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'PORTAL', - outputs: [ - { name: '', internalType: 'contract OptimismPortal', type: 'address' }, + type: 'event', + anonymous: false, + inputs: [ + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], + name: 'ReceivedETH', }, { - stateMutability: 'nonpayable', - type: 'function', - inputs: [], - name: 'donate', - outputs: [], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewERC20', }, - ], - ProxyAdmin: [ { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'id', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ { - name: 'previousOwner', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'newOwner', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], - name: 'OwnershipTransferred', + name: 'WithdrewETH', }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'addressManager', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', outputs: [ - { name: '', internalType: 'contract AddressManager', type: 'address' }, + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_proxy', internalType: 'address payable', type: 'address' }, - { name: '_newAdmin', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, ], - name: 'changeProxyAdmin', + name: 'create', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [ - { name: '_proxy', internalType: 'address payable', type: 'address' }, + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', + outputs: [ + { + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, ], - name: 'getProxyAdmin', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '_proxy', internalType: 'address', type: 'address' }], - name: 'getProxyImplementation', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], - name: 'implementationName', - outputs: [{ name: '', internalType: 'string', type: 'string' }], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'isUpgrading', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { @@ -7067,20 +12476,11 @@ export const abis = { name: 'owner', outputs: [{ name: '', internalType: 'address', type: 'address' }], }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], - name: 'proxyType', - outputs: [ - { name: '', internalType: 'enum ProxyAdmin.ProxyType', type: 'uint8' }, - ], - }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'renounceOwnership', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', outputs: [], }, { @@ -7088,263 +12488,425 @@ export const abis = { type: 'function', inputs: [ { name: '_name', internalType: 'string', type: 'string' }, - { name: '_address', internalType: 'address', type: 'address' }, - ], - name: 'setAddress', - outputs: [], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ { - name: '_address', - internalType: 'contract AddressManager', - type: 'address', + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', }, ], - name: 'setAddressManager', + name: 'status', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_address', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, ], - name: 'setImplementationName', + name: 'withdrawERC20', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_address', internalType: 'address', type: 'address' }, - { - name: '_type', - internalType: 'enum ProxyAdmin.ProxyType', - type: 'uint8', - }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], - name: 'setProxyType', - outputs: [], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [{ name: '_upgrading', internalType: 'bool', type: 'bool' }], - name: 'setUpgrading', + name: 'withdrawERC20', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], - name: 'transferOwnership', + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_proxy', internalType: 'address payable', type: 'address' }, - { name: '_implementation', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, ], - name: 'upgrade', + name: 'withdrawETH', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_proxy', internalType: 'address payable', type: 'address' }, - { name: '_implementation', internalType: 'address', type: 'address' }, - { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_to', internalType: 'address payable', type: 'address' }, ], - name: 'upgradeAndCall', + name: 'withdrawETH', outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, ], - SystemConfig: [ + 'Drippie_optimism-goerli': [ { stateMutability: 'nonpayable', type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, inputs: [ - { name: '_owner', internalType: 'address', type: 'address' }, - { name: '_overhead', internalType: 'uint256', type: 'uint256' }, - { name: '_scalar', internalType: 'uint256', type: 'uint256' }, - { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, - { name: '_gasLimit', internalType: 'uint64', type: 'uint64' }, { - name: '_unsafeBlockSigner', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, }, { - name: '_config', - internalType: 'struct ResourceMetering.ResourceConfig', + name: 'name', + internalType: 'string', + type: 'string', + indexed: false, + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', type: 'tuple', components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, { - name: 'maxResourceLimit', - internalType: 'uint32', - type: 'uint32', - }, - { - name: 'elasticityMultiplier', - internalType: 'uint8', - type: 'uint8', - }, - { - name: 'baseFeeMaxChangeDenominator', - internalType: 'uint8', - type: 'uint8', + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', }, - { name: 'minimumBaseFee', internalType: 'uint32', type: 'uint32' }, - { name: 'systemTxMaxGas', internalType: 'uint32', type: 'uint32' }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, { - name: 'maximumBaseFee', - internalType: 'uint128', - type: 'uint128', + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], }, ], + indexed: false, }, ], + name: 'DripCreated', }, { type: 'event', anonymous: false, inputs: [ { - name: 'version', + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { + name: 'name', + internalType: 'string', + type: 'string', + indexed: false, + }, + { + name: 'executor', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'timestamp', internalType: 'uint256', type: 'uint256', + indexed: false, + }, + ], + name: 'DripExecuted', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, { - name: 'updateType', - internalType: 'enum SystemConfig.UpdateType', + name: 'name', + internalType: 'string', + type: 'string', + indexed: false, + }, + { + name: 'status', + internalType: 'enum Drippie.DripStatus', type: 'uint8', + indexed: false, + }, + ], + name: 'DripStatusUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'user', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', indexed: true, }, - { name: 'data', internalType: 'bytes', type: 'bytes', indexed: false }, ], - name: 'ConfigUpdate', + name: 'OwnerUpdated', }, { type: 'event', anonymous: false, inputs: [ { - name: 'version', - internalType: 'uint8', - type: 'uint8', + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', indexed: false, }, ], - name: 'Initialized', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ { - name: 'previousOwner', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'newOwner', + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewERC20', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'id', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewERC721', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], - name: 'OwnershipTransferred', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'UNSAFE_BLOCK_SIGNER_SLOT', - outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'WithdrewETH', }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'batcherHash', - outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'gasLimit', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_owner', internalType: 'address', type: 'address' }, - { name: '_overhead', internalType: 'uint256', type: 'uint256' }, - { name: '_scalar', internalType: 'uint256', type: 'uint256' }, - { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, - { name: '_gasLimit', internalType: 'uint64', type: 'uint64' }, - { - name: '_unsafeBlockSigner', - internalType: 'address', - type: 'address', - }, + { name: '_name', internalType: 'string', type: 'string' }, { name: '_config', - internalType: 'struct ResourceMetering.ResourceConfig', + internalType: 'struct Drippie.DripConfig', type: 'tuple', components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, { - name: 'maxResourceLimit', - internalType: 'uint32', - type: 'uint32', - }, - { - name: 'elasticityMultiplier', - internalType: 'uint8', - type: 'uint8', - }, - { - name: 'baseFeeMaxChangeDenominator', - internalType: 'uint8', - type: 'uint8', + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', }, - { name: 'minimumBaseFee', internalType: 'uint32', type: 'uint32' }, - { name: 'systemTxMaxGas', internalType: 'uint32', type: 'uint32' }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, { - name: 'maximumBaseFee', - internalType: 'uint128', - type: 'uint128', + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], }, ], }, ], - name: 'initialize', + name: 'create', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'minimumGasLimit', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', + outputs: [ + { + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, + ], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'overhead', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { stateMutability: 'view', @@ -7356,632 +12918,431 @@ export const abis = { { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'renounceOwnership', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'resourceConfig', - outputs: [ + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, { - name: '', - internalType: 'struct ResourceMetering.ResourceConfig', - type: 'tuple', - components: [ - { - name: 'maxResourceLimit', - internalType: 'uint32', - type: 'uint32', - }, - { - name: 'elasticityMultiplier', - internalType: 'uint8', - type: 'uint8', - }, - { - name: 'baseFeeMaxChangeDenominator', - internalType: 'uint8', - type: 'uint8', - }, - { name: 'minimumBaseFee', internalType: 'uint32', type: 'uint32' }, - { name: 'systemTxMaxGas', internalType: 'uint32', type: 'uint32' }, - { - name: 'maximumBaseFee', - internalType: 'uint128', - type: 'uint128', - }, - ], + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', }, ], + name: 'status', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'scalar', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], - name: 'setBatcherHash', + name: 'withdrawERC20', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_overhead', internalType: 'uint256', type: 'uint256' }, - { name: '_scalar', internalType: 'uint256', type: 'uint256' }, + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, ], - name: 'setGasConfig', + name: 'withdrawERC721', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: '_gasLimit', internalType: 'uint64', type: 'uint64' }], - name: 'setGasLimit', + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { - name: '_config', - internalType: 'struct ResourceMetering.ResourceConfig', - type: 'tuple', - components: [ - { - name: 'maxResourceLimit', - internalType: 'uint32', - type: 'uint32', - }, - { - name: 'elasticityMultiplier', - internalType: 'uint8', - type: 'uint8', - }, - { - name: 'baseFeeMaxChangeDenominator', - internalType: 'uint8', - type: 'uint8', - }, - { name: 'minimumBaseFee', internalType: 'uint32', type: 'uint32' }, - { name: 'systemTxMaxGas', internalType: 'uint32', type: 'uint32' }, - { - name: 'maximumBaseFee', - internalType: 'uint128', - type: 'uint128', - }, - ], - }, + { name: '_to', internalType: 'address payable', type: 'address' }, ], - name: 'setResourceConfig', + name: 'withdrawETH', outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, + ], + TeleportrWithdrawer: [ { stateMutability: 'nonpayable', - type: 'function', + type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, inputs: [ { - name: '_unsafeBlockSigner', + name: 'user', internalType: 'address', type: 'address', + indexed: true, + }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, }, ], - name: 'setUnsafeBlockSigner', - outputs: [], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], - name: 'transferOwnership', - outputs: [], + name: 'OwnerUpdated', }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'unsafeBlockSigner', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'ReceivedETH', }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewERC20', }, - ], - SystemDictator: [ - { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, { type: 'event', anonymous: false, inputs: [ { - name: 'version', - internalType: 'uint8', - type: 'uint8', + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'id', + internalType: 'uint256', + type: 'uint256', indexed: false, }, ], - name: 'Initialized', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ { - name: 'previousOwner', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'newOwner', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewETH', + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'OwnershipTransferred', }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'EXIT_1_NO_RETURN_STEP', - outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], + name: 'data', + outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'PROXY_TRANSFER_STEP', - outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'config', - outputs: [ - { - name: 'globalConfig', - internalType: 'struct SystemDictator.GlobalConfig', - type: 'tuple', - components: [ - { - name: 'addressManager', - internalType: 'contract AddressManager', - type: 'address', - }, - { - name: 'proxyAdmin', - internalType: 'contract ProxyAdmin', - type: 'address', - }, - { name: 'controller', internalType: 'address', type: 'address' }, - { name: 'finalOwner', internalType: 'address', type: 'address' }, - ], - }, - { - name: 'proxyAddressConfig', - internalType: 'struct SystemDictator.ProxyAddressConfig', - type: 'tuple', - components: [ - { - name: 'l2OutputOracleProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'optimismPortalProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1CrossDomainMessengerProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1StandardBridgeProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'optimismMintableERC20FactoryProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1ERC721BridgeProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'systemConfigProxy', - internalType: 'address', - type: 'address', - }, - ], - }, - { - name: 'implementationAddressConfig', - internalType: 'struct SystemDictator.ImplementationAddressConfig', - type: 'tuple', - components: [ - { - name: 'l2OutputOracleImpl', - internalType: 'contract L2OutputOracle', - type: 'address', - }, - { - name: 'optimismPortalImpl', - internalType: 'contract OptimismPortal', - type: 'address', - }, - { - name: 'l1CrossDomainMessengerImpl', - internalType: 'contract L1CrossDomainMessenger', - type: 'address', - }, - { - name: 'l1StandardBridgeImpl', - internalType: 'contract L1StandardBridge', - type: 'address', - }, - { - name: 'optimismMintableERC20FactoryImpl', - internalType: 'contract OptimismMintableERC20Factory', - type: 'address', - }, - { - name: 'l1ERC721BridgeImpl', - internalType: 'contract L1ERC721Bridge', - type: 'address', - }, - { - name: 'portalSenderImpl', - internalType: 'contract PortalSender', - type: 'address', - }, - { - name: 'systemConfigImpl', - internalType: 'contract SystemConfig', - type: 'address', - }, - ], - }, - { - name: 'systemConfigConfig', - internalType: 'struct SystemDictator.SystemConfigConfig', - type: 'tuple', - components: [ - { name: 'owner', internalType: 'address', type: 'address' }, - { name: 'overhead', internalType: 'uint256', type: 'uint256' }, - { name: 'scalar', internalType: 'uint256', type: 'uint256' }, - { name: 'batcherHash', internalType: 'bytes32', type: 'bytes32' }, - { name: 'gasLimit', internalType: 'uint64', type: 'uint64' }, - { - name: 'unsafeBlockSigner', - internalType: 'address', - type: 'address', - }, - { - name: 'resourceConfig', - internalType: 'struct ResourceMetering.ResourceConfig', - type: 'tuple', - components: [ - { - name: 'maxResourceLimit', - internalType: 'uint32', - type: 'uint32', - }, - { - name: 'elasticityMultiplier', - internalType: 'uint8', - type: 'uint8', - }, - { - name: 'baseFeeMaxChangeDenominator', - internalType: 'uint8', - type: 'uint8', - }, - { - name: 'minimumBaseFee', - internalType: 'uint32', - type: 'uint32', - }, - { - name: 'systemTxMaxGas', - internalType: 'uint32', - type: 'uint32', - }, - { - name: 'maximumBaseFee', - internalType: 'uint128', - type: 'uint128', - }, - ], - }, - ], - }, + name: 'recipient', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], + name: 'setData', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_recipient', internalType: 'address', type: 'address' }, ], + name: 'setRecipient', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'currentStep', - outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], + inputs: [ + { name: '_teleportr', internalType: 'address', type: 'address' }, + ], + name: 'setTeleportr', + outputs: [], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'dynamicConfigSet', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + name: 'teleportr', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'exit1', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'exited', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + ], + name: 'withdrawERC20', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'finalize', + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'finalized', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + ], + name: 'withdrawETH', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', + inputs: [], + name: 'withdrawFromTeleportr', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, + ], + MintManager: [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_upgrader', internalType: 'address', type: 'address' }, + { name: '_governanceToken', internalType: 'address', type: 'address' }, + ], + }, + { + type: 'event', + anonymous: false, inputs: [ { - name: '_config', - internalType: 'struct SystemDictator.DeployConfig', - type: 'tuple', - components: [ - { - name: 'globalConfig', - internalType: 'struct SystemDictator.GlobalConfig', - type: 'tuple', - components: [ - { - name: 'addressManager', - internalType: 'contract AddressManager', - type: 'address', - }, - { - name: 'proxyAdmin', - internalType: 'contract ProxyAdmin', - type: 'address', - }, - { - name: 'controller', - internalType: 'address', - type: 'address', - }, - { - name: 'finalOwner', - internalType: 'address', - type: 'address', - }, - ], - }, - { - name: 'proxyAddressConfig', - internalType: 'struct SystemDictator.ProxyAddressConfig', - type: 'tuple', - components: [ - { - name: 'l2OutputOracleProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'optimismPortalProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1CrossDomainMessengerProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1StandardBridgeProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'optimismMintableERC20FactoryProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1ERC721BridgeProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'systemConfigProxy', - internalType: 'address', - type: 'address', - }, - ], - }, - { - name: 'implementationAddressConfig', - internalType: 'struct SystemDictator.ImplementationAddressConfig', - type: 'tuple', - components: [ - { - name: 'l2OutputOracleImpl', - internalType: 'contract L2OutputOracle', - type: 'address', - }, - { - name: 'optimismPortalImpl', - internalType: 'contract OptimismPortal', - type: 'address', - }, - { - name: 'l1CrossDomainMessengerImpl', - internalType: 'contract L1CrossDomainMessenger', - type: 'address', - }, - { - name: 'l1StandardBridgeImpl', - internalType: 'contract L1StandardBridge', - type: 'address', - }, - { - name: 'optimismMintableERC20FactoryImpl', - internalType: 'contract OptimismMintableERC20Factory', - type: 'address', - }, - { - name: 'l1ERC721BridgeImpl', - internalType: 'contract L1ERC721Bridge', - type: 'address', - }, - { - name: 'portalSenderImpl', - internalType: 'contract PortalSender', - type: 'address', - }, - { - name: 'systemConfigImpl', - internalType: 'contract SystemConfig', - type: 'address', - }, - ], - }, - { - name: 'systemConfigConfig', - internalType: 'struct SystemDictator.SystemConfigConfig', - type: 'tuple', - components: [ - { name: 'owner', internalType: 'address', type: 'address' }, - { name: 'overhead', internalType: 'uint256', type: 'uint256' }, - { name: 'scalar', internalType: 'uint256', type: 'uint256' }, - { - name: 'batcherHash', - internalType: 'bytes32', - type: 'bytes32', - }, - { name: 'gasLimit', internalType: 'uint64', type: 'uint64' }, - { - name: 'unsafeBlockSigner', - internalType: 'address', - type: 'address', - }, - { - name: 'resourceConfig', - internalType: 'struct ResourceMetering.ResourceConfig', - type: 'tuple', - components: [ - { - name: 'maxResourceLimit', - internalType: 'uint32', - type: 'uint32', - }, - { - name: 'elasticityMultiplier', - internalType: 'uint8', - type: 'uint8', - }, - { - name: 'baseFeeMaxChangeDenominator', - internalType: 'uint8', - type: 'uint8', - }, - { - name: 'minimumBaseFee', - internalType: 'uint32', - type: 'uint32', - }, - { - name: 'systemTxMaxGas', - internalType: 'uint32', - type: 'uint32', - }, - { - name: 'maximumBaseFee', - internalType: 'uint128', - type: 'uint128', - }, - ], - }, - ], - }, - ], + name: 'previousOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, }, ], - name: 'initialize', - outputs: [], + name: 'OwnershipTransferred', }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'l2OutputOracleDynamicConfig', - outputs: [ - { - name: 'l2OutputOracleStartingBlockNumber', - internalType: 'uint256', - type: 'uint256', - }, - { - name: 'l2OutputOracleStartingTimestamp', - internalType: 'uint256', - type: 'uint256', - }, - ], + name: 'DENOMINATOR', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'oldL1CrossDomainMessenger', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'MINT_CAP', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'optimismPortalDynamicConfig', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + name: 'MINT_PERIOD', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'governanceToken', + outputs: [ + { name: '', internalType: 'contract GovernanceToken', type: 'address' }, + ], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_account', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'mint', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'mintPermittedAfter', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', @@ -7994,478 +13355,527 @@ export const abis = { stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'phase1', + name: 'renounceOwnership', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'phase2', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'renounceOwnership', + inputs: [ + { name: '_newMintManager', internalType: 'address', type: 'address' }, + ], + name: 'upgrade', outputs: [], }, + ], + OptimismMintableERC721Factory: [ { stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_bridge', internalType: 'address', type: 'address' }, + { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'deployer', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'OptimismMintableERC721Created', + }, + { + stateMutability: 'view', type: 'function', inputs: [], - name: 'step1', - outputs: [], + name: 'bridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'nonpayable', type: 'function', + inputs: [ + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'createOptimismMintableERC721', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'isOptimismMintableERC721', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', inputs: [], - name: 'step2', - outputs: [], + name: 'remoteChainId', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', inputs: [], - name: 'step3', - outputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], }, + ], + 'OptimismMintableERC721Factory_optimism-goerli': [ { stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_bridge', internalType: 'address', type: 'address' }, + { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'deployer', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'OptimismMintableERC721Created', + }, + { + stateMutability: 'view', type: 'function', inputs: [], - name: 'step4', - outputs: [], + name: 'BRIDGE', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'REMOTE_CHAIN_ID', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'nonpayable', type: 'function', + inputs: [ + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'createOptimismMintableERC721', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'isOptimismMintableERC721', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', inputs: [], - name: 'step5', + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + ], + AttestationStation: [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'creator', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'about', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'key', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + { name: 'val', internalType: 'bytes', type: 'bytes', indexed: false }, + ], + name: 'AttestationCreated', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { + name: '_attestations', + internalType: 'struct AttestationStation.AttestationData[]', + type: 'tuple[]', + components: [ + { name: 'about', internalType: 'address', type: 'address' }, + { name: 'key', internalType: 'bytes32', type: 'bytes32' }, + { name: 'val', internalType: 'bytes', type: 'bytes' }, + ], + }, + ], + name: 'attest', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], - name: 'transferOwnership', + inputs: [ + { name: '_about', internalType: 'address', type: 'address' }, + { name: '_key', internalType: 'bytes32', type: 'bytes32' }, + { name: '_val', internalType: 'bytes', type: 'bytes' }, + ], + name: 'attest', outputs: [], }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bytes32', type: 'bytes32' }, + ], + name: 'attestations', + outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + ], + L2ERC721Bridge: [ { stateMutability: 'nonpayable', - type: 'function', + type: 'constructor', inputs: [ - { - name: '_l2OutputOracleDynamicConfig', - internalType: 'struct SystemDictator.L2OutputOracleDynamicConfig', - type: 'tuple', - components: [ - { - name: 'l2OutputOracleStartingBlockNumber', - internalType: 'uint256', - type: 'uint256', - }, - { - name: 'l2OutputOracleStartingTimestamp', - internalType: 'uint256', - type: 'uint256', - }, - ], - }, - { - name: '_optimismPortalDynamicConfig', - internalType: 'bool', - type: 'bool', - }, + { name: '_messenger', internalType: 'address', type: 'address' }, + { name: '_otherBridge', internalType: 'address', type: 'address' }, ], - name: 'updateDynamicConfig', - outputs: [], }, - ], - SystemDictator_goerli: [ { type: 'event', anonymous: false, inputs: [ { - name: 'version', - internalType: 'uint8', - type: 'uint8', + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'to', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', indexed: false, }, ], - name: 'Initialized', + name: 'ERC721BridgeFinalized', }, { type: 'event', anonymous: false, inputs: [ { - name: 'previousOwner', + name: 'localToken', internalType: 'address', type: 'address', indexed: true, }, { - name: 'newOwner', + name: 'remoteToken', internalType: 'address', type: 'address', indexed: true, }, - ], - name: 'OwnershipTransferred', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'EXIT_1_NO_RETURN_STEP', - outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'PROXY_TRANSFER_STEP', - outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'config', - outputs: [ { - name: 'globalConfig', - internalType: 'struct SystemDictator.GlobalConfig', - type: 'tuple', - components: [ - { - name: 'addressManager', - internalType: 'contract AddressManager', - type: 'address', - }, - { - name: 'proxyAdmin', - internalType: 'contract ProxyAdmin', - type: 'address', - }, - { name: 'controller', internalType: 'address', type: 'address' }, - { name: 'finalOwner', internalType: 'address', type: 'address' }, - ], + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, }, { - name: 'proxyAddressConfig', - internalType: 'struct SystemDictator.ProxyAddressConfig', - type: 'tuple', - components: [ - { - name: 'l2OutputOracleProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'optimismPortalProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1CrossDomainMessengerProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1StandardBridgeProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'optimismMintableERC20FactoryProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1ERC721BridgeProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'systemConfigProxy', - internalType: 'address', - type: 'address', - }, - ], + name: 'to', + internalType: 'address', + type: 'address', + indexed: false, }, { - name: 'implementationAddressConfig', - internalType: 'struct SystemDictator.ImplementationAddressConfig', - type: 'tuple', - components: [ - { - name: 'l2OutputOracleImpl', - internalType: 'contract L2OutputOracle', - type: 'address', - }, - { - name: 'optimismPortalImpl', - internalType: 'contract OptimismPortal', - type: 'address', - }, - { - name: 'l1CrossDomainMessengerImpl', - internalType: 'contract L1CrossDomainMessenger', - type: 'address', - }, - { - name: 'l1StandardBridgeImpl', - internalType: 'contract L1StandardBridge', - type: 'address', - }, - { - name: 'optimismMintableERC20FactoryImpl', - internalType: 'contract OptimismMintableERC20Factory', - type: 'address', - }, - { - name: 'l1ERC721BridgeImpl', - internalType: 'contract L1ERC721Bridge', - type: 'address', - }, - { - name: 'portalSenderImpl', - internalType: 'contract PortalSender', - type: 'address', - }, - { - name: 'systemConfigImpl', - internalType: 'contract SystemConfig', - type: 'address', - }, - ], + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: false, }, { - name: 'systemConfigConfig', - internalType: 'struct SystemDictator.SystemConfigConfig', - type: 'tuple', - components: [ - { name: 'owner', internalType: 'address', type: 'address' }, - { name: 'overhead', internalType: 'uint256', type: 'uint256' }, - { name: 'scalar', internalType: 'uint256', type: 'uint256' }, - { name: 'batcherHash', internalType: 'bytes32', type: 'bytes32' }, - { name: 'gasLimit', internalType: 'uint64', type: 'uint64' }, - { - name: 'unsafeBlockSigner', - internalType: 'address', - type: 'address', - }, - ], + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, }, ], + name: 'ERC721BridgeInitiated', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC721', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC721To', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeERC721', + outputs: [], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'currentStep', - outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }], + name: 'messenger', + outputs: [ + { + name: '', + internalType: 'contract CrossDomainMessenger', + type: 'address', + }, + ], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'dynamicConfigSet', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + name: 'otherBridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', inputs: [], - name: 'exit1', - outputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], }, + ], + Optimist: [ { stateMutability: 'nonpayable', - type: 'function', - inputs: [], - name: 'finalize', - outputs: [], + type: 'constructor', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + { name: '_baseURIAttestor', internalType: 'address', type: 'address' }, + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + { + name: '_optimistAllowlist', + internalType: 'contract OptimistAllowlist', + type: 'address', + }, + ], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'finalized', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'owner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'approved', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'Approval', }, { - stateMutability: 'nonpayable', - type: 'function', + type: 'event', + anonymous: false, inputs: [ { - name: '_config', - internalType: 'struct SystemDictator.DeployConfig', - type: 'tuple', - components: [ - { - name: 'globalConfig', - internalType: 'struct SystemDictator.GlobalConfig', - type: 'tuple', - components: [ - { - name: 'addressManager', - internalType: 'contract AddressManager', - type: 'address', - }, - { - name: 'proxyAdmin', - internalType: 'contract ProxyAdmin', - type: 'address', - }, - { - name: 'controller', - internalType: 'address', - type: 'address', - }, - { - name: 'finalOwner', - internalType: 'address', - type: 'address', - }, - ], - }, - { - name: 'proxyAddressConfig', - internalType: 'struct SystemDictator.ProxyAddressConfig', - type: 'tuple', - components: [ - { - name: 'l2OutputOracleProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'optimismPortalProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1CrossDomainMessengerProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1StandardBridgeProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'optimismMintableERC20FactoryProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'l1ERC721BridgeProxy', - internalType: 'address', - type: 'address', - }, - { - name: 'systemConfigProxy', - internalType: 'address', - type: 'address', - }, - ], - }, - { - name: 'implementationAddressConfig', - internalType: 'struct SystemDictator.ImplementationAddressConfig', - type: 'tuple', - components: [ - { - name: 'l2OutputOracleImpl', - internalType: 'contract L2OutputOracle', - type: 'address', - }, - { - name: 'optimismPortalImpl', - internalType: 'contract OptimismPortal', - type: 'address', - }, - { - name: 'l1CrossDomainMessengerImpl', - internalType: 'contract L1CrossDomainMessenger', - type: 'address', - }, - { - name: 'l1StandardBridgeImpl', - internalType: 'contract L1StandardBridge', - type: 'address', - }, - { - name: 'optimismMintableERC20FactoryImpl', - internalType: 'contract OptimismMintableERC20Factory', - type: 'address', - }, - { - name: 'l1ERC721BridgeImpl', - internalType: 'contract L1ERC721Bridge', - type: 'address', - }, - { - name: 'portalSenderImpl', - internalType: 'contract PortalSender', - type: 'address', - }, - { - name: 'systemConfigImpl', - internalType: 'contract SystemConfig', - type: 'address', - }, - ], - }, - { - name: 'systemConfigConfig', - internalType: 'struct SystemDictator.SystemConfigConfig', - type: 'tuple', - components: [ - { name: 'owner', internalType: 'address', type: 'address' }, - { name: 'overhead', internalType: 'uint256', type: 'uint256' }, - { name: 'scalar', internalType: 'uint256', type: 'uint256' }, - { - name: 'batcherHash', - internalType: 'bytes32', - type: 'bytes32', - }, - { name: 'gasLimit', internalType: 'uint64', type: 'uint64' }, - { - name: 'unsafeBlockSigner', - internalType: 'address', - type: 'address', - }, - ], - }, - ], + name: 'owner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'operator', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'approved', + internalType: 'bool', + type: 'bool', + indexed: false, + }, + ], + name: 'ApprovalForAll', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'version', + internalType: 'uint8', + type: 'uint8', + indexed: false, + }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: true, }, ], - name: 'initialize', - outputs: [], + name: 'Transfer', }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'l2OutputOracleDynamicConfig', + name: 'ATTESTATION_STATION', outputs: [ { - name: 'l2OutputOracleStartingBlockNumber', - internalType: 'uint256', - type: 'uint256', - }, - { - name: 'l2OutputOracleStartingTimestamp', - internalType: 'uint256', - type: 'uint256', + name: '', + internalType: 'contract AttestationStation', + type: 'address', }, ], }, @@ -8473,342 +13883,445 @@ export const abis = { stateMutability: 'view', type: 'function', inputs: [], - name: 'oldL1CrossDomainMessenger', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'BASE_URI_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'owner', + name: 'BASE_URI_ATTESTOR', outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', inputs: [], - name: 'renounceOwnership', + name: 'OPTIMIST_ALLOWLIST', + outputs: [ + { + name: '', + internalType: 'contract OptimistAllowlist', + type: 'address', + }, + ], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'uint256', type: 'uint256' }, + ], + name: 'approve', outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'owner', internalType: 'address', type: 'address' }], + name: 'balanceOf', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', type: 'function', inputs: [], - name: 'step1', - outputs: [], + name: 'baseURI', + outputs: [{ name: '', internalType: 'string', type: 'string' }], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'step2', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'burn', outputs: [], }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'getApproved', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'step3', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'initialize', outputs: [], }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: 'owner', internalType: 'address', type: 'address' }, + { name: 'operator', internalType: 'address', type: 'address' }, + ], + name: 'isApprovedForAll', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '_recipient', internalType: 'address', type: 'address' }, + ], + name: 'isOnAllowList', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'step4', + inputs: [ + { name: '_recipient', internalType: 'address', type: 'address' }, + ], + name: 'mint', outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', inputs: [], - name: 'step5', - outputs: [], + name: 'name', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'ownerOf', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'step6', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + ], + name: 'safeTransferFrom', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], - name: 'transferOwnership', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'safeTransferFrom', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { - name: '_l2OutputOracleDynamicConfig', - internalType: 'struct SystemDictator.L2OutputOracleDynamicConfig', - type: 'tuple', - components: [ - { - name: 'l2OutputOracleStartingBlockNumber', - internalType: 'uint256', - type: 'uint256', - }, - { - name: 'l2OutputOracleStartingTimestamp', - internalType: 'uint256', - type: 'uint256', - }, - ], - }, + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bool', type: 'bool' }, ], - name: 'updateL2OutputOracleDynamicConfig', + name: 'setApprovalForAll', outputs: [], }, - ], - MintManager: [ + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }], + name: 'supportsInterface', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'symbol', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + name: 'tokenIdOfAddress', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'tokenURI', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, { stateMutability: 'nonpayable', - type: 'constructor', + type: 'function', inputs: [ - { name: '_upgrader', internalType: 'address', type: 'address' }, - { name: '_governanceToken', internalType: 'address', type: 'address' }, + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, ], + name: 'transferFrom', + outputs: [], }, { - type: 'event', - anonymous: false, + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + ], + OptimistAllowlist: [ + { + stateMutability: 'nonpayable', + type: 'constructor', inputs: [ { - name: 'previousOwner', + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + { + name: '_allowlistAttestor', internalType: 'address', type: 'address', - indexed: true, }, { - name: 'newOwner', + name: '_coinbaseQuestAttestor', internalType: 'address', type: 'address', - indexed: true, }, + { name: '_optimistInviter', internalType: 'address', type: 'address' }, ], - name: 'OwnershipTransferred', }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'DENOMINATOR', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: 'ALLOWLIST_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MINT_CAP', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: 'ATTESTATION_STATION', + outputs: [ + { + name: '', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MINT_PERIOD', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: 'COINBASE_QUEST_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'governanceToken', - outputs: [ - { name: '', internalType: 'contract GovernanceToken', type: 'address' }, - ], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_account', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - ], - name: 'mint', - outputs: [], + name: 'COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'mintPermittedAfter', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: 'OPTIMIST_CAN_MINT_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'owner', + name: 'OPTIMIST_INVITER', outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', - inputs: [], - name: 'renounceOwnership', - outputs: [], + inputs: [{ name: '_claimer', internalType: 'address', type: 'address' }], + name: 'isAllowedToMint', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', - inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], - name: 'transferOwnership', - outputs: [], + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], }, + ], + OptimistInviter: [ { stateMutability: 'nonpayable', - type: 'function', + type: 'constructor', inputs: [ - { name: '_newMintManager', internalType: 'address', type: 'address' }, + { name: '_inviteGranter', internalType: 'address', type: 'address' }, + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, ], - name: 'upgrade', - outputs: [], }, - ], - OptimismMintableERC721Factory: [ { - stateMutability: 'nonpayable', - type: 'constructor', + type: 'event', + anonymous: false, inputs: [ - { name: '_bridge', internalType: 'address', type: 'address' }, - { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, + { + name: 'version', + internalType: 'uint8', + type: 'uint8', + indexed: false, + }, ], + name: 'Initialized', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', + name: 'issuer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'remoteToken', + name: 'claimer', internalType: 'address', type: 'address', indexed: true, }, + ], + name: 'InviteClaimed', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ATTESTATION_STATION', + outputs: [ { - name: 'deployer', - internalType: 'address', + name: '', + internalType: 'contract AttestationStation', type: 'address', - indexed: false, }, ], - name: 'OptimismMintableERC721Created', }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'bridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'CAN_INVITE_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], }, { - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', - inputs: [ - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_symbol', internalType: 'string', type: 'string' }, - ], - name: 'createOptimismMintableERC721', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [], + name: 'CLAIMABLE_INVITE_TYPEHASH', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], - name: 'isOptimismMintableERC721', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + inputs: [], + name: 'EIP712_VERSION', + outputs: [{ name: '', internalType: 'string', type: 'string' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'remoteChainId', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: 'INVITE_GRANTER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'MIN_COMMITMENT_PERIOD', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, - ], - 'OptimismMintableERC721Factory_optimism-goerli': [ { stateMutability: 'nonpayable', - type: 'constructor', + type: 'function', inputs: [ - { name: '_bridge', internalType: 'address', type: 'address' }, - { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, + { name: '_claimer', internalType: 'address', type: 'address' }, + { + name: '_claimableInvite', + internalType: 'struct OptimistInviter.ClaimableInvite', + type: 'tuple', + components: [ + { name: 'issuer', internalType: 'address', type: 'address' }, + { name: 'nonce', internalType: 'bytes32', type: 'bytes32' }, + ], + }, + { name: '_signature', internalType: 'bytes', type: 'bytes' }, ], + name: 'claimInvite', + outputs: [], }, { - type: 'event', - anonymous: false, + stateMutability: 'nonpayable', + type: 'function', inputs: [ - { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'deployer', - internalType: 'address', - type: 'address', - indexed: false, - }, + { name: '_commitment', internalType: 'bytes32', type: 'bytes32' }, ], - name: 'OptimismMintableERC721Created', + name: 'commitInvite', + outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'BRIDGE', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'commitmentTimestamps', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'initialize', + outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'REMOTE_CHAIN_ID', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'inviteCounts', outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_symbol', internalType: 'string', type: 'string' }, + { name: '_accounts', internalType: 'address[]', type: 'address[]' }, + { name: '_inviteCount', internalType: 'uint256', type: 'uint256' }, ], - name: 'createOptimismMintableERC721', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'setInviteCounts', + outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], - name: 'isOptimismMintableERC721', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bytes32', type: 'bytes32' }, + ], + name: 'usedNonces', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { @@ -9369,170 +14882,6 @@ export const abis = { outputs: [{ name: '', internalType: 'address', type: 'address' }], }, ], - L2ERC721Bridge: [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [ - { name: '_messenger', internalType: 'address', type: 'address' }, - { name: '_otherBridge', internalType: 'address', type: 'address' }, - ], - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'from', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'to', - internalType: 'address', - type: 'address', - indexed: false, - }, - { - name: 'tokenId', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, - ], - name: 'ERC721BridgeFinalized', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'from', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'to', - internalType: 'address', - type: 'address', - indexed: false, - }, - { - name: 'tokenId', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, - ], - name: 'ERC721BridgeInitiated', - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'bridgeERC721', - outputs: [], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'bridgeERC721To', - outputs: [], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'finalizeBridgeERC721', - outputs: [], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'messenger', - outputs: [ - { - name: '', - internalType: 'contract CrossDomainMessenger', - type: 'address', - }, - ], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'otherBridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, - ], L2StandardBridge: [ { stateMutability: 'nonpayable', diff --git a/packages/contracts-ts/src/react.ts b/packages/contracts-ts/src/react.ts index 0aafff0808904..f6c21bfdb5430 100644 --- a/packages/contracts-ts/src/react.ts +++ b/packages/contracts-ts/src/react.ts @@ -1,4 +1,4 @@ -// Generated by @wagmi/cli@1.3.0 on 7/13/2023 at 5:05:38 PM +// Generated by @wagmi/cli@1.3.0 on 7/14/2023 at 10:11:28 AM import { useNetwork, useContractRead, @@ -3398,3835 +3398,13299 @@ export const systemDictatorGoerliConfig = { } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// MintManager +// AssetReceiver ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export const mintManagerABI = [ +export const assetReceiverABI = [ { stateMutability: 'nonpayable', type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, inputs: [ - { name: '_upgrader', internalType: 'address', type: 'address' }, - { name: '_governanceToken', internalType: 'address', type: 'address' }, + { name: 'user', internalType: 'address', type: 'address', indexed: true }, + { + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, ], + name: 'OwnerUpdated', }, { type: 'event', anonymous: false, inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, { - name: 'previousOwner', + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'ReceivedETH', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'newOwner', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], - name: 'OwnershipTransferred', + name: 'WithdrewERC20', }, { - stateMutability: 'view', + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, + ], + name: 'WithdrewERC721', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewETH', + }, + { + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'DENOMINATOR', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'MINT_CAP', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MINT_PERIOD', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'governanceToken', - outputs: [ - { name: '', internalType: 'contract GovernanceToken', type: 'address' }, - ], + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_account', internalType: 'address', type: 'address' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, { name: '_amount', internalType: 'uint256', type: 'uint256' }, ], - name: 'mint', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'mintPermittedAfter', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'owner', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + ], + name: 'withdrawERC20', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'renounceOwnership', + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], - name: 'transferOwnership', + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_newMintManager', internalType: 'address', type: 'address' }, - ], - name: 'upgrade', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, ] as const /** - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export const mintManagerAddress = { - 10: '0x5C4e7Ba1E219E47948e6e3F55019A647bA501005', - 420: '0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76', +export const assetReceiverAddress = { + 1: '0x15DdA60616Ffca20371ED1659dBB78E888f65556', + 10: '0x15DdA60616Ffca20371ED1659dBB78E888f65556', } as const /** - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export const mintManagerConfig = { - address: mintManagerAddress, - abi: mintManagerABI, +export const assetReceiverConfig = { + address: assetReceiverAddress, + abi: assetReceiverABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// OptimismMintableERC721Factory +// CheckBalanceHigh ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export const optimismMintableErc721FactoryABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [ - { name: '_bridge', internalType: 'address', type: 'address' }, - { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, - ], - }, +export const checkBalanceHighABI = [ { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'deployer', - internalType: 'address', - type: 'address', + name: 'params', + internalType: 'struct CheckBalanceHigh.Params', + type: 'tuple', + components: [ + { name: 'target', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + ], indexed: false, }, ], - name: 'OptimismMintableERC721Created', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'bridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_symbol', internalType: 'string', type: 'string' }, - ], - name: 'createOptimismMintableERC721', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], - name: 'isOptimismMintableERC721', + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'remoteChainId', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, ] as const /** - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export const optimismMintableErc721FactoryAddress = { - 10: '0x4200000000000000000000000000000000000017', +export const checkBalanceHighAddress = { + 1: '0x7eC64a8a591bFf829ff6C8be76074D540ACb813F', + 5: '0x7eC64a8a591bFf829ff6C8be76074D540ACb813F', + 420: '0x5d7103853f12109A7d27F118e54BbC654ad847E9', } as const /** - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export const optimismMintableErc721FactoryConfig = { - address: optimismMintableErc721FactoryAddress, - abi: optimismMintableErc721FactoryABI, +export const checkBalanceHighConfig = { + address: checkBalanceHighAddress, + abi: checkBalanceHighABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// OptimismMintableERC721Factory_optimism-goerli +// CheckBalanceLow ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export const optimismMintableErc721FactoryOptimismGoerliABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [ - { name: '_bridge', internalType: 'address', type: 'address' }, - { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, - ], - }, +export const checkBalanceLowABI = [ { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'remoteToken', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'deployer', - internalType: 'address', - type: 'address', + name: 'params', + internalType: 'struct CheckBalanceLow.Params', + type: 'tuple', + components: [ + { name: 'target', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + ], indexed: false, }, ], - name: 'OptimismMintableERC721Created', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'BRIDGE', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'REMOTE_CHAIN_ID', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_name', internalType: 'string', type: 'string' }, - { name: '_symbol', internalType: 'string', type: 'string' }, - ], - name: 'createOptimismMintableERC721', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [{ name: '', internalType: 'address', type: 'address' }], - name: 'isOptimismMintableERC721', + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export const optimismMintableErc721FactoryOptimismGoerliAddress = { - 420: '0x4200000000000000000000000000000000000017', +export const checkBalanceLowAddress = { + 1: '0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640', + 5: '0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640', + 420: '0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export const optimismMintableErc721FactoryOptimismGoerliConfig = { - address: optimismMintableErc721FactoryOptimismGoerliAddress, - abi: optimismMintableErc721FactoryOptimismGoerliABI, +export const checkBalanceLowConfig = { + address: checkBalanceLowAddress, + abi: checkBalanceLowABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// BaseFeeVault +// CheckGelatoLow ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export const baseFeeVaultABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], - }, +export const checkGelatoLowABI = [ { type: 'event', anonymous: false, inputs: [ { - name: 'value', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, - { - name: 'from', - internalType: 'address', - type: 'address', + name: 'params', + internalType: 'struct CheckGelatoLow.Params', + type: 'tuple', + components: [ + { name: 'treasury', internalType: 'address', type: 'address' }, + { name: 'threshold', internalType: 'uint256', type: 'uint256' }, + { name: 'recipient', internalType: 'address', type: 'address' }, + ], indexed: false, }, ], - name: 'Withdrawal', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'MIN_WITHDRAWAL_AMOUNT', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'RECIPIENT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'totalProcessed', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + name: '_EventToExposeStructInABI__Params', }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [], - name: 'withdraw', - outputs: [], + inputs: [{ name: '_params', internalType: 'bytes', type: 'bytes' }], + name: 'check', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, - { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export const baseFeeVaultAddress = { - 420: '0x4200000000000000000000000000000000000019', +export const checkGelatoLowAddress = { + 1: '0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa', + 5: '0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa', + 420: '0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export const baseFeeVaultConfig = { - address: baseFeeVaultAddress, - abi: baseFeeVaultABI, +export const checkGelatoLowConfig = { + address: checkGelatoLowAddress, + abi: checkGelatoLowABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// GasPriceOracle +// CheckTrue ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export const gasPriceOracleABI = [ - { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'baseFee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, +export const checkTrueABI = [ { stateMutability: 'pure', type: 'function', - inputs: [], - name: 'decimals', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'gasPrice', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], - name: 'getL1Fee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], - name: 'getL1GasUsed', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1BaseFee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'overhead', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'scalar', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + inputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], + name: 'check', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export const gasPriceOracleAddress = { - 420: '0x420000000000000000000000000000000000000F', +export const checkTrueAddress = { + 1: '0x5c741a38cb11424711231777D71689C458eE835D', + 5: '0x5c741a38cb11424711231777D71689C458eE835D', + 420: '0x47443D0C184e022F19BD1578F5bca6B8a9F58E32', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export const gasPriceOracleConfig = { - address: gasPriceOracleAddress, - abi: gasPriceOracleABI, +export const checkTrueConfig = { + address: checkTrueAddress, + abi: checkTrueABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L1Block +// Drippie ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l1BlockABI = [ - { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, +export const drippieABI = [ { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'DEPOSITOR_ACCOUNT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'basefee', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + indexed: false, + }, + ], + name: 'DripCreated', }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'batcherHash', - outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'hash', - outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1FeeOverhead', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1FeeScalar', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'number', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'sequenceNumber', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'nonpayable', - type: 'function', - inputs: [ - { name: '_number', internalType: 'uint64', type: 'uint64' }, - { name: '_timestamp', internalType: 'uint64', type: 'uint64' }, - { name: '_basefee', internalType: 'uint256', type: 'uint256' }, - { name: '_hash', internalType: 'bytes32', type: 'bytes32' }, - { name: '_sequenceNumber', internalType: 'uint64', type: 'uint64' }, - { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, - { name: '_l1FeeOverhead', internalType: 'uint256', type: 'uint256' }, - { name: '_l1FeeScalar', internalType: 'uint256', type: 'uint256' }, - ], - name: 'setL1BlockValues', - outputs: [], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'timestamp', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], - }, -] as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) - */ -export const l1BlockAddress = { - 420: '0x4200000000000000000000000000000000000015', -} as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) - */ -export const l1BlockConfig = { - address: l1BlockAddress, - abi: l1BlockABI, -} as const - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L1FeeVault -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) - */ -export const l1FeeVaultABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', - inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'executor', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'timestamp', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'DripExecuted', }, { type: 'event', anonymous: false, inputs: [ { - name: 'value', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'from', - internalType: 'address', - type: 'address', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', indexed: false, }, ], - name: 'Withdrawal', - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'MIN_WITHDRAWAL_AMOUNT', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'RECIPIENT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'totalProcessed', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'DripStatusUpdated', }, { - stateMutability: 'nonpayable', - type: 'function', - inputs: [], - name: 'withdraw', - outputs: [], - }, - { stateMutability: 'payable', type: 'receive' }, -] as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) - */ -export const l1FeeVaultAddress = { - 420: '0x420000000000000000000000000000000000001A', -} as const - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) - */ -export const l1FeeVaultConfig = { - address: l1FeeVaultAddress, - abi: l1FeeVaultABI, -} as const - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2CrossDomainMessenger -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) - */ -export const l2CrossDomainMessengerABI = [ - { - stateMutability: 'nonpayable', - type: 'constructor', + type: 'event', + anonymous: false, inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, { - name: '_l1CrossDomainMessenger', + name: 'newOwner', internalType: 'address', type: 'address', + indexed: true, }, ], + name: 'OwnerUpdated', }, { type: 'event', anonymous: false, inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, { - name: 'msgHash', - internalType: 'bytes32', - type: 'bytes32', - indexed: true, + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, }, ], - name: 'FailedRelayedMessage', - }, - { - type: 'event', - anonymous: false, - inputs: [ - { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, - ], - name: 'Initialized', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ { - name: 'msgHash', - internalType: 'bytes32', - type: 'bytes32', + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', indexed: true, }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, ], - name: 'RelayedMessage', + name: 'WithdrewERC20', }, { type: 'event', anonymous: false, inputs: [ { - name: 'target', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'sender', + name: 'recipient', internalType: 'address', type: 'address', - indexed: false, - }, - { name: 'message', internalType: 'bytes', type: 'bytes', indexed: false }, - { - name: 'messageNonce', - internalType: 'uint256', - type: 'uint256', - indexed: false, + indexed: true, }, { - name: 'gasLimit', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'SentMessage', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ { - name: 'sender', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'value', + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, ], - name: 'SentMessageExtension1', + name: 'WithdrewETH', }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'MESSAGE_VERSION', - outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'payable', type: 'function', - inputs: [], - name: 'MIN_GAS_CALLDATA_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + ], + name: 'create', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'OTHER_MESSENGER', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', + outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'RELAY_CALL_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', + outputs: [ + { + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, + ], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'RELAY_CONSTANT_OVERHEAD', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'RELAY_GAS_CHECK_BUFFER', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'RELAY_RESERVED_GAS', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], }, { - stateMutability: 'pure', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_message', internalType: 'bytes', type: 'bytes' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, ], - name: 'baseGas', - outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'failedMessages', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + name: 'status', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'initialize', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1CrossDomainMessenger', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'messageNonce', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], - }, - { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_nonce', internalType: 'uint256', type: 'uint256' }, - { name: '_sender', internalType: 'address', type: 'address' }, - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_value', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint256', type: 'uint256' }, - { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], - name: 'relayMessage', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_message', internalType: 'bytes', type: 'bytes' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, ], - name: 'sendMessage', + name: 'withdrawERC721', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'successfulMessages', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], - }, - { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'xDomainMessageSender', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', + outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2CrossDomainMessengerAddress = { - 420: '0x4200000000000000000000000000000000000007', +export const drippieAddress = { + 1: '0x44b3A2a040057eBafC601A78647e805fd58B1f50', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2CrossDomainMessengerConfig = { - address: l2CrossDomainMessengerAddress, - abi: l2CrossDomainMessengerABI, +export const drippieConfig = { + address: drippieAddress, + abi: drippieABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2ERC721Bridge +// Drippie_goerli ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2Erc721BridgeABI = [ +export const drippieGoerliABI = [ { stateMutability: 'nonpayable', type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, inputs: [ - { name: '_messenger', internalType: 'address', type: 'address' }, - { name: '_otherBridge', internalType: 'address', type: 'address' }, + { + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + indexed: false, + }, ], + name: 'DripCreated', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', + name: 'nameref', + internalType: 'string', + type: 'string', + indexed: true, + }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, + { + name: 'executor', internalType: 'address', type: 'address', + indexed: false, + }, + { + name: 'timestamp', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'DripExecuted', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'remoteToken', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + indexed: false, + }, + ], + name: 'DripStatusUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, + { + name: 'newOwner', internalType: 'address', type: 'address', indexed: true, }, + ], + name: 'OwnerUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'tokenId', + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ERC721BridgeFinalized', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'remoteToken', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'tokenId', + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, + ], + name: 'WithdrewERC20', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'ERC721BridgeInitiated', + name: 'WithdrewERC721', }, { - stateMutability: 'nonpayable', + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'WithdrewETH', + }, + { + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC721', - outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC721To', - outputs: [], }, { stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, ], - name: 'finalizeBridgeERC721', + name: 'create', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'messenger', + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', outputs: [ { - name: '', - internalType: 'contract CrossDomainMessenger', - type: 'address', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'reentrant', internalType: 'bool', type: 'bool' }, + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, ], }, { stateMutability: 'view', type: 'function', - inputs: [], - name: 'otherBridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + ], + name: 'status', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + ], + name: 'withdrawERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', + outputs: [], }, + { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2Erc721BridgeAddress = { - 420: '0x4200000000000000000000000000000000000014', +export const drippieGoerliAddress = { + 5: '0x44b3A2a040057eBafC601A78647e805fd58B1f50', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export const l2Erc721BridgeConfig = { - address: l2Erc721BridgeAddress, - abi: l2Erc721BridgeABI, +export const drippieGoerliConfig = { + address: drippieGoerliAddress, + abi: drippieGoerliABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2StandardBridge +// Drippie_optimism-goerli ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export const l2StandardBridgeABI = [ +export const drippieOptimismGoerliABI = [ { stateMutability: 'nonpayable', type: 'constructor', - inputs: [ - { - name: '_otherBridge', - internalType: 'address payable', - type: 'address', - }, - ], + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], }, { type: 'event', anonymous: false, inputs: [ { - name: 'l1Token', - internalType: 'address', - type: 'address', - indexed: true, - }, - { - name: 'l2Token', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, - { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, - }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], indexed: false, }, ], - name: 'DepositFinalized', + name: 'DripCreated', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'remoteToken', + name: 'executor', internalType: 'address', type: 'address', - indexed: true, + indexed: false, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'amount', + name: 'timestamp', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ERC20BridgeFinalized', + name: 'DripExecuted', }, { type: 'event', anonymous: false, inputs: [ { - name: 'localToken', - internalType: 'address', - type: 'address', + name: 'nameref', + internalType: 'string', + type: 'string', indexed: true, }, + { name: 'name', internalType: 'string', type: 'string', indexed: false }, { - name: 'remoteToken', + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + indexed: false, + }, + ], + name: 'DripStatusUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, + { + name: 'newOwner', internalType: 'address', type: 'address', indexed: true, }, + ], + name: 'OwnerUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ERC20BridgeInitiated', + name: 'ReceivedETH', }, { type: 'event', anonymous: false, inputs: [ - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, + }, { name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'ETHBridgeFinalized', + name: 'WithdrewERC20', }, { type: 'event', anonymous: false, inputs: [ - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: true }, { - name: 'amount', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, }, { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'ETHBridgeInitiated', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ { - name: 'l1Token', + name: 'withdrawer', internalType: 'address', type: 'address', indexed: true, }, { - name: 'l2Token', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, - { name: 'from', internalType: 'address', type: 'address', indexed: true }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, - { - name: 'extraData', - internalType: 'bytes', - type: 'bytes', - indexed: false, - }, ], - name: 'WithdrawalInitiated', + name: 'WithdrewETH', }, { - stateMutability: 'nonpayable', + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC20', - outputs: [], }, { - stateMutability: 'nonpayable', + stateMutability: 'payable', type: 'function', inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, ], - name: 'bridgeERC20To', - outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, ], - name: 'bridgeETH', + name: 'create', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'bridgeETHTo', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'drip', outputs: [], }, { stateMutability: 'view', type: 'function', - inputs: [ - { name: '', internalType: 'address', type: 'address' }, - { name: '', internalType: 'address', type: 'address' }, + inputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'drips', + outputs: [ + { + name: 'status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, + { + name: 'config', + internalType: 'struct Drippie.DripConfig', + type: 'tuple', + components: [ + { name: 'interval', internalType: 'uint256', type: 'uint256' }, + { + name: 'dripcheck', + internalType: 'contract IDripCheck', + type: 'address', + }, + { name: 'checkparams', internalType: 'bytes', type: 'bytes' }, + { + name: 'actions', + internalType: 'struct Drippie.DripAction[]', + type: 'tuple[]', + components: [ + { + name: 'target', + internalType: 'address payable', + type: 'address', + }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + { name: 'value', internalType: 'uint256', type: 'uint256' }, + ], + }, + ], + }, + { name: 'last', internalType: 'uint256', type: 'uint256' }, + { name: 'count', internalType: 'uint256', type: 'uint256' }, ], - name: 'deposits', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'executable', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_localToken', internalType: 'address', type: 'address' }, - { name: '_remoteToken', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'finalizeBridgeERC20', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_from', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + { name: '_name', internalType: 'string', type: 'string' }, + { + name: '_status', + internalType: 'enum Drippie.DripStatus', + type: 'uint8', + }, ], - name: 'finalizeBridgeETH', + name: 'status', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l1Token', internalType: 'address', type: 'address' }, - { name: '_l2Token', internalType: 'address', type: 'address' }, - { name: '_from', internalType: 'address', type: 'address' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, { name: '_to', internalType: 'address', type: 'address' }, { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, ], - name: 'finalizeDeposit', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', - type: 'function', - inputs: [], - name: 'l1TokenBridge', - outputs: [{ name: '', internalType: 'address', type: 'address' }], - }, - { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'messenger', - outputs: [ - { - name: '', - internalType: 'contract CrossDomainMessenger', - type: 'address', - }, + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], + name: 'withdrawERC20', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', + outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address payable', type: 'address' }, { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, ], - name: 'withdraw', + name: 'withdrawETH', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', - inputs: [ - { name: '_l2Token', internalType: 'address', type: 'address' }, - { name: '_to', internalType: 'address', type: 'address' }, - { name: '_amount', internalType: 'uint256', type: 'uint256' }, - { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, - { name: '_extraData', internalType: 'bytes', type: 'bytes' }, - ], - name: 'withdrawTo', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', outputs: [], }, { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export const l2StandardBridgeAddress = { - 420: '0x4200000000000000000000000000000000000010', +export const drippieOptimismGoerliAddress = { + 420: '0x8D8d533C16D23847EB04EEB0925be8900Dd3af86', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export const l2StandardBridgeConfig = { - address: l2StandardBridgeAddress, - abi: l2StandardBridgeABI, +export const drippieOptimismGoerliConfig = { + address: drippieOptimismGoerliAddress, + abi: drippieOptimismGoerliABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// L2ToL1MessagePasser +// TeleportrWithdrawer ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export const l2ToL1MessagePasserABI = [ - { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, +export const teleportrWithdrawerABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + }, { type: 'event', anonymous: false, inputs: [ + { name: 'user', internalType: 'address', type: 'address', indexed: true }, { - name: 'nonce', + name: 'newOwner', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'OwnerUpdated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', internalType: 'uint256', type: 'uint256', + indexed: false, + }, + ], + name: 'ReceivedETH', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', indexed: true, }, { - name: 'sender', + name: 'recipient', internalType: 'address', type: 'address', indexed: true, }, { - name: 'target', + name: 'asset', internalType: 'address', type: 'address', indexed: true, }, { - name: 'value', + name: 'amount', internalType: 'uint256', type: 'uint256', indexed: false, }, + ], + name: 'WithdrewERC20', + }, + { + type: 'event', + anonymous: false, + inputs: [ { - name: 'gasLimit', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, }, - { name: 'data', internalType: 'bytes', type: 'bytes', indexed: false }, { - name: 'withdrawalHash', - internalType: 'bytes32', - type: 'bytes32', - indexed: false, + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'asset', + internalType: 'address', + type: 'address', + indexed: true, }, + { name: 'id', internalType: 'uint256', type: 'uint256', indexed: false }, ], - name: 'MessagePassed', + name: 'WithdrewERC721', }, { type: 'event', anonymous: false, inputs: [ + { + name: 'withdrawer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'recipient', + internalType: 'address', + type: 'address', + indexed: true, + }, { name: 'amount', internalType: 'uint256', type: 'uint256', - indexed: true, + indexed: false, }, ], - name: 'WithdrawerBalanceBurnt', + name: 'WithdrewETH', + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + ], + name: 'CALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_gas', internalType: 'uint256', type: 'uint256' }, + ], + name: 'DELEGATECALL', + outputs: [ + { name: '', internalType: 'bool', type: 'bool' }, + { name: '', internalType: 'bytes', type: 'bytes' }, + ], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MESSAGE_VERSION', - outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + name: 'data', + outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'recipient', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], + name: 'setData', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'setOwner', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + name: 'setRecipient', + outputs: [], }, { stateMutability: 'nonpayable', type: 'function', + inputs: [{ name: '_teleportr', internalType: 'address', type: 'address' }], + name: 'setTeleportr', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', inputs: [], - name: 'burn', + name: 'teleportr', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'payable', + stateMutability: 'nonpayable', type: 'function', inputs: [ - { name: '_target', internalType: 'address', type: 'address' }, - { name: '_gasLimit', internalType: 'uint256', type: 'uint256' }, - { name: '_data', internalType: 'bytes', type: 'bytes' }, + { name: '_asset', internalType: 'contract ERC20', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, ], - name: 'initiateWithdrawal', + name: 'withdrawERC20', outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [], - name: 'messageNonce', - outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + inputs: [ + { name: '_asset', internalType: 'contract ERC721', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_id', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawERC721', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', - inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], - name: 'sentMessages', - outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + inputs: [ + { name: '_to', internalType: 'address payable', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'withdrawETH', + outputs: [], }, { - stateMutability: 'view', + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_to', internalType: 'address payable', type: 'address' }], + name: 'withdrawETH', + outputs: [], + }, + { + stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'withdrawFromTeleportr', + outputs: [], }, { stateMutability: 'payable', type: 'receive' }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export const l2ToL1MessagePasserAddress = { - 420: '0x4200000000000000000000000000000000000016', +export const teleportrWithdrawerAddress = { + 1: '0x78A25524D90E3D0596558fb43789bD800a5c3007', } as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export const l2ToL1MessagePasserConfig = { - address: l2ToL1MessagePasserAddress, - abi: l2ToL1MessagePasserABI, +export const teleportrWithdrawerConfig = { + address: teleportrWithdrawerAddress, + abi: teleportrWithdrawerABI, } as const ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SequencerFeeVault +// MintManager ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export const sequencerFeeVaultABI = [ +export const mintManagerABI = [ { stateMutability: 'nonpayable', type: 'constructor', - inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + inputs: [ + { name: '_upgrader', internalType: 'address', type: 'address' }, + { name: '_governanceToken', internalType: 'address', type: 'address' }, + ], }, { type: 'event', anonymous: false, inputs: [ { - name: 'value', - internalType: 'uint256', - type: 'uint256', - indexed: false, + name: 'previousOwner', + internalType: 'address', + type: 'address', + indexed: true, }, - { name: 'to', internalType: 'address', type: 'address', indexed: false }, { - name: 'from', + name: 'newOwner', internalType: 'address', type: 'address', - indexed: false, + indexed: true, }, ], - name: 'Withdrawal', + name: 'OwnershipTransferred', }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'MIN_WITHDRAWAL_AMOUNT', + name: 'DENOMINATOR', outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'RECIPIENT', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'MINT_CAP', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'l1FeeWallet', - outputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'MINT_PERIOD', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'totalProcessed', + name: 'governanceToken', + outputs: [ + { name: '', internalType: 'contract GovernanceToken', type: 'address' }, + ], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_account', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'mint', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'mintPermittedAfter', outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], }, { stateMutability: 'view', type: 'function', inputs: [], - name: 'version', - outputs: [{ name: '', internalType: 'string', type: 'string' }], + name: 'owner', + outputs: [{ name: '', internalType: 'address', type: 'address' }], }, { stateMutability: 'nonpayable', type: 'function', inputs: [], - name: 'withdraw', + name: 'renounceOwnership', outputs: [], }, - { stateMutability: 'payable', type: 'receive' }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'newOwner', internalType: 'address', type: 'address' }], + name: 'transferOwnership', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_newMintManager', internalType: 'address', type: 'address' }, + ], + name: 'upgrade', + outputs: [], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + */ +export const mintManagerAddress = { + 10: '0x5C4e7Ba1E219E47948e6e3F55019A647bA501005', + 420: '0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + */ +export const mintManagerConfig = { + address: mintManagerAddress, + abi: mintManagerABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// OptimismMintableERC721Factory +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_bridge', internalType: 'address', type: 'address' }, + { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'deployer', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'OptimismMintableERC721Created', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'bridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'createOptimismMintableERC721', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'isOptimismMintableERC721', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'remoteChainId', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryAddress = { + 10: '0x4200000000000000000000000000000000000017', +} as const + +/** + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryConfig = { + address: optimismMintableErc721FactoryAddress, + abi: optimismMintableErc721FactoryABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// OptimismMintableERC721Factory_optimism-goerli +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryOptimismGoerliABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_bridge', internalType: 'address', type: 'address' }, + { name: '_remoteChainId', internalType: 'uint256', type: 'uint256' }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'deployer', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'OptimismMintableERC721Created', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'BRIDGE', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'REMOTE_CHAIN_ID', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'createOptimismMintableERC721', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'isOptimismMintableERC721', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, ] as const /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryOptimismGoerliAddress = { + 420: '0x4200000000000000000000000000000000000017', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + */ +export const optimismMintableErc721FactoryOptimismGoerliConfig = { + address: optimismMintableErc721FactoryOptimismGoerliAddress, + abi: optimismMintableErc721FactoryOptimismGoerliABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// AttestationStation +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + */ +export const attestationStationABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'creator', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'about', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'key', internalType: 'bytes32', type: 'bytes32', indexed: true }, + { name: 'val', internalType: 'bytes', type: 'bytes', indexed: false }, + ], + name: 'AttestationCreated', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { + name: '_attestations', + internalType: 'struct AttestationStation.AttestationData[]', + type: 'tuple[]', + components: [ + { name: 'about', internalType: 'address', type: 'address' }, + { name: 'key', internalType: 'bytes32', type: 'bytes32' }, + { name: 'val', internalType: 'bytes', type: 'bytes' }, + ], + }, + ], + name: 'attest', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_about', internalType: 'address', type: 'address' }, + { name: '_key', internalType: 'bytes32', type: 'bytes32' }, + { name: '_val', internalType: 'bytes', type: 'bytes' }, + ], + name: 'attest', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bytes32', type: 'bytes32' }, + ], + name: 'attestations', + outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + */ +export const attestationStationAddress = { + 10: '0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77', + 420: '0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + */ +export const attestationStationConfig = { + address: attestationStationAddress, + abi: attestationStationABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2ERC721Bridge +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + */ +export const l2Erc721BridgeABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_messenger', internalType: 'address', type: 'address' }, + { name: '_otherBridge', internalType: 'address', type: 'address' }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC721BridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC721BridgeInitiated', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC721', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC721To', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_tokenId', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeERC721', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messenger', + outputs: [ + { + name: '', + internalType: 'contract CrossDomainMessenger', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'otherBridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + */ +export const l2Erc721BridgeAddress = { + 10: '0x4200000000000000000000000000000000000014', + 420: '0x4200000000000000000000000000000000000014', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + */ +export const l2Erc721BridgeConfig = { + address: l2Erc721BridgeAddress, + abi: l2Erc721BridgeABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Optimist +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export const optimistABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + { name: '_baseURIAttestor', internalType: 'address', type: 'address' }, + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + { + name: '_optimistAllowlist', + internalType: 'contract OptimistAllowlist', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'owner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'approved', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'Approval', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'owner', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'operator', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'approved', internalType: 'bool', type: 'bool', indexed: false }, + ], + name: 'ApprovalForAll', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'tokenId', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'Transfer', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ATTESTATION_STATION', + outputs: [ + { + name: '', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'BASE_URI_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'BASE_URI_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OPTIMIST_ALLOWLIST', + outputs: [ + { name: '', internalType: 'contract OptimistAllowlist', type: 'address' }, + ], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'uint256', type: 'uint256' }, + ], + name: 'approve', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'owner', internalType: 'address', type: 'address' }], + name: 'balanceOf', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'baseURI', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'burn', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'getApproved', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_name', internalType: 'string', type: 'string' }, + { name: '_symbol', internalType: 'string', type: 'string' }, + ], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: 'owner', internalType: 'address', type: 'address' }, + { name: 'operator', internalType: 'address', type: 'address' }, + ], + name: 'isApprovedForAll', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + name: 'isOnAllowList', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + name: 'mint', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'name', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'ownerOf', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + ], + name: 'safeTransferFrom', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + { name: 'data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'safeTransferFrom', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bool', type: 'bool' }, + ], + name: 'setApprovalForAll', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }], + name: 'supportsInterface', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'symbol', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [{ name: '_owner', internalType: 'address', type: 'address' }], + name: 'tokenIdOfAddress', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_tokenId', internalType: 'uint256', type: 'uint256' }], + name: 'tokenURI', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: 'from', internalType: 'address', type: 'address' }, + { name: 'to', internalType: 'address', type: 'address' }, + { name: 'tokenId', internalType: 'uint256', type: 'uint256' }, + ], + name: 'transferFrom', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export const optimistAddress = { + 10: '0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5', + 420: '0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export const optimistConfig = { + address: optimistAddress, + abi: optimistABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// OptimistAllowlist +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + */ +export const optimistAllowlistABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + { name: '_allowlistAttestor', internalType: 'address', type: 'address' }, + { + name: '_coinbaseQuestAttestor', + internalType: 'address', + type: 'address', + }, + { name: '_optimistInviter', internalType: 'address', type: 'address' }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ALLOWLIST_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ATTESTATION_STATION', + outputs: [ + { + name: '', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'COINBASE_QUEST_ATTESTOR', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OPTIMIST_CAN_MINT_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OPTIMIST_INVITER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_claimer', internalType: 'address', type: 'address' }], + name: 'isAllowedToMint', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + */ +export const optimistAllowlistAddress = { + 10: '0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180', + 420: '0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + */ +export const optimistAllowlistConfig = { + address: optimistAllowlistAddress, + abi: optimistAllowlistABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// OptimistInviter +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export const optimistInviterABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { name: '_inviteGranter', internalType: 'address', type: 'address' }, + { + name: '_attestationStation', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'issuer', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'claimer', + internalType: 'address', + type: 'address', + indexed: true, + }, + ], + name: 'InviteClaimed', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'ATTESTATION_STATION', + outputs: [ + { + name: '', + internalType: 'contract AttestationStation', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'CAN_INVITE_ATTESTATION_KEY', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'CLAIMABLE_INVITE_TYPEHASH', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'EIP712_VERSION', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'INVITE_GRANTER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_COMMITMENT_PERIOD', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_claimer', internalType: 'address', type: 'address' }, + { + name: '_claimableInvite', + internalType: 'struct OptimistInviter.ClaimableInvite', + type: 'tuple', + components: [ + { name: 'issuer', internalType: 'address', type: 'address' }, + { name: 'nonce', internalType: 'bytes32', type: 'bytes32' }, + ], + }, + { name: '_signature', internalType: 'bytes', type: 'bytes' }, + ], + name: 'claimInvite', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_commitment', internalType: 'bytes32', type: 'bytes32' }], + name: 'commitInvite', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'commitmentTimestamps', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [{ name: '_name', internalType: 'string', type: 'string' }], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'address', type: 'address' }], + name: 'inviteCounts', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_accounts', internalType: 'address[]', type: 'address[]' }, + { name: '_inviteCount', internalType: 'uint256', type: 'uint256' }, + ], + name: 'setInviteCounts', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'bytes32', type: 'bytes32' }, + ], + name: 'usedNonces', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export const optimistInviterAddress = { + 10: '0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929', + 420: '0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929', +} as const + +/** + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + */ +export const optimistInviterConfig = { + address: optimistInviterAddress, + abi: optimistInviterABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// BaseFeeVault +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export const baseFeeVaultABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Withdrawal', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_WITHDRAWAL_AMOUNT', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RECIPIENT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'totalProcessed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'withdraw', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export const baseFeeVaultAddress = { + 420: '0x4200000000000000000000000000000000000019', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export const baseFeeVaultConfig = { + address: baseFeeVaultAddress, + abi: baseFeeVaultABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// GasPriceOracle +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + */ +export const gasPriceOracleABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'baseFee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [], + name: 'decimals', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'gasPrice', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], + name: 'getL1Fee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '_data', internalType: 'bytes', type: 'bytes' }], + name: 'getL1GasUsed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1BaseFee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'overhead', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'scalar', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + */ +export const gasPriceOracleAddress = { + 420: '0x420000000000000000000000000000000000000F', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + */ +export const gasPriceOracleConfig = { + address: gasPriceOracleAddress, + abi: gasPriceOracleABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L1Block +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + */ +export const l1BlockABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'DEPOSITOR_ACCOUNT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'basefee', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'batcherHash', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'hash', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1FeeOverhead', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1FeeScalar', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'number', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'sequenceNumber', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_number', internalType: 'uint64', type: 'uint64' }, + { name: '_timestamp', internalType: 'uint64', type: 'uint64' }, + { name: '_basefee', internalType: 'uint256', type: 'uint256' }, + { name: '_hash', internalType: 'bytes32', type: 'bytes32' }, + { name: '_sequenceNumber', internalType: 'uint64', type: 'uint64' }, + { name: '_batcherHash', internalType: 'bytes32', type: 'bytes32' }, + { name: '_l1FeeOverhead', internalType: 'uint256', type: 'uint256' }, + { name: '_l1FeeScalar', internalType: 'uint256', type: 'uint256' }, + ], + name: 'setL1BlockValues', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'timestamp', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + */ +export const l1BlockAddress = { + 420: '0x4200000000000000000000000000000000000015', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + */ +export const l1BlockConfig = { + address: l1BlockAddress, + abi: l1BlockABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L1FeeVault +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export const l1FeeVaultABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Withdrawal', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_WITHDRAWAL_AMOUNT', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RECIPIENT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'totalProcessed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'withdraw', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export const l1FeeVaultAddress = { + 420: '0x420000000000000000000000000000000000001A', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export const l1FeeVaultConfig = { + address: l1FeeVaultAddress, + abi: l1FeeVaultABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2CrossDomainMessenger +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export const l2CrossDomainMessengerABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_l1CrossDomainMessenger', + internalType: 'address', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'msgHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + ], + name: 'FailedRelayedMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'version', internalType: 'uint8', type: 'uint8', indexed: false }, + ], + name: 'Initialized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'msgHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: true, + }, + ], + name: 'RelayedMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'target', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: false, + }, + { name: 'message', internalType: 'bytes', type: 'bytes', indexed: false }, + { + name: 'messageNonce', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'gasLimit', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'SentMessage', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'SentMessageExtension1', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MESSAGE_VERSION', + outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_CALLDATA_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'OTHER_MESSENGER', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_CALL_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_CONSTANT_OVERHEAD', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_GAS_CHECK_BUFFER', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RELAY_RESERVED_GAS', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'pure', + type: 'function', + inputs: [ + { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + ], + name: 'baseGas', + outputs: [{ name: '', internalType: 'uint64', type: 'uint64' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'failedMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'initialize', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1CrossDomainMessenger', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messageNonce', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_nonce', internalType: 'uint256', type: 'uint256' }, + { name: '_sender', internalType: 'address', type: 'address' }, + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_value', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint256', type: 'uint256' }, + { name: '_message', internalType: 'bytes', type: 'bytes' }, + ], + name: 'relayMessage', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_message', internalType: 'bytes', type: 'bytes' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + ], + name: 'sendMessage', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'successfulMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'xDomainMessageSender', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export const l2CrossDomainMessengerAddress = { + 420: '0x4200000000000000000000000000000000000007', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export const l2CrossDomainMessengerConfig = { + address: l2CrossDomainMessengerAddress, + abi: l2CrossDomainMessengerABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2StandardBridge +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + */ +export const l2StandardBridgeABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [ + { + name: '_otherBridge', + internalType: 'address payable', + type: 'address', + }, + ], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'l1Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'l2Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'DepositFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC20BridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'localToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'remoteToken', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ERC20BridgeInitiated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ETHBridgeFinalized', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: true }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'ETHBridgeInitiated', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'l1Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'l2Token', + internalType: 'address', + type: 'address', + indexed: true, + }, + { name: 'from', internalType: 'address', type: 'address', indexed: true }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'extraData', + internalType: 'bytes', + type: 'bytes', + indexed: false, + }, + ], + name: 'WithdrawalInitiated', + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC20', + outputs: [], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeERC20To', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeETH', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'bridgeETHTo', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [ + { name: '', internalType: 'address', type: 'address' }, + { name: '', internalType: 'address', type: 'address' }, + ], + name: 'deposits', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [ + { name: '_localToken', internalType: 'address', type: 'address' }, + { name: '_remoteToken', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeERC20', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeBridgeETH', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_l1Token', internalType: 'address', type: 'address' }, + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_from', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'finalizeDeposit', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1TokenBridge', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messenger', + outputs: [ + { + name: '', + internalType: 'contract CrossDomainMessenger', + type: 'address', + }, + ], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'withdraw', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_l2Token', internalType: 'address', type: 'address' }, + { name: '_to', internalType: 'address', type: 'address' }, + { name: '_amount', internalType: 'uint256', type: 'uint256' }, + { name: '_minGasLimit', internalType: 'uint32', type: 'uint32' }, + { name: '_extraData', internalType: 'bytes', type: 'bytes' }, + ], + name: 'withdrawTo', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + */ +export const l2StandardBridgeAddress = { + 420: '0x4200000000000000000000000000000000000010', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000010) + */ +export const l2StandardBridgeConfig = { + address: l2StandardBridgeAddress, + abi: l2StandardBridgeABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// L2ToL1MessagePasser +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + */ +export const l2ToL1MessagePasserABI = [ + { stateMutability: 'nonpayable', type: 'constructor', inputs: [] }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'nonce', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + { + name: 'sender', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'target', + internalType: 'address', + type: 'address', + indexed: true, + }, + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { + name: 'gasLimit', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'data', internalType: 'bytes', type: 'bytes', indexed: false }, + { + name: 'withdrawalHash', + internalType: 'bytes32', + type: 'bytes32', + indexed: false, + }, + ], + name: 'MessagePassed', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: true, + }, + ], + name: 'WithdrawerBalanceBurnt', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MESSAGE_VERSION', + outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'burn', + outputs: [], + }, + { + stateMutability: 'payable', + type: 'function', + inputs: [ + { name: '_target', internalType: 'address', type: 'address' }, + { name: '_gasLimit', internalType: 'uint256', type: 'uint256' }, + { name: '_data', internalType: 'bytes', type: 'bytes' }, + ], + name: 'initiateWithdrawal', + outputs: [], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'messageNonce', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + name: 'sentMessages', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + */ +export const l2ToL1MessagePasserAddress = { + 420: '0x4200000000000000000000000000000000000016', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000016) + */ +export const l2ToL1MessagePasserConfig = { + address: l2ToL1MessagePasserAddress, + abi: l2ToL1MessagePasserABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// SequencerFeeVault +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + */ +export const sequencerFeeVaultABI = [ + { + stateMutability: 'nonpayable', + type: 'constructor', + inputs: [{ name: '_recipient', internalType: 'address', type: 'address' }], + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'value', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Withdrawal', + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'MIN_WITHDRAWAL_AMOUNT', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'RECIPIENT', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'l1FeeWallet', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'totalProcessed', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + }, + { + stateMutability: 'view', + type: 'function', + inputs: [], + name: 'version', + outputs: [{ name: '', internalType: 'string', type: 'string' }], + }, + { + stateMutability: 'nonpayable', + type: 'function', + inputs: [], + name: 'withdraw', + outputs: [], + }, + { stateMutability: 'payable', type: 'receive' }, +] as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + */ +export const sequencerFeeVaultAddress = { + 420: '0x4200000000000000000000000000000000000011', +} as const + +/** + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + */ +export const sequencerFeeVaultConfig = { + address: sequencerFeeVaultAddress, + abi: sequencerFeeVaultABI, +} as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// eslintIgnore +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// React +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link addressManagerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function useAddressManagerRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof addressManagerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"getAddress"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function useAddressManagerGetAddress< + TFunctionName extends 'getAddress', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof addressManagerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + functionName: 'getAddress', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"owner"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function useAddressManagerOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof addressManagerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + functionName: 'owner', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link addressManagerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function useAddressManagerWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof addressManagerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof addressManagerABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"renounceOwnership"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function useAddressManagerRenounceOwnership< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof addressManagerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof addressManagerABI, + 'renounceOwnership' + >['request']['abi'], + 'renounceOwnership', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'renounceOwnership' + } + : UseContractWriteConfig< + typeof addressManagerABI, + 'renounceOwnership', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'renounceOwnership' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite( + { + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + functionName: 'renounceOwnership', + ...config, + } as any + ) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"setAddress"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function useAddressManagerSetAddress< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof addressManagerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof addressManagerABI, + 'setAddress' + >['request']['abi'], + 'setAddress', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'setAddress' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setAddress' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + functionName: 'setAddress', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"transferOwnership"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function useAddressManagerTransferOwnership< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof addressManagerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof addressManagerABI, + 'transferOwnership' + >['request']['abi'], + 'transferOwnership', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'transferOwnership' + } + : UseContractWriteConfig< + typeof addressManagerABI, + 'transferOwnership', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'transferOwnership' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite( + { + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + functionName: 'transferOwnership', + ...config, + } as any + ) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link addressManagerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function usePrepareAddressManagerWrite( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof addressManagerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"renounceOwnership"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function usePrepareAddressManagerRenounceOwnership( + config: Omit< + UsePrepareContractWriteConfig< + typeof addressManagerABI, + 'renounceOwnership' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof addressManagerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + functionName: 'renounceOwnership', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"setAddress"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function usePrepareAddressManagerSetAddress( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof addressManagerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + functionName: 'setAddress', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"transferOwnership"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function usePrepareAddressManagerTransferOwnership( + config: Omit< + UsePrepareContractWriteConfig< + typeof addressManagerABI, + 'transferOwnership' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof addressManagerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + functionName: 'transferOwnership', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link addressManagerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function useAddressManagerEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof addressManagerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link addressManagerABI}__ and `eventName` set to `"AddressSet"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function useAddressManagerAddressSetEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof addressManagerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + eventName: 'AddressSet', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link addressManagerABI}__ and `eventName` set to `"OwnershipTransferred"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + */ +export function useAddressManagerOwnershipTransferredEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof addressManagerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: addressManagerABI, + address: + addressManagerAddress[chainId as keyof typeof addressManagerAddress], + eventName: 'OwnershipTransferred', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerRead< + TFunctionName extends string, + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"MESSAGE_VERSION"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerMessageVersion< + TFunctionName extends 'MESSAGE_VERSION', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'MESSAGE_VERSION', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_CALLDATA_OVERHEAD"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerMinGasCalldataOverhead< + TFunctionName extends 'MIN_GAS_CALLDATA_OVERHEAD', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'MIN_GAS_CALLDATA_OVERHEAD', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerMinGasDynamicOverheadDenominator< + TFunctionName extends 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerMinGasDynamicOverheadNumerator< + TFunctionName extends 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"OTHER_MESSENGER"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerOtherMessenger< + TFunctionName extends 'OTHER_MESSENGER', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'OTHER_MESSENGER', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"PORTAL"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerPortal< + TFunctionName extends 'PORTAL', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'PORTAL', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_CALL_OVERHEAD"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerRelayCallOverhead< + TFunctionName extends 'RELAY_CALL_OVERHEAD', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'RELAY_CALL_OVERHEAD', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_CONSTANT_OVERHEAD"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerRelayConstantOverhead< + TFunctionName extends 'RELAY_CONSTANT_OVERHEAD', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'RELAY_CONSTANT_OVERHEAD', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_GAS_CHECK_BUFFER"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerRelayGasCheckBuffer< + TFunctionName extends 'RELAY_GAS_CHECK_BUFFER', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'RELAY_GAS_CHECK_BUFFER', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_RESERVED_GAS"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerRelayReservedGas< + TFunctionName extends 'RELAY_RESERVED_GAS', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'RELAY_RESERVED_GAS', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"baseGas"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerBaseGas< + TFunctionName extends 'baseGas', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'baseGas', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"failedMessages"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerFailedMessages< + TFunctionName extends 'failedMessages', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'failedMessages', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"messageNonce"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerMessageNonce< + TFunctionName extends 'messageNonce', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'messageNonce', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"successfulMessages"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerSuccessfulMessages< + TFunctionName extends 'successfulMessages', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'successfulMessages', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"version"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'version', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"xDomainMessageSender"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerXDomainMessageSender< + TFunctionName extends 'xDomainMessageSender', + TSelectData = ReadContractResult< + typeof l1CrossDomainMessengerABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'xDomainMessageSender', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1CrossDomainMessengerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1CrossDomainMessengerABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof l1CrossDomainMessengerABI, + TFunctionName, + TMode + >({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"initialize"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerInitialize< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1CrossDomainMessengerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1CrossDomainMessengerABI, + 'initialize' + >['request']['abi'], + 'initialize', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } + : UseContractWriteConfig< + typeof l1CrossDomainMessengerABI, + 'initialize', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'initialize' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof l1CrossDomainMessengerABI, + 'initialize', + TMode + >({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'initialize', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"relayMessage"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerRelayMessage< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1CrossDomainMessengerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1CrossDomainMessengerABI, + 'relayMessage' + >['request']['abi'], + 'relayMessage', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'relayMessage' + } + : UseContractWriteConfig< + typeof l1CrossDomainMessengerABI, + 'relayMessage', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'relayMessage' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof l1CrossDomainMessengerABI, + 'relayMessage', + TMode + >({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'relayMessage', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"sendMessage"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerSendMessage< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1CrossDomainMessengerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1CrossDomainMessengerABI, + 'sendMessage' + >['request']['abi'], + 'sendMessage', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'sendMessage' + } + : UseContractWriteConfig< + typeof l1CrossDomainMessengerABI, + 'sendMessage', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'sendMessage' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof l1CrossDomainMessengerABI, + 'sendMessage', + TMode + >({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'sendMessage', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function usePrepareL1CrossDomainMessengerWrite< + TFunctionName extends string +>( + config: Omit< + UsePrepareContractWriteConfig< + typeof l1CrossDomainMessengerABI, + TFunctionName + >, + 'abi' | 'address' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"initialize"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function usePrepareL1CrossDomainMessengerInitialize( + config: Omit< + UsePrepareContractWriteConfig< + typeof l1CrossDomainMessengerABI, + 'initialize' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'initialize', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"relayMessage"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function usePrepareL1CrossDomainMessengerRelayMessage( + config: Omit< + UsePrepareContractWriteConfig< + typeof l1CrossDomainMessengerABI, + 'relayMessage' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'relayMessage', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"sendMessage"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function usePrepareL1CrossDomainMessengerSendMessage( + config: Omit< + UsePrepareContractWriteConfig< + typeof l1CrossDomainMessengerABI, + 'sendMessage' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + functionName: 'sendMessage', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `eventName` set to `"FailedRelayedMessage"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerFailedRelayedMessageEvent( + config: Omit< + UseContractEventConfig< + typeof l1CrossDomainMessengerABI, + 'FailedRelayedMessage' + >, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + eventName: 'FailedRelayedMessage', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `eventName` set to `"Initialized"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerInitializedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + eventName: 'Initialized', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `eventName` set to `"RelayedMessage"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerRelayedMessageEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + eventName: 'RelayedMessage', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `eventName` set to `"SentMessage"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerSentMessageEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + eventName: 'SentMessage', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `eventName` set to `"SentMessageExtension1"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + */ +export function useL1CrossDomainMessengerSentMessageExtension1Event( + config: Omit< + UseContractEventConfig< + typeof l1CrossDomainMessengerABI, + 'SentMessageExtension1' + >, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1CrossDomainMessengerABI, + address: + l1CrossDomainMessengerAddress[ + chainId as keyof typeof l1CrossDomainMessengerAddress + ], + eventName: 'SentMessageExtension1', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"deposits"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeDeposits< + TFunctionName extends 'deposits', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + functionName: 'deposits', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"messenger"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeMessenger< + TFunctionName extends 'messenger', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + functionName: 'messenger', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"otherBridge"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeOtherBridge< + TFunctionName extends 'otherBridge', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + functionName: 'otherBridge', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"version"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + functionName: 'version', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1Erc721BridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1Erc721BridgeABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeBridgeErc721< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1Erc721BridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1Erc721BridgeABI, + 'bridgeERC721' + >['request']['abi'], + 'bridgeERC721', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'bridgeERC721' + } + : UseContractWriteConfig< + typeof l1Erc721BridgeABI, + 'bridgeERC721', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'bridgeERC721' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + functionName: 'bridgeERC721', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721To"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeBridgeErc721To< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1Erc721BridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1Erc721BridgeABI, + 'bridgeERC721To' + >['request']['abi'], + 'bridgeERC721To', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'bridgeERC721To' + } + : UseContractWriteConfig< + typeof l1Erc721BridgeABI, + 'bridgeERC721To', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'bridgeERC721To' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + functionName: 'bridgeERC721To', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"finalizeBridgeERC721"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeFinalizeBridgeErc721< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1Erc721BridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1Erc721BridgeABI, + 'finalizeBridgeERC721' + >['request']['abi'], + 'finalizeBridgeERC721', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'finalizeBridgeERC721' + } + : UseContractWriteConfig< + typeof l1Erc721BridgeABI, + 'finalizeBridgeERC721', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'finalizeBridgeERC721' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof l1Erc721BridgeABI, + 'finalizeBridgeERC721', + TMode + >({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + functionName: 'finalizeBridgeERC721', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function usePrepareL1Erc721BridgeWrite( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function usePrepareL1Erc721BridgeBridgeErc721( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + functionName: 'bridgeERC721', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721To"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function usePrepareL1Erc721BridgeBridgeErc721To( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + functionName: 'bridgeERC721To', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"finalizeBridgeERC721"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function usePrepareL1Erc721BridgeFinalizeBridgeErc721( + config: Omit< + UsePrepareContractWriteConfig< + typeof l1Erc721BridgeABI, + 'finalizeBridgeERC721' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + functionName: 'finalizeBridgeERC721', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `eventName` set to `"ERC721BridgeFinalized"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeErc721BridgeFinalizedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + eventName: 'ERC721BridgeFinalized', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `eventName` set to `"ERC721BridgeInitiated"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + */ +export function useL1Erc721BridgeErc721BridgeInitiatedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1Erc721BridgeABI, + address: + l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + eventName: 'ERC721BridgeInitiated', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig< + typeof l1StandardBridgeABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"deposits"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeDeposits< + TFunctionName extends 'deposits', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig< + typeof l1StandardBridgeABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'deposits', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"l2TokenBridge"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeL2TokenBridge< + TFunctionName extends 'l2TokenBridge', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig< + typeof l1StandardBridgeABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'l2TokenBridge', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"messenger"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeMessenger< + TFunctionName extends 'messenger', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig< + typeof l1StandardBridgeABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'messenger', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"version"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig< + typeof l1StandardBridgeABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'version', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + TFunctionName, + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeERC20"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeBridgeErc20< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'bridgeERC20' + >['request']['abi'], + 'bridgeERC20', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'bridgeERC20' + } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'bridgeERC20', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'bridgeERC20' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'bridgeERC20', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeERC20To"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeBridgeErc20To< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'bridgeERC20To' + >['request']['abi'], + 'bridgeERC20To', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'bridgeERC20To' + } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'bridgeERC20To', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'bridgeERC20To' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'bridgeERC20To', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeETH"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeBridgeEth< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'bridgeETH' + >['request']['abi'], + 'bridgeETH', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'bridgeETH' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'bridgeETH' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'bridgeETH', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeETHTo"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeBridgeEthTo< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'bridgeETHTo' + >['request']['abi'], + 'bridgeETHTo', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'bridgeETHTo' + } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'bridgeETHTo', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'bridgeETHTo' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'bridgeETHTo', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositERC20"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeDepositErc20< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'depositERC20' + >['request']['abi'], + 'depositERC20', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'depositERC20' + } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'depositERC20', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'depositERC20' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'depositERC20', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositERC20To"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeDepositErc20To< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'depositERC20To' + >['request']['abi'], + 'depositERC20To', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'depositERC20To' + } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'depositERC20To', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'depositERC20To' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'depositERC20To', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositETH"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeDepositEth< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'depositETH' + >['request']['abi'], + 'depositETH', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'depositETH' } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'depositETH', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'depositETH' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'depositETH', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositETHTo"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeDepositEthTo< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'depositETHTo' + >['request']['abi'], + 'depositETHTo', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'depositETHTo' + } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'depositETHTo', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'depositETHTo' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'depositETHTo', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeBridgeERC20"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeFinalizeBridgeErc20< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'finalizeBridgeERC20' + >['request']['abi'], + 'finalizeBridgeERC20', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'finalizeBridgeERC20' + } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'finalizeBridgeERC20', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'finalizeBridgeERC20' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof l1StandardBridgeABI, + 'finalizeBridgeERC20', + TMode + >({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'finalizeBridgeERC20', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeBridgeETH"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeFinalizeBridgeEth< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'finalizeBridgeETH' + >['request']['abi'], + 'finalizeBridgeETH', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'finalizeBridgeETH' + } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'finalizeBridgeETH', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'finalizeBridgeETH' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof l1StandardBridgeABI, + 'finalizeBridgeETH', + TMode + >({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'finalizeBridgeETH', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeERC20Withdrawal"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeFinalizeErc20Withdrawal< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'finalizeERC20Withdrawal' + >['request']['abi'], + 'finalizeERC20Withdrawal', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'finalizeERC20Withdrawal' + } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'finalizeERC20Withdrawal', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'finalizeERC20Withdrawal' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof l1StandardBridgeABI, + 'finalizeERC20Withdrawal', + TMode + >({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'finalizeERC20Withdrawal', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeETHWithdrawal"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeFinalizeEthWithdrawal< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1StandardBridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1StandardBridgeABI, + 'finalizeETHWithdrawal' + >['request']['abi'], + 'finalizeETHWithdrawal', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'finalizeETHWithdrawal' + } + : UseContractWriteConfig< + typeof l1StandardBridgeABI, + 'finalizeETHWithdrawal', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'finalizeETHWithdrawal' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof l1StandardBridgeABI, + 'finalizeETHWithdrawal', + TMode + >({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'finalizeETHWithdrawal', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeWrite( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeERC20"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeBridgeErc20( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'bridgeERC20', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeERC20To"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeBridgeErc20To( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'bridgeERC20To', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeETH"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeBridgeEth( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'bridgeETH', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeETHTo"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeBridgeEthTo( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'bridgeETHTo', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositERC20"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeDepositErc20( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'depositERC20', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositERC20To"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeDepositErc20To( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'depositERC20To', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositETH"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeDepositEth( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'depositETH', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositETHTo"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeDepositEthTo( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'depositETHTo', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeBridgeERC20"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeFinalizeBridgeErc20( + config: Omit< + UsePrepareContractWriteConfig< + typeof l1StandardBridgeABI, + 'finalizeBridgeERC20' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'finalizeBridgeERC20', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeBridgeETH"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeFinalizeBridgeEth( + config: Omit< + UsePrepareContractWriteConfig< + typeof l1StandardBridgeABI, + 'finalizeBridgeETH' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'finalizeBridgeETH', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeERC20Withdrawal"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeFinalizeErc20Withdrawal( + config: Omit< + UsePrepareContractWriteConfig< + typeof l1StandardBridgeABI, + 'finalizeERC20Withdrawal' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'finalizeERC20Withdrawal', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeETHWithdrawal"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function usePrepareL1StandardBridgeFinalizeEthWithdrawal( + config: Omit< + UsePrepareContractWriteConfig< + typeof l1StandardBridgeABI, + 'finalizeETHWithdrawal' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + functionName: 'finalizeETHWithdrawal', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ERC20BridgeFinalized"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeErc20BridgeFinalizedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + eventName: 'ERC20BridgeFinalized', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ERC20BridgeInitiated"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeErc20BridgeInitiatedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + eventName: 'ERC20BridgeInitiated', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ERC20DepositInitiated"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeErc20DepositInitiatedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + eventName: 'ERC20DepositInitiated', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ERC20WithdrawalFinalized"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeErc20WithdrawalFinalizedEvent( + config: Omit< + UseContractEventConfig< + typeof l1StandardBridgeABI, + 'ERC20WithdrawalFinalized' + >, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + eventName: 'ERC20WithdrawalFinalized', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ETHBridgeFinalized"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeEthBridgeFinalizedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + eventName: 'ETHBridgeFinalized', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ETHBridgeInitiated"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeEthBridgeInitiatedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + eventName: 'ETHBridgeInitiated', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ETHDepositInitiated"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeEthDepositInitiatedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + eventName: 'ETHDepositInitiated', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ETHWithdrawalFinalized"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + */ +export function useL1StandardBridgeEthWithdrawalFinalizedEvent( + config: Omit< + UseContractEventConfig< + typeof l1StandardBridgeABI, + 'ETHWithdrawalFinalized' + >, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l1StandardBridgeABI, + address: + l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + eventName: 'ETHWithdrawalFinalized', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"CHALLENGER"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleChallenger< + TFunctionName extends 'CHALLENGER', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'CHALLENGER', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"FINALIZATION_PERIOD_SECONDS"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleFinalizationPeriodSeconds< + TFunctionName extends 'FINALIZATION_PERIOD_SECONDS', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'FINALIZATION_PERIOD_SECONDS', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"L2_BLOCK_TIME"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleL2BlockTime< + TFunctionName extends 'L2_BLOCK_TIME', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'L2_BLOCK_TIME', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"PROPOSER"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleProposer< + TFunctionName extends 'PROPOSER', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'PROPOSER', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"SUBMISSION_INTERVAL"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleSubmissionInterval< + TFunctionName extends 'SUBMISSION_INTERVAL', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'SUBMISSION_INTERVAL', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"computeL2Timestamp"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleComputeL2Timestamp< + TFunctionName extends 'computeL2Timestamp', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'computeL2Timestamp', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"getL2Output"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleGetL2Output< + TFunctionName extends 'getL2Output', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'getL2Output', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"getL2OutputAfter"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleGetL2OutputAfter< + TFunctionName extends 'getL2OutputAfter', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'getL2OutputAfter', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"getL2OutputIndexAfter"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleGetL2OutputIndexAfter< + TFunctionName extends 'getL2OutputIndexAfter', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'getL2OutputIndexAfter', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"latestBlockNumber"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleLatestBlockNumber< + TFunctionName extends 'latestBlockNumber', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'latestBlockNumber', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"latestOutputIndex"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleLatestOutputIndex< + TFunctionName extends 'latestOutputIndex', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'latestOutputIndex', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"nextBlockNumber"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleNextBlockNumber< + TFunctionName extends 'nextBlockNumber', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'nextBlockNumber', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"nextOutputIndex"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleNextOutputIndex< + TFunctionName extends 'nextOutputIndex', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'nextOutputIndex', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"startingBlockNumber"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleStartingBlockNumber< + TFunctionName extends 'startingBlockNumber', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'startingBlockNumber', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"startingTimestamp"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleStartingTimestamp< + TFunctionName extends 'startingTimestamp', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'startingTimestamp', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"version"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'version', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l2OutputOracleAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l2OutputOracleABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"deleteL2Outputs"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleDeleteL2Outputs< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l2OutputOracleAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l2OutputOracleABI, + 'deleteL2Outputs' + >['request']['abi'], + 'deleteL2Outputs', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'deleteL2Outputs' + } + : UseContractWriteConfig< + typeof l2OutputOracleABI, + 'deleteL2Outputs', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'deleteL2Outputs' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'deleteL2Outputs', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"initialize"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleInitialize< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l2OutputOracleAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l2OutputOracleABI, + 'initialize' + >['request']['abi'], + 'initialize', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'initialize' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'initialize', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"proposeL2Output"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleProposeL2Output< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l2OutputOracleAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l2OutputOracleABI, + 'proposeL2Output' + >['request']['abi'], + 'proposeL2Output', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'proposeL2Output' + } + : UseContractWriteConfig< + typeof l2OutputOracleABI, + 'proposeL2Output', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'proposeL2Output' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'proposeL2Output', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function usePrepareL2OutputOracleWrite( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"deleteL2Outputs"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function usePrepareL2OutputOracleDeleteL2Outputs( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'deleteL2Outputs', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"initialize"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function usePrepareL2OutputOracleInitialize( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'initialize', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"proposeL2Output"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function usePrepareL2OutputOracleProposeL2Output( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + functionName: 'proposeL2Output', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2OutputOracleABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2OutputOracleABI}__ and `eventName` set to `"Initialized"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleInitializedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + eventName: 'Initialized', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2OutputOracleABI}__ and `eventName` set to `"OutputProposed"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleOutputProposedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + eventName: 'OutputProposed', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2OutputOracleABI}__ and `eventName` set to `"OutputsDeleted"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + */ +export function useL2OutputOracleOutputsDeletedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: l2OutputOracleABI, + address: + l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + eventName: 'OutputsDeleted', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function useOptimismMintableErc20FactoryRead< + TFunctionName extends string, + TSelectData = ReadContractResult< + typeof optimismMintableErc20FactoryABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof optimismMintableErc20FactoryABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"BRIDGE"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function useOptimismMintableErc20FactoryBridge< + TFunctionName extends 'BRIDGE', + TSelectData = ReadContractResult< + typeof optimismMintableErc20FactoryABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof optimismMintableErc20FactoryABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + functionName: 'BRIDGE', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"version"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function useOptimismMintableErc20FactoryVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult< + typeof optimismMintableErc20FactoryABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof optimismMintableErc20FactoryABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + functionName: 'version', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function useOptimismMintableErc20FactoryWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismMintableErc20FactoryAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismMintableErc20FactoryABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig< + typeof optimismMintableErc20FactoryABI, + TFunctionName, + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof optimismMintableErc20FactoryABI, + TFunctionName, + TMode + >({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"createOptimismMintableERC20"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function useOptimismMintableErc20FactoryCreateOptimismMintableErc20< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismMintableErc20FactoryAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismMintableErc20FactoryABI, + 'createOptimismMintableERC20' + >['request']['abi'], + 'createOptimismMintableERC20', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'createOptimismMintableERC20' + } + : UseContractWriteConfig< + typeof optimismMintableErc20FactoryABI, + 'createOptimismMintableERC20', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'createOptimismMintableERC20' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof optimismMintableErc20FactoryABI, + 'createOptimismMintableERC20', + TMode + >({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + functionName: 'createOptimismMintableERC20', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"createStandardL2Token"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function useOptimismMintableErc20FactoryCreateStandardL2Token< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismMintableErc20FactoryAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismMintableErc20FactoryABI, + 'createStandardL2Token' + >['request']['abi'], + 'createStandardL2Token', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'createStandardL2Token' + } + : UseContractWriteConfig< + typeof optimismMintableErc20FactoryABI, + 'createStandardL2Token', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'createStandardL2Token' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof optimismMintableErc20FactoryABI, + 'createStandardL2Token', + TMode + >({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + functionName: 'createStandardL2Token', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function usePrepareOptimismMintableErc20FactoryWrite< + TFunctionName extends string +>( + config: Omit< + UsePrepareContractWriteConfig< + typeof optimismMintableErc20FactoryABI, + TFunctionName + >, + 'abi' | 'address' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"createOptimismMintableERC20"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function usePrepareOptimismMintableErc20FactoryCreateOptimismMintableErc20( + config: Omit< + UsePrepareContractWriteConfig< + typeof optimismMintableErc20FactoryABI, + 'createOptimismMintableERC20' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + functionName: 'createOptimismMintableERC20', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"createStandardL2Token"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function usePrepareOptimismMintableErc20FactoryCreateStandardL2Token( + config: Omit< + UsePrepareContractWriteConfig< + typeof optimismMintableErc20FactoryABI, + 'createStandardL2Token' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + functionName: 'createStandardL2Token', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function useOptimismMintableErc20FactoryEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `eventName` set to `"OptimismMintableERC20Created"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function useOptimismMintableErc20FactoryOptimismMintableErc20CreatedEvent( + config: Omit< + UseContractEventConfig< + typeof optimismMintableErc20FactoryABI, + 'OptimismMintableERC20Created' + >, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + eventName: 'OptimismMintableERC20Created', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `eventName` set to `"StandardL2TokenCreated"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + */ +export function useOptimismMintableErc20FactoryStandardL2TokenCreatedEvent( + config: Omit< + UseContractEventConfig< + typeof optimismMintableErc20FactoryABI, + 'StandardL2TokenCreated' + >, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimismMintableErc20FactoryABI, + address: + optimismMintableErc20FactoryAddress[ + chainId as keyof typeof optimismMintableErc20FactoryAddress + ], + eventName: 'StandardL2TokenCreated', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"GUARDIAN"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalGuardian< + TFunctionName extends 'GUARDIAN', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'GUARDIAN', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"L2_ORACLE"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalL2Oracle< + TFunctionName extends 'L2_ORACLE', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'L2_ORACLE', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"SYSTEM_CONFIG"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalSystemConfig< + TFunctionName extends 'SYSTEM_CONFIG', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'SYSTEM_CONFIG', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"finalizedWithdrawals"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalFinalizedWithdrawals< + TFunctionName extends 'finalizedWithdrawals', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'finalizedWithdrawals', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"isOutputFinalized"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalIsOutputFinalized< + TFunctionName extends 'isOutputFinalized', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'isOutputFinalized', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"l2Sender"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalL2Sender< + TFunctionName extends 'l2Sender', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'l2Sender', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"minimumGasLimit"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalMinimumGasLimit< + TFunctionName extends 'minimumGasLimit', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'minimumGasLimit', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"params"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalParams< + TFunctionName extends 'params', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'params', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"paused"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalPaused< + TFunctionName extends 'paused', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'paused', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"provenWithdrawals"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalProvenWithdrawals< + TFunctionName extends 'provenWithdrawals', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'provenWithdrawals', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"version"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'version', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismPortalAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismPortalABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"depositTransaction"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalDepositTransaction< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismPortalAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismPortalABI, + 'depositTransaction' + >['request']['abi'], + 'depositTransaction', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'depositTransaction' + } + : UseContractWriteConfig< + typeof optimismPortalABI, + 'depositTransaction', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'depositTransaction' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof optimismPortalABI, + 'depositTransaction', + TMode + >({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'depositTransaction', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"donateETH"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalDonateEth< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismPortalAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismPortalABI, + 'donateETH' + >['request']['abi'], + 'donateETH', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'donateETH' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'donateETH' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'donateETH', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"finalizeWithdrawalTransaction"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalFinalizeWithdrawalTransaction< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismPortalAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismPortalABI, + 'finalizeWithdrawalTransaction' + >['request']['abi'], + 'finalizeWithdrawalTransaction', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'finalizeWithdrawalTransaction' + } + : UseContractWriteConfig< + typeof optimismPortalABI, + 'finalizeWithdrawalTransaction', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'finalizeWithdrawalTransaction' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof optimismPortalABI, + 'finalizeWithdrawalTransaction', + TMode + >({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'finalizeWithdrawalTransaction', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"initialize"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalInitialize< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismPortalAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismPortalABI, + 'initialize' + >['request']['abi'], + 'initialize', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'initialize' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'initialize', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"pause"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalPause< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismPortalAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismPortalABI, + 'pause' + >['request']['abi'], + 'pause', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'pause' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'pause' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'pause', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"proveWithdrawalTransaction"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalProveWithdrawalTransaction< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismPortalAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismPortalABI, + 'proveWithdrawalTransaction' + >['request']['abi'], + 'proveWithdrawalTransaction', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'proveWithdrawalTransaction' + } + : UseContractWriteConfig< + typeof optimismPortalABI, + 'proveWithdrawalTransaction', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'proveWithdrawalTransaction' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof optimismPortalABI, + 'proveWithdrawalTransaction', + TMode + >({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'proveWithdrawalTransaction', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"unpause"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalUnpause< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismPortalAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismPortalABI, + 'unpause' + >['request']['abi'], + 'unpause', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'unpause' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'unpause' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'unpause', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function usePrepareOptimismPortalWrite( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"depositTransaction"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function usePrepareOptimismPortalDepositTransaction( + config: Omit< + UsePrepareContractWriteConfig< + typeof optimismPortalABI, + 'depositTransaction' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'depositTransaction', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"donateETH"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function usePrepareOptimismPortalDonateEth( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'donateETH', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"finalizeWithdrawalTransaction"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function usePrepareOptimismPortalFinalizeWithdrawalTransaction( + config: Omit< + UsePrepareContractWriteConfig< + typeof optimismPortalABI, + 'finalizeWithdrawalTransaction' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'finalizeWithdrawalTransaction', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"initialize"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function usePrepareOptimismPortalInitialize( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'initialize', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"pause"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function usePrepareOptimismPortalPause( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'pause', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"proveWithdrawalTransaction"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function usePrepareOptimismPortalProveWithdrawalTransaction( + config: Omit< + UsePrepareContractWriteConfig< + typeof optimismPortalABI, + 'proveWithdrawalTransaction' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'proveWithdrawalTransaction', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"unpause"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function usePrepareOptimismPortalUnpause( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + functionName: 'unpause', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"Initialized"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalInitializedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + eventName: 'Initialized', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"Paused"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalPausedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + eventName: 'Paused', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"TransactionDeposited"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalTransactionDepositedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + eventName: 'TransactionDeposited', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"Unpaused"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalUnpausedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + eventName: 'Unpaused', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"WithdrawalFinalized"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalWithdrawalFinalizedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + eventName: 'WithdrawalFinalized', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"WithdrawalProven"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + */ +export function useOptimismPortalWithdrawalProvenEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimismPortalABI, + address: + optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + eventName: 'WithdrawalProven', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link portalSenderABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + */ +export function usePortalSenderRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof portalSenderAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: portalSenderABI, + address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link portalSenderABI}__ and `functionName` set to `"PORTAL"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + */ +export function usePortalSenderPortal< + TFunctionName extends 'PORTAL', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof portalSenderAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: portalSenderABI, + address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], + functionName: 'PORTAL', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link portalSenderABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + */ +export function usePortalSenderWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof portalSenderAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof portalSenderABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: portalSenderABI, + address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link portalSenderABI}__ and `functionName` set to `"donate"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + */ +export function usePortalSenderDonate< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof portalSenderAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof portalSenderABI, + 'donate' + >['request']['abi'], + 'donate', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'donate' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'donate' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: portalSenderABI, + address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], + functionName: 'donate', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link portalSenderABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + */ +export function usePreparePortalSenderWrite( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof portalSenderAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: portalSenderABI, + address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link portalSenderABI}__ and `functionName` set to `"donate"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + */ +export function usePreparePortalSenderDonate( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof portalSenderAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: portalSenderABI, + address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], + functionName: 'donate', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"addressManager"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminAddressManager< + TFunctionName extends 'addressManager', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'addressManager', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"getProxyAdmin"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminGetProxyAdmin< + TFunctionName extends 'getProxyAdmin', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'getProxyAdmin', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"getProxyImplementation"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminGetProxyImplementation< + TFunctionName extends 'getProxyImplementation', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'getProxyImplementation', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"implementationName"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminImplementationName< + TFunctionName extends 'implementationName', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'implementationName', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"isUpgrading"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminIsUpgrading< + TFunctionName extends 'isUpgrading', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'isUpgrading', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"owner"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'owner', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"proxyType"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminProxyType< + TFunctionName extends 'proxyType', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'proxyType', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"changeProxyAdmin"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminChangeProxyAdmin< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + 'changeProxyAdmin' + >['request']['abi'], + 'changeProxyAdmin', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'changeProxyAdmin' + } + : UseContractWriteConfig< + typeof proxyAdminABI, + 'changeProxyAdmin', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'changeProxyAdmin' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'changeProxyAdmin', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"renounceOwnership"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminRenounceOwnership< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + 'renounceOwnership' + >['request']['abi'], + 'renounceOwnership', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'renounceOwnership' + } + : UseContractWriteConfig< + typeof proxyAdminABI, + 'renounceOwnership', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'renounceOwnership' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'renounceOwnership', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setAddress"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminSetAddress< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + 'setAddress' + >['request']['abi'], + 'setAddress', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'setAddress' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setAddress' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'setAddress', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setAddressManager"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminSetAddressManager< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + 'setAddressManager' + >['request']['abi'], + 'setAddressManager', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setAddressManager' + } + : UseContractWriteConfig< + typeof proxyAdminABI, + 'setAddressManager', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setAddressManager' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'setAddressManager', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setImplementationName"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminSetImplementationName< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + 'setImplementationName' + >['request']['abi'], + 'setImplementationName', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setImplementationName' + } + : UseContractWriteConfig< + typeof proxyAdminABI, + 'setImplementationName', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setImplementationName' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite( + { + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'setImplementationName', + ...config, + } as any + ) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setProxyType"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminSetProxyType< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + 'setProxyType' + >['request']['abi'], + 'setProxyType', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setProxyType' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setProxyType' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'setProxyType', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setUpgrading"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminSetUpgrading< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + 'setUpgrading' + >['request']['abi'], + 'setUpgrading', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setUpgrading' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setUpgrading' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'setUpgrading', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"transferOwnership"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminTransferOwnership< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + 'transferOwnership' + >['request']['abi'], + 'transferOwnership', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'transferOwnership' + } + : UseContractWriteConfig< + typeof proxyAdminABI, + 'transferOwnership', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'transferOwnership' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'transferOwnership', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"upgrade"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminUpgrade< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + 'upgrade' + >['request']['abi'], + 'upgrade', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'upgrade' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'upgrade' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'upgrade', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"upgradeAndCall"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminUpgradeAndCall< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof proxyAdminAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof proxyAdminABI, + 'upgradeAndCall' + >['request']['abi'], + 'upgradeAndCall', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'upgradeAndCall' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'upgradeAndCall' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'upgradeAndCall', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminWrite( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"changeProxyAdmin"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminChangeProxyAdmin( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'changeProxyAdmin', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"renounceOwnership"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminRenounceOwnership( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'renounceOwnership', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setAddress"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminSetAddress( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'setAddress', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setAddressManager"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminSetAddressManager( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'setAddressManager', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setImplementationName"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminSetImplementationName( + config: Omit< + UsePrepareContractWriteConfig< + typeof proxyAdminABI, + 'setImplementationName' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'setImplementationName', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setProxyType"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminSetProxyType( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'setProxyType', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setUpgrading"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminSetUpgrading( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'setUpgrading', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"transferOwnership"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminTransferOwnership( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'transferOwnership', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"upgrade"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminUpgrade( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'upgrade', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"upgradeAndCall"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function usePrepareProxyAdminUpgradeAndCall( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + functionName: 'upgradeAndCall', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link proxyAdminABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link proxyAdminABI}__ and `eventName` set to `"OwnershipTransferred"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + */ +export function useProxyAdminOwnershipTransferredEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof proxyAdminAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: proxyAdminABI, + address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + eventName: 'OwnershipTransferred', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"UNSAFE_BLOCK_SIGNER_SLOT"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigUnsafeBlockSignerSlot< + TFunctionName extends 'UNSAFE_BLOCK_SIGNER_SLOT', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'UNSAFE_BLOCK_SIGNER_SLOT', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"batcherHash"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigBatcherHash< + TFunctionName extends 'batcherHash', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'batcherHash', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"gasLimit"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigGasLimit< + TFunctionName extends 'gasLimit', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'gasLimit', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"minimumGasLimit"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigMinimumGasLimit< + TFunctionName extends 'minimumGasLimit', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'minimumGasLimit', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"overhead"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigOverhead< + TFunctionName extends 'overhead', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'overhead', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"owner"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'owner', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"resourceConfig"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigResourceConfig< + TFunctionName extends 'resourceConfig', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'resourceConfig', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"scalar"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigScalar< + TFunctionName extends 'scalar', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'scalar', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"unsafeBlockSigner"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigUnsafeBlockSigner< + TFunctionName extends 'unsafeBlockSigner', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'unsafeBlockSigner', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"version"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'version', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemConfigAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemConfigABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"initialize"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigInitialize< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemConfigAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemConfigABI, + 'initialize' + >['request']['abi'], + 'initialize', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'initialize' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'initialize', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"renounceOwnership"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigRenounceOwnership< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemConfigAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemConfigABI, + 'renounceOwnership' + >['request']['abi'], + 'renounceOwnership', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'renounceOwnership' + } + : UseContractWriteConfig< + typeof systemConfigABI, + 'renounceOwnership', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'renounceOwnership' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'renounceOwnership', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setBatcherHash"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigSetBatcherHash< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemConfigAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemConfigABI, + 'setBatcherHash' + >['request']['abi'], + 'setBatcherHash', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setBatcherHash' + } + : UseContractWriteConfig< + typeof systemConfigABI, + 'setBatcherHash', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setBatcherHash' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'setBatcherHash', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setGasConfig"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigSetGasConfig< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemConfigAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemConfigABI, + 'setGasConfig' + >['request']['abi'], + 'setGasConfig', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setGasConfig' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setGasConfig' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'setGasConfig', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setGasLimit"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigSetGasLimit< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemConfigAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemConfigABI, + 'setGasLimit' + >['request']['abi'], + 'setGasLimit', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setGasLimit' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setGasLimit' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'setGasLimit', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setResourceConfig"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigSetResourceConfig< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemConfigAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemConfigABI, + 'setResourceConfig' + >['request']['abi'], + 'setResourceConfig', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setResourceConfig' + } + : UseContractWriteConfig< + typeof systemConfigABI, + 'setResourceConfig', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setResourceConfig' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'setResourceConfig', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setUnsafeBlockSigner"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function useSystemConfigSetUnsafeBlockSigner< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemConfigAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemConfigABI, + 'setUnsafeBlockSigner' + >['request']['abi'], + 'setUnsafeBlockSigner', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setUnsafeBlockSigner' + } + : UseContractWriteConfig< + typeof systemConfigABI, + 'setUnsafeBlockSigner', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setUnsafeBlockSigner' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof systemConfigABI, + 'setUnsafeBlockSigner', + TMode + >({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'setUnsafeBlockSigner', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"transferOwnership"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export const sequencerFeeVaultAddress = { - 420: '0x4200000000000000000000000000000000000011', -} as const +export function useSystemConfigTransferOwnership< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemConfigAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemConfigABI, + 'transferOwnership' + >['request']['abi'], + 'transferOwnership', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'transferOwnership' + } + : UseContractWriteConfig< + typeof systemConfigABI, + 'transferOwnership', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'transferOwnership' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'transferOwnership', + ...config, + } as any) +} /** - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000011) + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export const sequencerFeeVaultConfig = { - address: sequencerFeeVaultAddress, - abi: sequencerFeeVaultABI, -} as const - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// eslintIgnore -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +export function usePrepareSystemConfigWrite( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + ...config, + } as UsePrepareContractWriteConfig) +} -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// React -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"initialize"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function usePrepareSystemConfigInitialize( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'initialize', + ...config, + } as UsePrepareContractWriteConfig) +} /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link addressManagerABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"renounceOwnership"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export function useAddressManagerRead< - TFunctionName extends string, - TSelectData = ReadContractResult ->( +export function usePrepareSystemConfigRenounceOwnership( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof addressManagerAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], + return usePrepareContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'renounceOwnership', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"getAddress"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setBatcherHash"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export function useAddressManagerGetAddress< - TFunctionName extends 'getAddress', - TSelectData = ReadContractResult ->( +export function usePrepareSystemConfigSetBatcherHash( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof addressManagerAddress } = {} as any + > & { chainId?: keyof typeof systemConfigAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], - functionName: 'getAddress', + return usePrepareContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'setBatcherHash', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"owner"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setGasConfig"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export function useAddressManagerOwner< - TFunctionName extends 'owner', - TSelectData = ReadContractResult ->( +export function usePrepareSystemConfigSetGasConfig( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof addressManagerAddress } = {} as any + > & { chainId?: keyof typeof systemConfigAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], - functionName: 'owner', + return usePrepareContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'setGasConfig', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link addressManagerABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setGasLimit"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export function useAddressManagerWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof addressManagerAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof addressManagerABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any +export function usePrepareSystemConfigSetGasLimit( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'setGasLimit', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setResourceConfig"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + */ +export function usePrepareSystemConfigSetResourceConfig( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], + return usePrepareContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'setResourceConfig', ...config, - } as any) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"renounceOwnership"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setUnsafeBlockSigner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export function useAddressManagerRenounceOwnership< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof addressManagerAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof addressManagerABI, - 'renounceOwnership' - >['request']['abi'], - 'renounceOwnership', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'renounceOwnership' - } - : UseContractWriteConfig< - typeof addressManagerABI, - 'renounceOwnership', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'renounceOwnership' - } = {} as any +export function usePrepareSystemConfigSetUnsafeBlockSigner( + config: Omit< + UsePrepareContractWriteConfig< + typeof systemConfigABI, + 'setUnsafeBlockSigner' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite( - { - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], - functionName: 'renounceOwnership', - ...config, - } as any - ) + return usePrepareContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'setUnsafeBlockSigner', + ...config, + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"setAddress"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"transferOwnership"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export function useAddressManagerSetAddress< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof addressManagerAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof addressManagerABI, - 'setAddress' - >['request']['abi'], - 'setAddress', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'setAddress' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'setAddress' - } = {} as any +export function usePrepareSystemConfigTransferOwnership( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], - functionName: 'setAddress', + return usePrepareContractWrite({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + functionName: 'transferOwnership', ...config, - } as any) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemConfigABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export function useAddressManagerTransferOwnership< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof addressManagerAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof addressManagerABI, - 'transferOwnership' - >['request']['abi'], - 'transferOwnership', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'transferOwnership' - } - : UseContractWriteConfig< - typeof addressManagerABI, - 'transferOwnership', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'transferOwnership' - } = {} as any +export function useSystemConfigEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite( - { - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], - functionName: 'transferOwnership', - ...config, - } as any - ) + return useContractEvent({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + ...config, + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link addressManagerABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemConfigABI}__ and `eventName` set to `"ConfigUpdate"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export function usePrepareAddressManagerWrite( +export function useSystemConfigConfigUpdateEvent( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof addressManagerAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], + return useContractEvent({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + eventName: 'ConfigUpdate', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"renounceOwnership"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemConfigABI}__ and `eventName` set to `"Initialized"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export function usePrepareAddressManagerRenounceOwnership( +export function useSystemConfigInitializedEvent( config: Omit< - UsePrepareContractWriteConfig< - typeof addressManagerABI, - 'renounceOwnership' - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof addressManagerAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], - functionName: 'renounceOwnership', + return useContractEvent({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + eventName: 'Initialized', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"setAddress"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemConfigABI}__ and `eventName` set to `"OwnershipTransferred"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) */ -export function usePrepareAddressManagerSetAddress( +export function useSystemConfigOwnershipTransferredEvent( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof addressManagerAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof systemConfigAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], - functionName: 'setAddress', + return useContractEvent({ + abi: systemConfigABI, + address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + eventName: 'OwnershipTransferred', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link addressManagerABI}__ and `functionName` set to `"transferOwnership"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function usePrepareAddressManagerTransferOwnership( +export function useSystemDictatorRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig< - typeof addressManagerABI, - 'transferOwnership' - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof addressManagerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], - functionName: 'transferOwnership', + return useContractRead({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link addressManagerABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"EXIT_1_NO_RETURN_STEP"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useAddressManagerEvent( +export function useSystemDictatorExit_1NoReturnStep< + TFunctionName extends 'EXIT_1_NO_RETURN_STEP', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof addressManagerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], + return useContractRead({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'EXIT_1_NO_RETURN_STEP', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link addressManagerABI}__ and `eventName` set to `"AddressSet"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"PROXY_TRANSFER_STEP"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useAddressManagerAddressSetEvent( +export function useSystemDictatorProxyTransferStep< + TFunctionName extends 'PROXY_TRANSFER_STEP', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof addressManagerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], - eventName: 'AddressSet', + return useContractRead({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'PROXY_TRANSFER_STEP', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link addressManagerABI}__ and `eventName` set to `"OwnershipTransferred"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"config"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdE1FCfB0851916CA5101820A69b13a4E276bd81F) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xa6f73589243a6A7a9023b1Fa0651b1d89c177111) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useAddressManagerOwnershipTransferredEvent( +export function useSystemDictatorConfig< + TFunctionName extends 'config', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof addressManagerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: addressManagerABI, - address: - addressManagerAddress[chainId as keyof typeof addressManagerAddress], - eventName: 'OwnershipTransferred', + return useContractRead({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'config', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"currentStep"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerRead< - TFunctionName extends string, - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorCurrentStep< + TFunctionName extends 'currentStep', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'currentStep', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"MESSAGE_VERSION"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"dynamicConfigSet"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerMessageVersion< - TFunctionName extends 'MESSAGE_VERSION', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorDynamicConfigSet< + TFunctionName extends 'dynamicConfigSet', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'MESSAGE_VERSION', + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'dynamicConfigSet', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_CALLDATA_OVERHEAD"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"exited"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerMinGasCalldataOverhead< - TFunctionName extends 'MIN_GAS_CALLDATA_OVERHEAD', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorExited< + TFunctionName extends 'exited', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'MIN_GAS_CALLDATA_OVERHEAD', + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'exited', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"finalized"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerMinGasDynamicOverheadDenominator< - TFunctionName extends 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorFinalized< + TFunctionName extends 'finalized', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'finalized', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"l2OutputOracleDynamicConfig"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerMinGasDynamicOverheadNumerator< - TFunctionName extends 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorL2OutputOracleDynamicConfig< + TFunctionName extends 'l2OutputOracleDynamicConfig', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'l2OutputOracleDynamicConfig', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"OTHER_MESSENGER"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"oldL1CrossDomainMessenger"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerOtherMessenger< - TFunctionName extends 'OTHER_MESSENGER', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorOldL1CrossDomainMessenger< + TFunctionName extends 'oldL1CrossDomainMessenger', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'OTHER_MESSENGER', + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'oldL1CrossDomainMessenger', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"PORTAL"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"optimismPortalDynamicConfig"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerPortal< - TFunctionName extends 'PORTAL', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorOptimismPortalDynamicConfig< + TFunctionName extends 'optimismPortalDynamicConfig', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'PORTAL', + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'optimismPortalDynamicConfig', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_CALL_OVERHEAD"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"owner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerRelayCallOverhead< - TFunctionName extends 'RELAY_CALL_OVERHEAD', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'RELAY_CALL_OVERHEAD', + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'owner', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_CONSTANT_OVERHEAD"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerRelayConstantOverhead< - TFunctionName extends 'RELAY_CONSTANT_OVERHEAD', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemDictatorAddress >( - config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemDictatorABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'RELAY_CONSTANT_OVERHEAD', + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_GAS_CHECK_BUFFER"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"exit1"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerRelayGasCheckBuffer< - TFunctionName extends 'RELAY_GAS_CHECK_BUFFER', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorExit1< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemDictatorAddress >( - config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemDictatorABI, + 'exit1' + >['request']['abi'], + 'exit1', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'exit1' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'exit1' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'RELAY_GAS_CHECK_BUFFER', + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'exit1', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_RESERVED_GAS"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"finalize"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerRelayReservedGas< - TFunctionName extends 'RELAY_RESERVED_GAS', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorFinalize< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemDictatorAddress >( - config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemDictatorABI, + 'finalize' + >['request']['abi'], + 'finalize', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'finalize' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'finalize' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'RELAY_RESERVED_GAS', + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'finalize', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"baseGas"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"initialize"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerBaseGas< - TFunctionName extends 'baseGas', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorInitialize< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemDictatorAddress >( - config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemDictatorABI, + 'initialize' + >['request']['abi'], + 'initialize', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'initialize' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'baseGas', + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'initialize', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"failedMessages"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"phase1"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerFailedMessages< - TFunctionName extends 'failedMessages', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorPhase1< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemDictatorAddress >( - config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemDictatorABI, + 'phase1' + >['request']['abi'], + 'phase1', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'phase1' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'phase1' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'failedMessages', + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'phase1', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"messageNonce"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"phase2"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerMessageNonce< - TFunctionName extends 'messageNonce', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorPhase2< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemDictatorAddress >( - config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemDictatorABI, + 'phase2' + >['request']['abi'], + 'phase2', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'phase2' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'phase2' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'messageNonce', + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'phase2', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"successfulMessages"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"renounceOwnership"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerSuccessfulMessages< - TFunctionName extends 'successfulMessages', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorRenounceOwnership< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemDictatorAddress >( - config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemDictatorABI, + 'renounceOwnership' + >['request']['abi'], + 'renounceOwnership', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'renounceOwnership' + } + : UseContractWriteConfig< + typeof systemDictatorABI, + 'renounceOwnership', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'renounceOwnership' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'successfulMessages', - ...config, - } as UseContractReadConfig) + return useContractWrite( + { + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'renounceOwnership', + ...config, + } as any + ) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step1"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorStep1< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemDictatorAddress >( - config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemDictatorABI, + 'step1' + >['request']['abi'], + 'step1', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'step1' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'step1' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'version', + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'step1', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"xDomainMessageSender"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step2"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerXDomainMessageSender< - TFunctionName extends 'xDomainMessageSender', - TSelectData = ReadContractResult< - typeof l1CrossDomainMessengerABI, - TFunctionName - > +export function useSystemDictatorStep2< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemDictatorAddress >( - config: Omit< - UseContractReadConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemDictatorABI, + 'step2' + >['request']['abi'], + 'step2', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'step2' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'step2' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'xDomainMessageSender', + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'step2', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step3"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerWrite< - TFunctionName extends string, +export function useSystemDictatorStep3< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1CrossDomainMessengerAddress + TChainId extends number = keyof typeof systemDictatorAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1CrossDomainMessengerABI, - string + typeof systemDictatorABI, + 'step3' >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName, + 'step3', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'step3' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId + functionName?: 'step3' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof l1CrossDomainMessengerABI, - TFunctionName, - TMode - >({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'step3', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"initialize"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step4"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerInitialize< +export function useSystemDictatorStep4< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1CrossDomainMessengerAddress + TChainId extends number = keyof typeof systemDictatorAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1CrossDomainMessengerABI, - 'initialize' + typeof systemDictatorABI, + 'step4' >['request']['abi'], - 'initialize', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } - : UseContractWriteConfig< - typeof l1CrossDomainMessengerABI, - 'initialize', + 'step4', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'step4' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'initialize' + functionName?: 'step4' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof l1CrossDomainMessengerABI, - 'initialize', - TMode - >({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'initialize', + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'step4', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"relayMessage"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step5"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerRelayMessage< +export function useSystemDictatorStep5< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1CrossDomainMessengerAddress + TChainId extends number = keyof typeof systemDictatorAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1CrossDomainMessengerABI, - 'relayMessage' + typeof systemDictatorABI, + 'step5' >['request']['abi'], - 'relayMessage', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'relayMessage' - } - : UseContractWriteConfig< - typeof l1CrossDomainMessengerABI, - 'relayMessage', + 'step5', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'step5' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'relayMessage' + functionName?: 'step5' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof l1CrossDomainMessengerABI, - 'relayMessage', - TMode - >({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'relayMessage', + return useContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'step5', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"sendMessage"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"transferOwnership"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + */ +export function useSystemDictatorTransferOwnership< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof systemDictatorAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof systemDictatorABI, + 'transferOwnership' + >['request']['abi'], + 'transferOwnership', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'transferOwnership' + } + : UseContractWriteConfig< + typeof systemDictatorABI, + 'transferOwnership', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'transferOwnership' + } = {} as any +) { + return useContractWrite( + { + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'transferOwnership', + ...config, + } as any + ) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"updateDynamicConfig"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerSendMessage< +export function useSystemDictatorUpdateDynamicConfig< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1CrossDomainMessengerAddress + TChainId extends number = keyof typeof systemDictatorAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1CrossDomainMessengerABI, - 'sendMessage' + typeof systemDictatorABI, + 'updateDynamicConfig' >['request']['abi'], - 'sendMessage', + 'updateDynamicConfig', TMode > & { address?: Address chainId?: TChainId - functionName?: 'sendMessage' + functionName?: 'updateDynamicConfig' } : UseContractWriteConfig< - typeof l1CrossDomainMessengerABI, - 'sendMessage', + typeof systemDictatorABI, + 'updateDynamicConfig', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'sendMessage' + functionName?: 'updateDynamicConfig' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractWrite< - typeof l1CrossDomainMessengerABI, - 'sendMessage', + typeof systemDictatorABI, + 'updateDynamicConfig', TMode >({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'sendMessage', + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'updateDynamicConfig', ...config, } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function usePrepareL1CrossDomainMessengerWrite< - TFunctionName extends string ->( +export function usePrepareSystemDictatorWrite( config: Omit< - UsePrepareContractWriteConfig< - typeof l1CrossDomainMessengerABI, - TFunctionName - >, + UsePrepareContractWriteConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"initialize"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) - */ -export function usePrepareL1CrossDomainMessengerInitialize( - config: Omit< - UsePrepareContractWriteConfig< - typeof l1CrossDomainMessengerABI, - 'initialize' - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'initialize', + abi: systemDictatorABI, + address: systemDictatorAddress[1], ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"relayMessage"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"exit1"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function usePrepareL1CrossDomainMessengerRelayMessage( +export function usePrepareSystemDictatorExit1( config: Omit< - UsePrepareContractWriteConfig< - typeof l1CrossDomainMessengerABI, - 'relayMessage' - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'relayMessage', + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'exit1', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `functionName` set to `"sendMessage"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"finalize"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function usePrepareL1CrossDomainMessengerSendMessage( +export function usePrepareSystemDictatorFinalize( config: Omit< - UsePrepareContractWriteConfig< - typeof l1CrossDomainMessengerABI, - 'sendMessage' - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - functionName: 'sendMessage', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) - */ -export function useL1CrossDomainMessengerEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - ...config, - } as UseContractEventConfig) -} - -/** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `eventName` set to `"FailedRelayedMessage"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) - */ -export function useL1CrossDomainMessengerFailedRelayedMessageEvent( - config: Omit< - UseContractEventConfig< - typeof l1CrossDomainMessengerABI, - 'FailedRelayedMessage' - >, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - eventName: 'FailedRelayedMessage', - ...config, - } as UseContractEventConfig) -} - -/** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `eventName` set to `"Initialized"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) - */ -export function useL1CrossDomainMessengerInitializedEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - eventName: 'Initialized', + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'finalize', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `eventName` set to `"RelayedMessage"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"initialize"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerRelayedMessageEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any +export function usePrepareSystemDictatorInitialize( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - eventName: 'RelayedMessage', + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'initialize', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `eventName` set to `"SentMessage"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"phase1"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerSentMessageEvent( +export function usePrepareSystemDictatorPhase1( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - eventName: 'SentMessage', + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'phase1', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1CrossDomainMessengerABI}__ and `eventName` set to `"SentMessageExtension1"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"phase2"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5086d1eEF304eb5284A0f6720f79403b4e9bE294) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1CrossDomainMessengerSentMessageExtension1Event( +export function usePrepareSystemDictatorPhase2( config: Omit< - UseContractEventConfig< - typeof l1CrossDomainMessengerABI, - 'SentMessageExtension1' - >, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1CrossDomainMessengerAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1CrossDomainMessengerABI, - address: - l1CrossDomainMessengerAddress[ - chainId as keyof typeof l1CrossDomainMessengerAddress - ], - eventName: 'SentMessageExtension1', + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'phase2', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"renounceOwnership"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1Erc721BridgeRead< - TFunctionName extends string, - TSelectData = ReadContractResult ->( +export function usePrepareSystemDictatorRenounceOwnership( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + UsePrepareContractWriteConfig< + typeof systemDictatorABI, + 'renounceOwnership' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'renounceOwnership', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"deposits"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step1"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1Erc721BridgeDeposits< - TFunctionName extends 'deposits', - TSelectData = ReadContractResult ->( +export function usePrepareSystemDictatorStep1( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - functionName: 'deposits', + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'step1', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"messenger"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step2"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1Erc721BridgeMessenger< - TFunctionName extends 'messenger', - TSelectData = ReadContractResult ->( +export function usePrepareSystemDictatorStep2( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - functionName: 'messenger', + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'step2', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"otherBridge"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step3"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1Erc721BridgeOtherBridge< - TFunctionName extends 'otherBridge', - TSelectData = ReadContractResult ->( +export function usePrepareSystemDictatorStep3( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - functionName: 'otherBridge', + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'step3', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"version"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step4"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1Erc721BridgeVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult ->( +export function usePrepareSystemDictatorStep4( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - functionName: 'version', + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'step4', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step5"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1Erc721BridgeWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1Erc721BridgeAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l1Erc721BridgeABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any +export function usePrepareSystemDictatorStep5( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'step5', ...config, - } as any) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"transferOwnership"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1Erc721BridgeBridgeErc721< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1Erc721BridgeAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l1Erc721BridgeABI, - 'bridgeERC721' - >['request']['abi'], - 'bridgeERC721', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'bridgeERC721' - } - : UseContractWriteConfig< - typeof l1Erc721BridgeABI, - 'bridgeERC721', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'bridgeERC721' - } = {} as any +export function usePrepareSystemDictatorTransferOwnership( + config: Omit< + UsePrepareContractWriteConfig< + typeof systemDictatorABI, + 'transferOwnership' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - functionName: 'bridgeERC721', + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'transferOwnership', ...config, - } as any) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721To"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"updateDynamicConfig"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1Erc721BridgeBridgeErc721To< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1Erc721BridgeAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l1Erc721BridgeABI, - 'bridgeERC721To' - >['request']['abi'], - 'bridgeERC721To', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'bridgeERC721To' - } - : UseContractWriteConfig< - typeof l1Erc721BridgeABI, - 'bridgeERC721To', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'bridgeERC721To' - } = {} as any +export function usePrepareSystemDictatorUpdateDynamicConfig( + config: Omit< + UsePrepareContractWriteConfig< + typeof systemDictatorABI, + 'updateDynamicConfig' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - functionName: 'bridgeERC721To', + return usePrepareContractWrite({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + functionName: 'updateDynamicConfig', ...config, - } as any) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"finalizeBridgeERC721"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function useL1Erc721BridgeFinalizeBridgeErc721< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1Erc721BridgeAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l1Erc721BridgeABI, - 'finalizeBridgeERC721' - >['request']['abi'], - 'finalizeBridgeERC721', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'finalizeBridgeERC721' - } - : UseContractWriteConfig< - typeof l1Erc721BridgeABI, - 'finalizeBridgeERC721', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'finalizeBridgeERC721' - } = {} as any +export function useSystemDictatorEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof l1Erc721BridgeABI, - 'finalizeBridgeERC721', - TMode - >({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - functionName: 'finalizeBridgeERC721', + return useContractEvent({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorABI}__ and `eventName` set to `"Initialized"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function usePrepareL1Erc721BridgeWrite( +export function useSystemDictatorInitializedEvent( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + return useContractEvent({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + eventName: 'Initialized', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorABI}__ and `eventName` set to `"OwnershipTransferred"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) */ -export function usePrepareL1Erc721BridgeBridgeErc721( +export function useSystemDictatorOwnershipTransferredEvent( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof systemDictatorAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - functionName: 'bridgeERC721', + return useContractEvent({ + abi: systemDictatorABI, + address: systemDictatorAddress[1], + eventName: 'OwnershipTransferred', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721To"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1Erc721BridgeBridgeErc721To( +export function useSystemDictatorGoerliRead< + TFunctionName extends string, + TSelectData = ReadContractResult< + typeof systemDictatorGoerliABI, + TFunctionName + > +>( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + UseContractReadConfig< + typeof systemDictatorGoerliABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - functionName: 'bridgeERC721To', + return useContractRead({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `functionName` set to `"finalizeBridgeERC721"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"EXIT_1_NO_RETURN_STEP"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1Erc721BridgeFinalizeBridgeErc721( +export function useSystemDictatorGoerliExit_1NoReturnStep< + TFunctionName extends 'EXIT_1_NO_RETURN_STEP', + TSelectData = ReadContractResult< + typeof systemDictatorGoerliABI, + TFunctionName + > +>( config: Omit< - UsePrepareContractWriteConfig< - typeof l1Erc721BridgeABI, - 'finalizeBridgeERC721' + UseContractReadConfig< + typeof systemDictatorGoerliABI, + TFunctionName, + TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - functionName: 'finalizeBridgeERC721', + return useContractRead({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'EXIT_1_NO_RETURN_STEP', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1Erc721BridgeABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"PROXY_TRANSFER_STEP"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1Erc721BridgeEvent( +export function useSystemDictatorGoerliProxyTransferStep< + TFunctionName extends 'PROXY_TRANSFER_STEP', + TSelectData = ReadContractResult< + typeof systemDictatorGoerliABI, + TFunctionName + > +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + UseContractReadConfig< + typeof systemDictatorGoerliABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], + return useContractRead({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'PROXY_TRANSFER_STEP', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `eventName` set to `"ERC721BridgeFinalized"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"config"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1Erc721BridgeErc721BridgeFinalizedEvent( +export function useSystemDictatorGoerliConfig< + TFunctionName extends 'config', + TSelectData = ReadContractResult< + typeof systemDictatorGoerliABI, + TFunctionName + > +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + UseContractReadConfig< + typeof systemDictatorGoerliABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - eventName: 'ERC721BridgeFinalized', + return useContractRead({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'config', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1Erc721BridgeABI}__ and `eventName` set to `"ERC721BridgeInitiated"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"currentStep"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5a7749f83b81B301cAb5f48EB8516B986DAef23D) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x8DD330DdE8D9898d43b4dc840Da27A07dF91b3c9) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1Erc721BridgeErc721BridgeInitiatedEvent( +export function useSystemDictatorGoerliCurrentStep< + TFunctionName extends 'currentStep', + TSelectData = ReadContractResult< + typeof systemDictatorGoerliABI, + TFunctionName + > +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1Erc721BridgeAddress } = {} as any + UseContractReadConfig< + typeof systemDictatorGoerliABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1Erc721BridgeABI, - address: - l1Erc721BridgeAddress[chainId as keyof typeof l1Erc721BridgeAddress], - eventName: 'ERC721BridgeInitiated', + return useContractRead({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'currentStep', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"dynamicConfigSet"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeRead< - TFunctionName extends string, - TSelectData = ReadContractResult +export function useSystemDictatorGoerliDynamicConfigSet< + TFunctionName extends 'dynamicConfigSet', + TSelectData = ReadContractResult< + typeof systemDictatorGoerliABI, + TFunctionName + > >( config: Omit< UseContractReadConfig< - typeof l1StandardBridgeABI, + typeof systemDictatorGoerliABI, TFunctionName, TSelectData >, - 'abi' | 'address' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'dynamicConfigSet', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"deposits"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"finalized"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeDeposits< - TFunctionName extends 'deposits', - TSelectData = ReadContractResult +export function useSystemDictatorGoerliFinalized< + TFunctionName extends 'finalized', + TSelectData = ReadContractResult< + typeof systemDictatorGoerliABI, + TFunctionName + > >( config: Omit< UseContractReadConfig< - typeof l1StandardBridgeABI, + typeof systemDictatorGoerliABI, TFunctionName, TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'deposits', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'finalized', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"l2TokenBridge"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"l2OutputOracleDynamicConfig"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeL2TokenBridge< - TFunctionName extends 'l2TokenBridge', - TSelectData = ReadContractResult +export function useSystemDictatorGoerliL2OutputOracleDynamicConfig< + TFunctionName extends 'l2OutputOracleDynamicConfig', + TSelectData = ReadContractResult< + typeof systemDictatorGoerliABI, + TFunctionName + > >( config: Omit< UseContractReadConfig< - typeof l1StandardBridgeABI, + typeof systemDictatorGoerliABI, TFunctionName, TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'l2TokenBridge', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'l2OutputOracleDynamicConfig', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"messenger"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"oldL1CrossDomainMessenger"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeMessenger< - TFunctionName extends 'messenger', - TSelectData = ReadContractResult +export function useSystemDictatorGoerliOldL1CrossDomainMessenger< + TFunctionName extends 'oldL1CrossDomainMessenger', + TSelectData = ReadContractResult< + typeof systemDictatorGoerliABI, + TFunctionName + > >( config: Omit< UseContractReadConfig< - typeof l1StandardBridgeABI, + typeof systemDictatorGoerliABI, TFunctionName, TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'messenger', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'oldL1CrossDomainMessenger', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"owner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult +export function useSystemDictatorGoerliOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult< + typeof systemDictatorGoerliABI, + TFunctionName + > >( config: Omit< UseContractReadConfig< - typeof l1StandardBridgeABI, + typeof systemDictatorGoerliABI, TFunctionName, TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'version', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'owner', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeWrite< +export function useSystemDictatorGoerliWrite< TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, + typeof systemDictatorGoerliABI, string >['request']['abi'], TFunctionName, TMode > & { address?: Address; chainId?: TChainId } : UseContractWriteConfig< - typeof l1StandardBridgeABI, + typeof systemDictatorGoerliABI, TFunctionName, TMode > & { @@ -7235,10997 +16699,10966 @@ export function useL1StandardBridgeWrite< chainId?: TChainId } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - ...config, - } as any) + return useContractWrite( + { + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + ...config, + } as any + ) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeERC20"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"exit1"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeBridgeErc20< +export function useSystemDictatorGoerliExit1< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'bridgeERC20' + typeof systemDictatorGoerliABI, + 'exit1' >['request']['abi'], - 'bridgeERC20', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'bridgeERC20' - } - : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'bridgeERC20', + 'exit1', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'exit1' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'bridgeERC20' + functionName?: 'exit1' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'bridgeERC20', + return useContractWrite({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'exit1', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeERC20To"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"finalize"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeBridgeErc20To< +export function useSystemDictatorGoerliFinalize< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'bridgeERC20To' + typeof systemDictatorGoerliABI, + 'finalize' >['request']['abi'], - 'bridgeERC20To', + 'finalize', TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'bridgeERC20To' - } + > & { address?: Address; chainId?: TChainId; functionName?: 'finalize' } : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'bridgeERC20To', + typeof systemDictatorGoerliABI, + 'finalize', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'bridgeERC20To' + functionName?: 'finalize' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'bridgeERC20To', + return useContractWrite({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'finalize', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeETH"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"initialize"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeBridgeEth< +export function useSystemDictatorGoerliInitialize< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'bridgeETH' + typeof systemDictatorGoerliABI, + 'initialize' >['request']['abi'], - 'bridgeETH', + 'initialize', TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'bridgeETH' } - : UseContractWriteConfig & { + > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } + : UseContractWriteConfig< + typeof systemDictatorGoerliABI, + 'initialize', + TMode + > & { abi?: never address?: never chainId?: TChainId - functionName?: 'bridgeETH' + functionName?: 'initialize' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'bridgeETH', + return useContractWrite({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'initialize', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeETHTo"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"renounceOwnership"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeBridgeEthTo< +export function useSystemDictatorGoerliRenounceOwnership< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'bridgeETHTo' + typeof systemDictatorGoerliABI, + 'renounceOwnership' >['request']['abi'], - 'bridgeETHTo', + 'renounceOwnership', TMode > & { address?: Address chainId?: TChainId - functionName?: 'bridgeETHTo' + functionName?: 'renounceOwnership' } : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'bridgeETHTo', + typeof systemDictatorGoerliABI, + 'renounceOwnership', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'bridgeETHTo' + functionName?: 'renounceOwnership' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'bridgeETHTo', + return useContractWrite< + typeof systemDictatorGoerliABI, + 'renounceOwnership', + TMode + >({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'renounceOwnership', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositERC20"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step1"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeDepositErc20< +export function useSystemDictatorGoerliStep1< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'depositERC20' + typeof systemDictatorGoerliABI, + 'step1' >['request']['abi'], - 'depositERC20', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'depositERC20' - } - : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'depositERC20', + 'step1', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'step1' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'depositERC20' + functionName?: 'step1' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'depositERC20', + return useContractWrite({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step1', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositERC20To"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step2"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeDepositErc20To< +export function useSystemDictatorGoerliStep2< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'depositERC20To' + typeof systemDictatorGoerliABI, + 'step2' >['request']['abi'], - 'depositERC20To', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'depositERC20To' - } - : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'depositERC20To', + 'step2', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'step2' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'depositERC20To' + functionName?: 'step2' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'depositERC20To', + return useContractWrite({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step2', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositETH"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step3"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeDepositEth< +export function useSystemDictatorGoerliStep3< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'depositETH' + typeof systemDictatorGoerliABI, + 'step3' >['request']['abi'], - 'depositETH', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'depositETH' } - : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'depositETH', + 'step3', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'step3' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'depositETH' + functionName?: 'step3' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'depositETH', + return useContractWrite({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step3', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositETHTo"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step4"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeDepositEthTo< +export function useSystemDictatorGoerliStep4< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'depositETHTo' + typeof systemDictatorGoerliABI, + 'step4' >['request']['abi'], - 'depositETHTo', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'depositETHTo' - } - : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'depositETHTo', + 'step4', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'step4' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'depositETHTo' + functionName?: 'step4' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'depositETHTo', + return useContractWrite({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step4', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeBridgeERC20"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step5"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeFinalizeBridgeErc20< +export function useSystemDictatorGoerliStep5< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'finalizeBridgeERC20' + typeof systemDictatorGoerliABI, + 'step5' >['request']['abi'], - 'finalizeBridgeERC20', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'finalizeBridgeERC20' - } - : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'finalizeBridgeERC20', + 'step5', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'step5' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'finalizeBridgeERC20' + functionName?: 'step5' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof l1StandardBridgeABI, - 'finalizeBridgeERC20', - TMode - >({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'finalizeBridgeERC20', + return useContractWrite({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step5', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeBridgeETH"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step6"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeFinalizeBridgeEth< +export function useSystemDictatorGoerliStep6< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'finalizeBridgeETH' + typeof systemDictatorGoerliABI, + 'step6' >['request']['abi'], - 'finalizeBridgeETH', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'finalizeBridgeETH' - } - : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'finalizeBridgeETH', + 'step6', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'step6' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'finalizeBridgeETH' + functionName?: 'step6' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof l1StandardBridgeABI, - 'finalizeBridgeETH', - TMode - >({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'finalizeBridgeETH', + return useContractWrite({ + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step6', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeERC20Withdrawal"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"transferOwnership"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeFinalizeErc20Withdrawal< +export function useSystemDictatorGoerliTransferOwnership< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'finalizeERC20Withdrawal' + typeof systemDictatorGoerliABI, + 'transferOwnership' >['request']['abi'], - 'finalizeERC20Withdrawal', + 'transferOwnership', TMode > & { address?: Address chainId?: TChainId - functionName?: 'finalizeERC20Withdrawal' + functionName?: 'transferOwnership' } : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'finalizeERC20Withdrawal', + typeof systemDictatorGoerliABI, + 'transferOwnership', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'finalizeERC20Withdrawal' + functionName?: 'transferOwnership' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractWrite< - typeof l1StandardBridgeABI, - 'finalizeERC20Withdrawal', + typeof systemDictatorGoerliABI, + 'transferOwnership', TMode >({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'finalizeERC20Withdrawal', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'transferOwnership', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeETHWithdrawal"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"updateL2OutputOracleDynamicConfig"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeFinalizeEthWithdrawal< +export function useSystemDictatorGoerliUpdateL2OutputOracleDynamicConfig< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1StandardBridgeAddress + TChainId extends number = keyof typeof systemDictatorGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1StandardBridgeABI, - 'finalizeETHWithdrawal' + typeof systemDictatorGoerliABI, + 'updateL2OutputOracleDynamicConfig' >['request']['abi'], - 'finalizeETHWithdrawal', + 'updateL2OutputOracleDynamicConfig', TMode > & { address?: Address chainId?: TChainId - functionName?: 'finalizeETHWithdrawal' + functionName?: 'updateL2OutputOracleDynamicConfig' } : UseContractWriteConfig< - typeof l1StandardBridgeABI, - 'finalizeETHWithdrawal', + typeof systemDictatorGoerliABI, + 'updateL2OutputOracleDynamicConfig', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'finalizeETHWithdrawal' + functionName?: 'updateL2OutputOracleDynamicConfig' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof l1StandardBridgeABI, - 'finalizeETHWithdrawal', + return useContractWrite< + typeof systemDictatorGoerliABI, + 'updateL2OutputOracleDynamicConfig', TMode >({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'finalizeETHWithdrawal', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'updateL2OutputOracleDynamicConfig', ...config, } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeWrite( +export function usePrepareSystemDictatorGoerliWrite< + TFunctionName extends string +>( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig< + typeof systemDictatorGoerliABI, + TFunctionName + >, 'abi' | 'address' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeERC20"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"exit1"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeBridgeErc20( +export function usePrepareSystemDictatorGoerliExit1( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'bridgeERC20', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'exit1', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeERC20To"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"finalize"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeBridgeErc20To( +export function usePrepareSystemDictatorGoerliFinalize( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'bridgeERC20To', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'finalize', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeETH"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"initialize"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeBridgeEth( +export function usePrepareSystemDictatorGoerliInitialize( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'bridgeETH', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'initialize', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"bridgeETHTo"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"renounceOwnership"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeBridgeEthTo( +export function usePrepareSystemDictatorGoerliRenounceOwnership( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig< + typeof systemDictatorGoerliABI, + 'renounceOwnership' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'bridgeETHTo', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'renounceOwnership', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositERC20"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step1"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeDepositErc20( +export function usePrepareSystemDictatorGoerliStep1( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'depositERC20', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step1', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositERC20To"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step2"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeDepositErc20To( +export function usePrepareSystemDictatorGoerliStep2( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'depositERC20To', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step2', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositETH"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step3"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeDepositEth( +export function usePrepareSystemDictatorGoerliStep3( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'depositETH', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step3', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"depositETHTo"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step4"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeDepositEthTo( +export function usePrepareSystemDictatorGoerliStep4( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'depositETHTo', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step4', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeBridgeERC20"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step5"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeFinalizeBridgeErc20( +export function usePrepareSystemDictatorGoerliStep5( config: Omit< - UsePrepareContractWriteConfig< - typeof l1StandardBridgeABI, - 'finalizeBridgeERC20' - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'finalizeBridgeERC20', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step5', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeBridgeETH"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step6"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeFinalizeBridgeEth( +export function usePrepareSystemDictatorGoerliStep6( config: Omit< - UsePrepareContractWriteConfig< - typeof l1StandardBridgeABI, - 'finalizeBridgeETH' - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any +) { return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'finalizeBridgeETH', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'step6', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeERC20Withdrawal"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"transferOwnership"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeFinalizeErc20Withdrawal( +export function usePrepareSystemDictatorGoerliTransferOwnership( config: Omit< UsePrepareContractWriteConfig< - typeof l1StandardBridgeABI, - 'finalizeERC20Withdrawal' + typeof systemDictatorGoerliABI, + 'transferOwnership' >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'finalizeERC20Withdrawal', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'transferOwnership', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `functionName` set to `"finalizeETHWithdrawal"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"updateL2OutputOracleDynamicConfig"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function usePrepareL1StandardBridgeFinalizeEthWithdrawal( +export function usePrepareSystemDictatorGoerliUpdateL2OutputOracleDynamicConfig( config: Omit< UsePrepareContractWriteConfig< - typeof l1StandardBridgeABI, - 'finalizeETHWithdrawal' + typeof systemDictatorGoerliABI, + 'updateL2OutputOracleDynamicConfig' >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - functionName: 'finalizeETHWithdrawal', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + functionName: 'updateL2OutputOracleDynamicConfig', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeEvent( +export function useSystemDictatorGoerliEvent( config: Omit< - UseContractEventConfig, + UseContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractEvent({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], ...config, - } as UseContractEventConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ERC20BridgeFinalized"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `eventName` set to `"Initialized"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeErc20BridgeFinalizedEvent( +export function useSystemDictatorGoerliInitializedEvent( config: Omit< - UseContractEventConfig, + UseContractEventConfig, 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractEvent({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - eventName: 'ERC20BridgeFinalized', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + eventName: 'Initialized', ...config, - } as UseContractEventConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ERC20BridgeInitiated"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `eventName` set to `"OwnershipTransferred"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) */ -export function useL1StandardBridgeErc20BridgeInitiatedEvent( +export function useSystemDictatorGoerliOwnershipTransferredEvent( config: Omit< - UseContractEventConfig, + UseContractEventConfig< + typeof systemDictatorGoerliABI, + 'OwnershipTransferred' + >, 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractEvent({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - eventName: 'ERC20BridgeInitiated', + abi: systemDictatorGoerliABI, + address: systemDictatorGoerliAddress[5], + eventName: 'OwnershipTransferred', ...config, - } as UseContractEventConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ERC20DepositInitiated"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link assetReceiverABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL1StandardBridgeErc20DepositInitiatedEvent( +export function useAssetReceiverRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - eventName: 'ERC20DepositInitiated', + return useContractRead({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ERC20WithdrawalFinalized"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"owner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL1StandardBridgeErc20WithdrawalFinalizedEvent( +export function useAssetReceiverOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig< - typeof l1StandardBridgeABI, - 'ERC20WithdrawalFinalized' - >, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - eventName: 'ERC20WithdrawalFinalized', + return useContractRead({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'owner', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ETHBridgeFinalized"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link assetReceiverABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL1StandardBridgeEthBridgeFinalizedEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +export function useAssetReceiverWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof assetReceiverAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof assetReceiverABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - eventName: 'ETHBridgeFinalized', + return useContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], ...config, - } as UseContractEventConfig) + } as any) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ETHBridgeInitiated"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"CALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL1StandardBridgeEthBridgeInitiatedEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +export function useAssetReceiverCall< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof assetReceiverAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof assetReceiverABI, + 'CALL' + >['request']['abi'], + 'CALL', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'CALL' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'CALL' + } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - eventName: 'ETHBridgeInitiated', + return useContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'CALL', ...config, - } as UseContractEventConfig) + } as any) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ETHDepositInitiated"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"DELEGATECALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL1StandardBridgeEthDepositInitiatedEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +export function useAssetReceiverDelegatecall< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof assetReceiverAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof assetReceiverABI, + 'DELEGATECALL' + >['request']['abi'], + 'DELEGATECALL', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'DELEGATECALL' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'DELEGATECALL' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'DELEGATECALL', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"setOwner"`. + * + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + */ +export function useAssetReceiverSetOwner< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof assetReceiverAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof assetReceiverABI, + 'setOwner' + >['request']['abi'], + 'setOwner', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'setOwner' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setOwner' + } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - eventName: 'ETHDepositInitiated', + return useContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'setOwner', ...config, - } as UseContractEventConfig) + } as any) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1StandardBridgeABI}__ and `eventName` set to `"ETHWithdrawalFinalized"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"withdrawERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x636Af16bf2f682dD3109e60102b8E1A089FedAa8) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL1StandardBridgeEthWithdrawalFinalizedEvent( - config: Omit< - UseContractEventConfig< - typeof l1StandardBridgeABI, - 'ETHWithdrawalFinalized' - >, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1StandardBridgeAddress } = {} as any +export function useAssetReceiverWithdrawErc20< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof assetReceiverAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof assetReceiverABI, + 'withdrawERC20' + >['request']['abi'], + 'withdrawERC20', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawERC20' + } + : UseContractWriteConfig< + typeof assetReceiverABI, + 'withdrawERC20', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'withdrawERC20' + } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l1StandardBridgeABI, - address: - l1StandardBridgeAddress[chainId as keyof typeof l1StandardBridgeAddress], - eventName: 'ETHWithdrawalFinalized', + return useContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'withdrawERC20', ...config, - } as UseContractEventConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"withdrawERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleRead< - TFunctionName extends string, - TSelectData = ReadContractResult +export function useAssetReceiverWithdrawErc721< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof assetReceiverAddress >( - config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof assetReceiverABI, + 'withdrawERC721' + >['request']['abi'], + 'withdrawERC721', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawERC721' + } + : UseContractWriteConfig< + typeof assetReceiverABI, + 'withdrawERC721', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'withdrawERC721' + } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + return useContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'withdrawERC721', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"CHALLENGER"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"withdrawETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleChallenger< - TFunctionName extends 'CHALLENGER', - TSelectData = ReadContractResult +export function useAssetReceiverWithdrawEth< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof assetReceiverAddress >( - config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof assetReceiverABI, + 'withdrawETH' + >['request']['abi'], + 'withdrawETH', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawETH' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'withdrawETH' + } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'CHALLENGER', + return useContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'withdrawETH', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"FINALIZATION_PERIOD_SECONDS"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link assetReceiverABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleFinalizationPeriodSeconds< - TFunctionName extends 'FINALIZATION_PERIOD_SECONDS', - TSelectData = ReadContractResult ->( +export function usePrepareAssetReceiverWrite( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'FINALIZATION_PERIOD_SECONDS', + return usePrepareContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"L2_BLOCK_TIME"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"CALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleL2BlockTime< - TFunctionName extends 'L2_BLOCK_TIME', - TSelectData = ReadContractResult ->( +export function usePrepareAssetReceiverCall( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'L2_BLOCK_TIME', + return usePrepareContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'CALL', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"PROPOSER"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"DELEGATECALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleProposer< - TFunctionName extends 'PROPOSER', - TSelectData = ReadContractResult ->( +export function usePrepareAssetReceiverDelegatecall( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'PROPOSER', + return usePrepareContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'DELEGATECALL', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"SUBMISSION_INTERVAL"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"setOwner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleSubmissionInterval< - TFunctionName extends 'SUBMISSION_INTERVAL', - TSelectData = ReadContractResult ->( +export function usePrepareAssetReceiverSetOwner( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'SUBMISSION_INTERVAL', + return usePrepareContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'setOwner', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"computeL2Timestamp"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"withdrawERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleComputeL2Timestamp< - TFunctionName extends 'computeL2Timestamp', - TSelectData = ReadContractResult ->( +export function usePrepareAssetReceiverWithdrawErc20( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'computeL2Timestamp', + return usePrepareContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'withdrawERC20', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"getL2Output"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"withdrawERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleGetL2Output< - TFunctionName extends 'getL2Output', - TSelectData = ReadContractResult ->( +export function usePrepareAssetReceiverWithdrawErc721( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'getL2Output', + return usePrepareContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'withdrawERC721', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"getL2OutputAfter"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link assetReceiverABI}__ and `functionName` set to `"withdrawETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleGetL2OutputAfter< - TFunctionName extends 'getL2OutputAfter', - TSelectData = ReadContractResult ->( +export function usePrepareAssetReceiverWithdrawEth( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'getL2OutputAfter', + return usePrepareContractWrite({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + functionName: 'withdrawETH', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"getL2OutputIndexAfter"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link assetReceiverABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleGetL2OutputIndexAfter< - TFunctionName extends 'getL2OutputIndexAfter', - TSelectData = ReadContractResult ->( +export function useAssetReceiverEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'getL2OutputIndexAfter', + return useContractEvent({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"latestBlockNumber"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link assetReceiverABI}__ and `eventName` set to `"OwnerUpdated"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleLatestBlockNumber< - TFunctionName extends 'latestBlockNumber', - TSelectData = ReadContractResult ->( +export function useAssetReceiverOwnerUpdatedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'latestBlockNumber', + return useContractEvent({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + eventName: 'OwnerUpdated', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"latestOutputIndex"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link assetReceiverABI}__ and `eventName` set to `"ReceivedETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleLatestOutputIndex< - TFunctionName extends 'latestOutputIndex', - TSelectData = ReadContractResult ->( +export function useAssetReceiverReceivedEthEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'latestOutputIndex', + return useContractEvent({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + eventName: 'ReceivedETH', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"nextBlockNumber"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link assetReceiverABI}__ and `eventName` set to `"WithdrewERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleNextBlockNumber< - TFunctionName extends 'nextBlockNumber', - TSelectData = ReadContractResult ->( +export function useAssetReceiverWithdrewErc20Event( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'nextBlockNumber', + return useContractEvent({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + eventName: 'WithdrewERC20', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"nextOutputIndex"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link assetReceiverABI}__ and `eventName` set to `"WithdrewERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleNextOutputIndex< - TFunctionName extends 'nextOutputIndex', - TSelectData = ReadContractResult ->( +export function useAssetReceiverWithdrewErc721Event( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'nextOutputIndex', + return useContractEvent({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + eventName: 'WithdrewERC721', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"startingBlockNumber"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link assetReceiverABI}__ and `eventName` set to `"WithdrewETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x15DdA60616Ffca20371ED1659dBB78E888f65556) */ -export function useL2OutputOracleStartingBlockNumber< - TFunctionName extends 'startingBlockNumber', - TSelectData = ReadContractResult ->( +export function useAssetReceiverWithdrewEthEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof assetReceiverAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'startingBlockNumber', + return useContractEvent({ + abi: assetReceiverABI, + address: assetReceiverAddress[chainId as keyof typeof assetReceiverAddress], + eventName: 'WithdrewETH', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"startingTimestamp"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link checkBalanceHighABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export function useL2OutputOracleStartingTimestamp< - TFunctionName extends 'startingTimestamp', - TSelectData = ReadContractResult +export function useCheckBalanceHighRead< + TFunctionName extends string, + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractReadConfig< + typeof checkBalanceHighABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof checkBalanceHighAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l2OutputOracleABI, + abi: checkBalanceHighABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'startingTimestamp', + checkBalanceHighAddress[chainId as keyof typeof checkBalanceHighAddress], ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link checkBalanceHighABI}__ and `functionName` set to `"check"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export function useL2OutputOracleVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult +export function useCheckBalanceHighCheck< + TFunctionName extends 'check', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof checkBalanceHighABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof checkBalanceHighAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: l2OutputOracleABI, + abi: checkBalanceHighABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'version', + checkBalanceHighAddress[chainId as keyof typeof checkBalanceHighAddress], + functionName: 'check', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link checkBalanceHighABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export function useL2OutputOracleWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2OutputOracleAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l2OutputOracleABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any +export function useCheckBalanceHighEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof checkBalanceHighAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l2OutputOracleABI, + return useContractEvent({ + abi: checkBalanceHighABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + checkBalanceHighAddress[chainId as keyof typeof checkBalanceHighAddress], ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"deleteL2Outputs"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link checkBalanceHighABI}__ and `eventName` set to `"_EventToExposeStructInABI__Params"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x7eC64a8a591bFf829ff6C8be76074D540ACb813F) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x5d7103853f12109A7d27F118e54BbC654ad847E9) */ -export function useL2OutputOracleDeleteL2Outputs< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2OutputOracleAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l2OutputOracleABI, - 'deleteL2Outputs' - >['request']['abi'], - 'deleteL2Outputs', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'deleteL2Outputs' - } - : UseContractWriteConfig< - typeof l2OutputOracleABI, - 'deleteL2Outputs', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'deleteL2Outputs' - } = {} as any +export function useCheckBalanceHighEventToExposeStructInAbiParamsEvent( + config: Omit< + UseContractEventConfig< + typeof checkBalanceHighABI, + '_EventToExposeStructInABI__Params' + >, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof checkBalanceHighAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l2OutputOracleABI, + return useContractEvent({ + abi: checkBalanceHighABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'deleteL2Outputs', + checkBalanceHighAddress[chainId as keyof typeof checkBalanceHighAddress], + eventName: '_EventToExposeStructInABI__Params', ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"initialize"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link checkBalanceLowABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export function useL2OutputOracleInitialize< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2OutputOracleAddress +export function useCheckBalanceLowRead< + TFunctionName extends string, + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l2OutputOracleABI, - 'initialize' - >['request']['abi'], - 'initialize', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'initialize' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof checkBalanceLowABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof checkBalanceLowAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l2OutputOracleABI, + return useContractRead({ + abi: checkBalanceLowABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'initialize', + checkBalanceLowAddress[chainId as keyof typeof checkBalanceLowAddress], ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"proposeL2Output"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link checkBalanceLowABI}__ and `functionName` set to `"check"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export function useL2OutputOracleProposeL2Output< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2OutputOracleAddress +export function useCheckBalanceLowCheck< + TFunctionName extends 'check', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l2OutputOracleABI, - 'proposeL2Output' - >['request']['abi'], - 'proposeL2Output', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'proposeL2Output' - } - : UseContractWriteConfig< - typeof l2OutputOracleABI, - 'proposeL2Output', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'proposeL2Output' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof checkBalanceLowABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof checkBalanceLowAddress } = {} as any ) { const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: l2OutputOracleABI, + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: checkBalanceLowABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'proposeL2Output', + checkBalanceLowAddress[chainId as keyof typeof checkBalanceLowAddress], + functionName: 'check', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link checkBalanceLowABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export function usePrepareL2OutputOracleWrite( +export function useCheckBalanceLowEvent( config: Omit< - UsePrepareContractWriteConfig, + UseContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof checkBalanceLowAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: l2OutputOracleABI, + return useContractEvent({ + abi: checkBalanceLowABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + checkBalanceLowAddress[chainId as keyof typeof checkBalanceLowAddress], ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"deleteL2Outputs"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link checkBalanceLowABI}__ and `eventName` set to `"_EventToExposeStructInABI__Params"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x381a4eFC2A2C914eA1889722bB4B44Fa6BD5b640) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x7Ce13D154FAEE5C8B3E6b19d4Add16f21d884474) */ -export function usePrepareL2OutputOracleDeleteL2Outputs( +export function useCheckBalanceLowEventToExposeStructInAbiParamsEvent( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractEventConfig< + typeof checkBalanceLowABI, + '_EventToExposeStructInABI__Params' + >, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof checkBalanceLowAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: l2OutputOracleABI, + return useContractEvent({ + abi: checkBalanceLowABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'deleteL2Outputs', + checkBalanceLowAddress[chainId as keyof typeof checkBalanceLowAddress], + eventName: '_EventToExposeStructInABI__Params', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"initialize"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link checkGelatoLowABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export function usePrepareL2OutputOracleInitialize( +export function useCheckGelatoLowRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof checkGelatoLowAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: l2OutputOracleABI, + return useContractRead({ + abi: checkGelatoLowABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'initialize', + checkGelatoLowAddress[chainId as keyof typeof checkGelatoLowAddress], ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2OutputOracleABI}__ and `functionName` set to `"proposeL2Output"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link checkGelatoLowABI}__ and `functionName` set to `"check"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export function usePrepareL2OutputOracleProposeL2Output( +export function useCheckGelatoLowCheck< + TFunctionName extends 'check', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof checkGelatoLowAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: l2OutputOracleABI, + return useContractRead({ + abi: checkGelatoLowABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - functionName: 'proposeL2Output', + checkGelatoLowAddress[chainId as keyof typeof checkGelatoLowAddress], + functionName: 'check', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2OutputOracleABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link checkGelatoLowABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export function useL2OutputOracleEvent( +export function useCheckGelatoLowEvent( config: Omit< - UseContractEventConfig, + UseContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof checkGelatoLowAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id return useContractEvent({ - abi: l2OutputOracleABI, + abi: checkGelatoLowABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], + checkGelatoLowAddress[chainId as keyof typeof checkGelatoLowAddress], ...config, - } as UseContractEventConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2OutputOracleABI}__ and `eventName` set to `"Initialized"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link checkGelatoLowABI}__ and `eventName` set to `"_EventToExposeStructInABI__Params"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4f7CFc43f6D262a085F3b946cAC69E7a8E39BBAa) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xF9c8a4Cb4021f57F9f6d69799cA9BefF64524862) */ -export function useL2OutputOracleInitializedEvent( +export function useCheckGelatoLowEventToExposeStructInAbiParamsEvent( config: Omit< - UseContractEventConfig, + UseContractEventConfig< + typeof checkGelatoLowABI, + '_EventToExposeStructInABI__Params' + >, 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + > & { chainId?: keyof typeof checkGelatoLowAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id return useContractEvent({ - abi: l2OutputOracleABI, + abi: checkGelatoLowABI, address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - eventName: 'Initialized', + checkGelatoLowAddress[chainId as keyof typeof checkGelatoLowAddress], + eventName: '_EventToExposeStructInABI__Params', ...config, - } as UseContractEventConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2OutputOracleABI}__ and `eventName` set to `"OutputProposed"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link checkTrueABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export function useL2OutputOracleOutputProposedEvent( +export function useCheckTrueRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof checkTrueAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - eventName: 'OutputProposed', + return useContractRead({ + abi: checkTrueABI, + address: checkTrueAddress[chainId as keyof typeof checkTrueAddress], ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2OutputOracleABI}__ and `eventName` set to `"OutputsDeleted"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link checkTrueABI}__ and `functionName` set to `"check"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0) + * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5c741a38cb11424711231777D71689C458eE835D) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x47443D0C184e022F19BD1578F5bca6B8a9F58E32) */ -export function useL2OutputOracleOutputsDeletedEvent( +export function useCheckTrueCheck< + TFunctionName extends 'check', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l2OutputOracleAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof checkTrueAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: l2OutputOracleABI, - address: - l2OutputOracleAddress[chainId as keyof typeof l2OutputOracleAddress], - eventName: 'OutputsDeleted', + return useContractRead({ + abi: checkTrueABI, + address: checkTrueAddress[chainId as keyof typeof checkTrueAddress], + functionName: 'check', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismMintableErc20FactoryRead< +export function useDrippieRead< TFunctionName extends string, - TSelectData = ReadContractResult< - typeof optimismMintableErc20FactoryABI, - TFunctionName - > + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc20FactoryABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any + > & { chainId?: keyof typeof drippieAddress } = {} as any +) { + return useContractRead({ + abi: drippieABI, + address: drippieAddress[1], + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"drips"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieDrips< + TFunctionName extends 'drips', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieAddress } = {} as any +) { + return useContractRead({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'drips', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"executable"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieExecutable< + TFunctionName extends 'executable', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieAddress } = {} as any +) { + return useContractRead({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'executable', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"owner"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult +>( + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieAddress } = {} as any +) { + return useContractRead({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'owner', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieABI}__. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + return useContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"CALL"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieCall< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult['request']['abi'], + 'CALL', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'CALL' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'CALL' + } = {} as any +) { + return useContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'CALL', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"DELEGATECALL"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieDelegatecall< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof drippieABI, + 'DELEGATECALL' + >['request']['abi'], + 'DELEGATECALL', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'DELEGATECALL' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'DELEGATECALL' + } = {} as any +) { + return useContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'DELEGATECALL', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"create"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieCreate< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof drippieABI, + 'create' + >['request']['abi'], + 'create', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'create' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'create' + } = {} as any +) { + return useContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'create', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"drip"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieDrip< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult['request']['abi'], + 'drip', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'drip' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'drip' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], + return useContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'drip', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"BRIDGE"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"setOwner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismMintableErc20FactoryBridge< - TFunctionName extends 'BRIDGE', - TSelectData = ReadContractResult< - typeof optimismMintableErc20FactoryABI, - TFunctionName - > +export function useDrippieSetOwner< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieAddress >( - config: Omit< - UseContractReadConfig< - typeof optimismMintableErc20FactoryABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof drippieABI, + 'setOwner' + >['request']['abi'], + 'setOwner', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'setOwner' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setOwner' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], - functionName: 'BRIDGE', + return useContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'setOwner', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"status"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismMintableErc20FactoryVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult< - typeof optimismMintableErc20FactoryABI, - TFunctionName - > +export function useDrippieStatus< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieAddress >( - config: Omit< - UseContractReadConfig< - typeof optimismMintableErc20FactoryABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof drippieABI, + 'status' + >['request']['abi'], + 'status', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'status' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'status' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], - functionName: 'version', + return useContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'status', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"withdrawERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismMintableErc20FactoryWrite< - TFunctionName extends string, +export function useDrippieWithdrawErc20< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismMintableErc20FactoryAddress + TChainId extends number = keyof typeof drippieAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof optimismMintableErc20FactoryABI, - string + typeof drippieABI, + 'withdrawERC20' >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig< - typeof optimismMintableErc20FactoryABI, - TFunctionName, + 'withdrawERC20', TMode > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawERC20' + } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId + functionName?: 'withdrawERC20' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof optimismMintableErc20FactoryABI, - TFunctionName, - TMode - >({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], + return useContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'withdrawERC20', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"createOptimismMintableERC20"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"withdrawERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismMintableErc20FactoryCreateOptimismMintableErc20< +export function useDrippieWithdrawErc721< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismMintableErc20FactoryAddress + TChainId extends number = keyof typeof drippieAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof optimismMintableErc20FactoryABI, - 'createOptimismMintableERC20' + typeof drippieABI, + 'withdrawERC721' >['request']['abi'], - 'createOptimismMintableERC20', + 'withdrawERC721', TMode > & { address?: Address chainId?: TChainId - functionName?: 'createOptimismMintableERC20' + functionName?: 'withdrawERC721' } - : UseContractWriteConfig< - typeof optimismMintableErc20FactoryABI, - 'createOptimismMintableERC20', - TMode - > & { + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'createOptimismMintableERC20' + functionName?: 'withdrawERC721' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof optimismMintableErc20FactoryABI, - 'createOptimismMintableERC20', - TMode - >({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], - functionName: 'createOptimismMintableERC20', + return useContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'withdrawERC721', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"createStandardL2Token"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"withdrawETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismMintableErc20FactoryCreateStandardL2Token< +export function useDrippieWithdrawEth< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismMintableErc20FactoryAddress + TChainId extends number = keyof typeof drippieAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof optimismMintableErc20FactoryABI, - 'createStandardL2Token' + typeof drippieABI, + 'withdrawETH' >['request']['abi'], - 'createStandardL2Token', + 'withdrawETH', TMode > & { address?: Address chainId?: TChainId - functionName?: 'createStandardL2Token' + functionName?: 'withdrawETH' } - : UseContractWriteConfig< - typeof optimismMintableErc20FactoryABI, - 'createStandardL2Token', - TMode - > & { + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'createStandardL2Token' + functionName?: 'withdrawETH' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof optimismMintableErc20FactoryABI, - 'createStandardL2Token', - TMode - >({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], - functionName: 'createStandardL2Token', + return useContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'withdrawETH', ...config, } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePrepareOptimismMintableErc20FactoryWrite< - TFunctionName extends string ->( +export function usePrepareDrippieWrite( config: Omit< - UsePrepareContractWriteConfig< - typeof optimismMintableErc20FactoryABI, - TFunctionName - >, + UsePrepareContractWriteConfig, 'abi' | 'address' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], + abi: drippieABI, + address: drippieAddress[1], ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"createOptimismMintableERC20"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"CALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePrepareOptimismMintableErc20FactoryCreateOptimismMintableErc20( +export function usePrepareDrippieCall( config: Omit< - UsePrepareContractWriteConfig< - typeof optimismMintableErc20FactoryABI, - 'createOptimismMintableERC20' - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], - functionName: 'createOptimismMintableERC20', + abi: drippieABI, + address: drippieAddress[1], + functionName: 'CALL', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `functionName` set to `"createStandardL2Token"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"DELEGATECALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePrepareOptimismMintableErc20FactoryCreateStandardL2Token( +export function usePrepareDrippieDelegatecall( config: Omit< - UsePrepareContractWriteConfig< - typeof optimismMintableErc20FactoryABI, - 'createStandardL2Token' - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], - functionName: 'createStandardL2Token', + abi: drippieABI, + address: drippieAddress[1], + functionName: 'DELEGATECALL', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"create"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismMintableErc20FactoryEvent( +export function usePrepareDrippieCreate( config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], + return usePrepareContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'create', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `eventName` set to `"OptimismMintableERC20Created"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"drip"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismMintableErc20FactoryOptimismMintableErc20CreatedEvent( +export function usePrepareDrippieDrip( config: Omit< - UseContractEventConfig< - typeof optimismMintableErc20FactoryABI, - 'OptimismMintableERC20Created' - >, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], - eventName: 'OptimismMintableERC20Created', + return usePrepareContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'drip', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc20FactoryABI}__ and `eventName` set to `"StandardL2TokenCreated"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"setOwner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000012) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000012) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismMintableErc20FactoryStandardL2TokenCreatedEvent( +export function usePrepareDrippieSetOwner( config: Omit< - UseContractEventConfig< - typeof optimismMintableErc20FactoryABI, - 'StandardL2TokenCreated' - >, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof optimismMintableErc20FactoryAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: optimismMintableErc20FactoryABI, - address: - optimismMintableErc20FactoryAddress[ - chainId as keyof typeof optimismMintableErc20FactoryAddress - ], - eventName: 'StandardL2TokenCreated', + return usePrepareContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'setOwner', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"status"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalRead< - TFunctionName extends string, - TSelectData = ReadContractResult ->( +export function usePrepareDrippieStatus( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + return usePrepareContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'status', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"GUARDIAN"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"withdrawERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalGuardian< - TFunctionName extends 'GUARDIAN', - TSelectData = ReadContractResult ->( +export function usePrepareDrippieWithdrawErc20( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'GUARDIAN', + return usePrepareContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'withdrawERC20', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"L2_ORACLE"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"withdrawERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalL2Oracle< - TFunctionName extends 'L2_ORACLE', - TSelectData = ReadContractResult ->( +export function usePrepareDrippieWithdrawErc721( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'L2_ORACLE', + return usePrepareContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'withdrawERC721', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"SYSTEM_CONFIG"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieABI}__ and `functionName` set to `"withdrawETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalSystemConfig< - TFunctionName extends 'SYSTEM_CONFIG', - TSelectData = ReadContractResult ->( +export function usePrepareDrippieWithdrawEth( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'SYSTEM_CONFIG', + return usePrepareContractWrite({ + abi: drippieABI, + address: drippieAddress[1], + functionName: 'withdrawETH', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"finalizedWithdrawals"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalFinalizedWithdrawals< - TFunctionName extends 'finalizedWithdrawals', - TSelectData = ReadContractResult ->( +export function useDrippieEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'finalizedWithdrawals', + return useContractEvent({ + abi: drippieABI, + address: drippieAddress[1], ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"isOutputFinalized"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieABI}__ and `eventName` set to `"DripCreated"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalIsOutputFinalized< - TFunctionName extends 'isOutputFinalized', - TSelectData = ReadContractResult ->( +export function useDrippieDripCreatedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'isOutputFinalized', + return useContractEvent({ + abi: drippieABI, + address: drippieAddress[1], + eventName: 'DripCreated', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"l2Sender"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieABI}__ and `eventName` set to `"DripExecuted"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalL2Sender< - TFunctionName extends 'l2Sender', - TSelectData = ReadContractResult ->( +export function useDrippieDripExecutedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'l2Sender', + return useContractEvent({ + abi: drippieABI, + address: drippieAddress[1], + eventName: 'DripExecuted', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"minimumGasLimit"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieABI}__ and `eventName` set to `"DripStatusUpdated"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalMinimumGasLimit< - TFunctionName extends 'minimumGasLimit', - TSelectData = ReadContractResult ->( +export function useDrippieDripStatusUpdatedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'minimumGasLimit', + return useContractEvent({ + abi: drippieABI, + address: drippieAddress[1], + eventName: 'DripStatusUpdated', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"params"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieABI}__ and `eventName` set to `"OwnerUpdated"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalParams< - TFunctionName extends 'params', - TSelectData = ReadContractResult ->( +export function useDrippieOwnerUpdatedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'params', + return useContractEvent({ + abi: drippieABI, + address: drippieAddress[1], + eventName: 'OwnerUpdated', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"paused"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieABI}__ and `eventName` set to `"ReceivedETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalPaused< - TFunctionName extends 'paused', - TSelectData = ReadContractResult ->( +export function useDrippieReceivedEthEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'paused', + return useContractEvent({ + abi: drippieABI, + address: drippieAddress[1], + eventName: 'ReceivedETH', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieABI}__ and `eventName` set to `"WithdrewERC20"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieWithdrewErc20Event( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieAddress } = {} as any +) { + return useContractEvent({ + abi: drippieABI, + address: drippieAddress[1], + eventName: 'WithdrewERC20', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieABI}__ and `eventName` set to `"WithdrewERC721"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieWithdrewErc721Event( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieAddress } = {} as any +) { + return useContractEvent({ + abi: drippieABI, + address: drippieAddress[1], + eventName: 'WithdrewERC721', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"provenWithdrawals"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieABI}__ and `eventName` set to `"WithdrewETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalProvenWithdrawals< - TFunctionName extends 'provenWithdrawals', - TSelectData = ReadContractResult ->( +export function useDrippieWithdrewEthEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'provenWithdrawals', + return useContractEvent({ + abi: drippieABI, + address: drippieAddress[1], + eventName: 'WithdrewETH', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult +export function useDrippieGoerliRead< + TFunctionName extends string, + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'version', + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"drips"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismPortalAddress +export function useDrippieGoerliDrips< + TFunctionName extends 'drips', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof optimismPortalABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + return useContractRead({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'drips', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"depositTransaction"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"executable"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalDepositTransaction< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismPortalAddress +export function useDrippieGoerliExecutable< + TFunctionName extends 'executable', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof optimismPortalABI, - 'depositTransaction' - >['request']['abi'], - 'depositTransaction', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'depositTransaction' - } - : UseContractWriteConfig< - typeof optimismPortalABI, - 'depositTransaction', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'depositTransaction' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof optimismPortalABI, - 'depositTransaction', - TMode - >({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'depositTransaction', + return useContractRead({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'executable', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"donateETH"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"owner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalDonateEth< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismPortalAddress +export function useDrippieGoerliOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof optimismPortalABI, - 'donateETH' - >['request']['abi'], - 'donateETH', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'donateETH' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'donateETH' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'donateETH', + return useContractRead({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'owner', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"finalizeWithdrawalTransaction"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalFinalizeWithdrawalTransaction< +export function useDrippieGoerliWrite< + TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismPortalAddress + TChainId extends number = keyof typeof drippieGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof optimismPortalABI, - 'finalizeWithdrawalTransaction' + typeof drippieGoerliABI, + string >['request']['abi'], - 'finalizeWithdrawalTransaction', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'finalizeWithdrawalTransaction' - } - : UseContractWriteConfig< - typeof optimismPortalABI, - 'finalizeWithdrawalTransaction', + TFunctionName, TMode - > & { + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'finalizeWithdrawalTransaction' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof optimismPortalABI, - 'finalizeWithdrawalTransaction', - TMode - >({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'finalizeWithdrawalTransaction', + return useContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"initialize"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"CALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalInitialize< +export function useDrippieGoerliCall< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismPortalAddress + TChainId extends number = keyof typeof drippieGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof optimismPortalABI, - 'initialize' + typeof drippieGoerliABI, + 'CALL' >['request']['abi'], - 'initialize', + 'CALL', TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } - : UseContractWriteConfig & { + > & { address?: Address; chainId?: TChainId; functionName?: 'CALL' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'initialize' + functionName?: 'CALL' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'initialize', + return useContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'CALL', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"pause"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"DELEGATECALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalPause< +export function useDrippieGoerliDelegatecall< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismPortalAddress + TChainId extends number = keyof typeof drippieGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof optimismPortalABI, - 'pause' + typeof drippieGoerliABI, + 'DELEGATECALL' >['request']['abi'], - 'pause', + 'DELEGATECALL', TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'pause' } - : UseContractWriteConfig & { + > & { + address?: Address + chainId?: TChainId + functionName?: 'DELEGATECALL' + } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'pause' + functionName?: 'DELEGATECALL' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'pause', + return useContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'DELEGATECALL', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"proveWithdrawalTransaction"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"create"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalProveWithdrawalTransaction< +export function useDrippieGoerliCreate< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismPortalAddress + TChainId extends number = keyof typeof drippieGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof optimismPortalABI, - 'proveWithdrawalTransaction' + typeof drippieGoerliABI, + 'create' >['request']['abi'], - 'proveWithdrawalTransaction', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'proveWithdrawalTransaction' - } - : UseContractWriteConfig< - typeof optimismPortalABI, - 'proveWithdrawalTransaction', + 'create', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'create' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'proveWithdrawalTransaction' + functionName?: 'create' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof optimismPortalABI, - 'proveWithdrawalTransaction', - TMode - >({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'proveWithdrawalTransaction', + return useContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'create', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"unpause"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"drip"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalUnpause< +export function useDrippieGoerliDrip< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismPortalAddress + TChainId extends number = keyof typeof drippieGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof optimismPortalABI, - 'unpause' + typeof drippieGoerliABI, + 'drip' >['request']['abi'], - 'unpause', + 'drip', TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'unpause' } - : UseContractWriteConfig & { + > & { address?: Address; chainId?: TChainId; functionName?: 'drip' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'unpause' + functionName?: 'drip' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'unpause', + return useContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'drip', ...config, } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) - */ -export function usePrepareOptimismPortalWrite( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"depositTransaction"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"setOwner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePrepareOptimismPortalDepositTransaction( - config: Omit< - UsePrepareContractWriteConfig< - typeof optimismPortalABI, - 'depositTransaction' - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +export function useDrippieGoerliSetOwner< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieGoerliAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof drippieGoerliABI, + 'setOwner' + >['request']['abi'], + 'setOwner', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'setOwner' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setOwner' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'depositTransaction', + return useContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'setOwner', ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"donateETH"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"status"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePrepareOptimismPortalDonateEth( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +export function useDrippieGoerliStatus< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieGoerliAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof drippieGoerliABI, + 'status' + >['request']['abi'], + 'status', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'status' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'status' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'donateETH', + return useContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'status', ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"finalizeWithdrawalTransaction"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"withdrawERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePrepareOptimismPortalFinalizeWithdrawalTransaction( - config: Omit< - UsePrepareContractWriteConfig< - typeof optimismPortalABI, - 'finalizeWithdrawalTransaction' - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +export function useDrippieGoerliWithdrawErc20< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieGoerliAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof drippieGoerliABI, + 'withdrawERC20' + >['request']['abi'], + 'withdrawERC20', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawERC20' + } + : UseContractWriteConfig< + typeof drippieGoerliABI, + 'withdrawERC20', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'withdrawERC20' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'finalizeWithdrawalTransaction', + return useContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'withdrawERC20', ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"initialize"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"withdrawERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePrepareOptimismPortalInitialize( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +export function useDrippieGoerliWithdrawErc721< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieGoerliAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof drippieGoerliABI, + 'withdrawERC721' + >['request']['abi'], + 'withdrawERC721', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawERC721' + } + : UseContractWriteConfig< + typeof drippieGoerliABI, + 'withdrawERC721', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'withdrawERC721' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'initialize', + return useContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'withdrawERC721', ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"pause"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"withdrawETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePrepareOptimismPortalPause( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any +export function useDrippieGoerliWithdrawEth< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof drippieGoerliAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof drippieGoerliABI, + 'withdrawETH' + >['request']['abi'], + 'withdrawETH', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawETH' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'withdrawETH' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'pause', + return useContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'withdrawETH', ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"proveWithdrawalTransaction"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePrepareOptimismPortalProveWithdrawalTransaction( +export function usePrepareDrippieGoerliWrite( config: Omit< - UsePrepareContractWriteConfig< - typeof optimismPortalABI, - 'proveWithdrawalTransaction' - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'proveWithdrawalTransaction', + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismPortalABI}__ and `functionName` set to `"unpause"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"CALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePrepareOptimismPortalUnpause( +export function usePrepareDrippieGoerliCall( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - functionName: 'unpause', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) - */ -export function useOptimismPortalEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'CALL', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"Initialized"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"DELEGATECALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalInitializedEvent( +export function usePrepareDrippieGoerliDelegatecall( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - eventName: 'Initialized', + return usePrepareContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'DELEGATECALL', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"Paused"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"create"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalPausedEvent( +export function usePrepareDrippieGoerliCreate( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - eventName: 'Paused', + return usePrepareContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'create', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"TransactionDeposited"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"drip"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalTransactionDepositedEvent( +export function usePrepareDrippieGoerliDrip( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - eventName: 'TransactionDeposited', + return usePrepareContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'drip', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"Unpaused"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"setOwner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalUnpausedEvent( +export function usePrepareDrippieGoerliSetOwner( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - eventName: 'Unpaused', + return usePrepareContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'setOwner', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"WithdrawalFinalized"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"status"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalWithdrawalFinalizedEvent( +export function usePrepareDrippieGoerliStatus( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - eventName: 'WithdrawalFinalized', + return usePrepareContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'status', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismPortalABI}__ and `eventName` set to `"WithdrawalProven"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"withdrawERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xbEb5Fc579115071764c7423A4f12eDde41f106Ed) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useOptimismPortalWithdrawalProvenEvent( +export function usePrepareDrippieGoerliWithdrawErc20( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof optimismPortalAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: optimismPortalABI, - address: - optimismPortalAddress[chainId as keyof typeof optimismPortalAddress], - eventName: 'WithdrawalProven', + return usePrepareContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'withdrawERC20', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link portalSenderABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"withdrawERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePortalSenderRead< - TFunctionName extends string, - TSelectData = ReadContractResult ->( +export function usePrepareDrippieGoerliWithdrawErc721( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof portalSenderAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: portalSenderABI, - address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], + return usePrepareContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'withdrawERC721', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link portalSenderABI}__ and `functionName` set to `"PORTAL"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieGoerliABI}__ and `functionName` set to `"withdrawETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePortalSenderPortal< - TFunctionName extends 'PORTAL', - TSelectData = ReadContractResult ->( +export function usePrepareDrippieGoerliWithdrawEth( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof portalSenderAddress } = {} as any + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: portalSenderABI, - address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], - functionName: 'PORTAL', + return usePrepareContractWrite({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + functionName: 'withdrawETH', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link portalSenderABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePortalSenderWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof portalSenderAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof portalSenderABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any +export function useDrippieGoerliEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: portalSenderABI, - address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], + return useContractEvent({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link portalSenderABI}__ and `functionName` set to `"donate"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieGoerliABI}__ and `eventName` set to `"DripCreated"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePortalSenderDonate< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof portalSenderAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof portalSenderABI, - 'donate' - >['request']['abi'], - 'donate', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'donate' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'donate' - } = {} as any +export function useDrippieGoerliDripCreatedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: portalSenderABI, - address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], - functionName: 'donate', + return useContractEvent({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + eventName: 'DripCreated', ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link portalSenderABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieGoerliABI}__ and `eventName` set to `"DripExecuted"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePreparePortalSenderWrite( +export function useDrippieGoerliDripExecutedEvent( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof portalSenderAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: portalSenderABI, - address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], + return useContractEvent({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + eventName: 'DripExecuted', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link portalSenderABI}__ and `functionName` set to `"donate"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieGoerliABI}__ and `eventName` set to `"DripStatusUpdated"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x0A893d9576b9cFD9EF78595963dc973238E78210) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xe7FACd39531ee3C313330E93B4d7a8B8A3c84Aa4) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function usePreparePortalSenderDonate( +export function useDrippieGoerliDripStatusUpdatedEvent( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof portalSenderAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: portalSenderABI, - address: portalSenderAddress[chainId as keyof typeof portalSenderAddress], - functionName: 'donate', + return useContractEvent({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + eventName: 'DripStatusUpdated', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieGoerliABI}__ and `eventName` set to `"OwnerUpdated"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useProxyAdminRead< - TFunctionName extends string, - TSelectData = ReadContractResult ->( +export function useDrippieGoerliOwnerUpdatedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + return useContractEvent({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + eventName: 'OwnerUpdated', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieGoerliABI}__ and `eventName` set to `"ReceivedETH"`. + * + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) + */ +export function useDrippieGoerliReceivedEthEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any +) { + return useContractEvent({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + eventName: 'ReceivedETH', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"addressManager"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieGoerliABI}__ and `eventName` set to `"WithdrewERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useProxyAdminAddressManager< - TFunctionName extends 'addressManager', - TSelectData = ReadContractResult ->( +export function useDrippieGoerliWithdrewErc20Event( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'addressManager', + return useContractEvent({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + eventName: 'WithdrewERC20', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"getProxyAdmin"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieGoerliABI}__ and `eventName` set to `"WithdrewERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useProxyAdminGetProxyAdmin< - TFunctionName extends 'getProxyAdmin', - TSelectData = ReadContractResult ->( +export function useDrippieGoerliWithdrewErc721Event( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'getProxyAdmin', + return useContractEvent({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + eventName: 'WithdrewERC721', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"getProxyImplementation"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieGoerliABI}__ and `eventName` set to `"WithdrewETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x44b3A2a040057eBafC601A78647e805fd58B1f50) */ -export function useProxyAdminGetProxyImplementation< - TFunctionName extends 'getProxyImplementation', - TSelectData = ReadContractResult ->( +export function useDrippieGoerliWithdrewEthEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'getProxyImplementation', + return useContractEvent({ + abi: drippieGoerliABI, + address: drippieGoerliAddress[5], + eventName: 'WithdrewETH', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"implementationName"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieOptimismGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminImplementationName< - TFunctionName extends 'implementationName', - TSelectData = ReadContractResult +export function useDrippieOptimismGoerliRead< + TFunctionName extends string, + TSelectData = ReadContractResult< + typeof drippieOptimismGoerliABI, + TFunctionName + > >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + UseContractReadConfig< + typeof drippieOptimismGoerliABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'implementationName', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"isUpgrading"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"drips"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminIsUpgrading< - TFunctionName extends 'isUpgrading', - TSelectData = ReadContractResult +export function useDrippieOptimismGoerliDrips< + TFunctionName extends 'drips', + TSelectData = ReadContractResult< + typeof drippieOptimismGoerliABI, + TFunctionName + > >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof drippieOptimismGoerliABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'isUpgrading', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'drips', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"owner"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"executable"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminOwner< - TFunctionName extends 'owner', - TSelectData = ReadContractResult +export function useDrippieOptimismGoerliExecutable< + TFunctionName extends 'executable', + TSelectData = ReadContractResult< + typeof drippieOptimismGoerliABI, + TFunctionName + > >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof drippieOptimismGoerliABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'owner', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'executable', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"proxyType"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"owner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminProxyType< - TFunctionName extends 'proxyType', - TSelectData = ReadContractResult +export function useDrippieOptimismGoerliOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult< + typeof drippieOptimismGoerliABI, + TFunctionName + > >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof drippieOptimismGoerliABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'proxyType', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'owner', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminWrite< +export function useDrippieOptimismGoerliWrite< TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof proxyAdminABI, + typeof drippieOptimismGoerliABI, string >['request']['abi'], TFunctionName, TMode > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { + : UseContractWriteConfig< + typeof drippieOptimismGoerliABI, + TFunctionName, + TMode + > & { abi?: never address?: never chainId?: TChainId } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + return useContractWrite< + typeof drippieOptimismGoerliABI, + TFunctionName, + TMode + >({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"changeProxyAdmin"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"CALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminChangeProxyAdmin< +export function useDrippieOptimismGoerliCall< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof proxyAdminABI, - 'changeProxyAdmin' + typeof drippieOptimismGoerliABI, + 'CALL' >['request']['abi'], - 'changeProxyAdmin', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'changeProxyAdmin' - } - : UseContractWriteConfig< - typeof proxyAdminABI, - 'changeProxyAdmin', + 'CALL', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'CALL' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'changeProxyAdmin' + functionName?: 'CALL' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'changeProxyAdmin', + return useContractWrite({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'CALL', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"renounceOwnership"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"DELEGATECALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminRenounceOwnership< +export function useDrippieOptimismGoerliDelegatecall< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof proxyAdminABI, - 'renounceOwnership' + typeof drippieOptimismGoerliABI, + 'DELEGATECALL' >['request']['abi'], - 'renounceOwnership', + 'DELEGATECALL', TMode > & { address?: Address chainId?: TChainId - functionName?: 'renounceOwnership' + functionName?: 'DELEGATECALL' } : UseContractWriteConfig< - typeof proxyAdminABI, - 'renounceOwnership', + typeof drippieOptimismGoerliABI, + 'DELEGATECALL', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'renounceOwnership' - } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'renounceOwnership', - ...config, - } as any) -} - -/** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setAddress"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) - */ -export function useProxyAdminSetAddress< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof proxyAdminABI, - 'setAddress' - >['request']['abi'], - 'setAddress', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'setAddress' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'setAddress' + functionName?: 'DELEGATECALL' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'setAddress', + return useContractWrite< + typeof drippieOptimismGoerliABI, + 'DELEGATECALL', + TMode + >({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'DELEGATECALL', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setAddressManager"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"create"`. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminSetAddressManager< +export function useDrippieOptimismGoerliCreate< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof proxyAdminABI, - 'setAddressManager' + typeof drippieOptimismGoerliABI, + 'create' >['request']['abi'], - 'setAddressManager', + 'create', TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'setAddressManager' - } + > & { address?: Address; chainId?: TChainId; functionName?: 'create' } : UseContractWriteConfig< - typeof proxyAdminABI, - 'setAddressManager', + typeof drippieOptimismGoerliABI, + 'create', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'setAddressManager' + functionName?: 'create' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'setAddressManager', + return useContractWrite({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'create', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setImplementationName"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"drip"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminSetImplementationName< +export function useDrippieOptimismGoerliDrip< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof proxyAdminABI, - 'setImplementationName' + typeof drippieOptimismGoerliABI, + 'drip' >['request']['abi'], - 'setImplementationName', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'setImplementationName' - } - : UseContractWriteConfig< - typeof proxyAdminABI, - 'setImplementationName', + 'drip', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'drip' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'setImplementationName' + functionName?: 'drip' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite( - { - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'setImplementationName', - ...config, - } as any - ) + return useContractWrite({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'drip', + ...config, + } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setProxyType"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"setOwner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminSetProxyType< +export function useDrippieOptimismGoerliSetOwner< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof proxyAdminABI, - 'setProxyType' + typeof drippieOptimismGoerliABI, + 'setOwner' >['request']['abi'], - 'setProxyType', + 'setOwner', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'setOwner' } + : UseContractWriteConfig< + typeof drippieOptimismGoerliABI, + 'setOwner', TMode > & { - address?: Address - chainId?: TChainId - functionName?: 'setProxyType' - } - : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'setProxyType' + functionName?: 'setOwner' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'setProxyType', + return useContractWrite({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'setOwner', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setUpgrading"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"status"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminSetUpgrading< +export function useDrippieOptimismGoerliStatus< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof proxyAdminABI, - 'setUpgrading' + typeof drippieOptimismGoerliABI, + 'status' >['request']['abi'], - 'setUpgrading', + 'status', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'status' } + : UseContractWriteConfig< + typeof drippieOptimismGoerliABI, + 'status', TMode > & { - address?: Address - chainId?: TChainId - functionName?: 'setUpgrading' - } - : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'setUpgrading' + functionName?: 'status' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'setUpgrading', + return useContractWrite({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'status', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"withdrawERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminTransferOwnership< +export function useDrippieOptimismGoerliWithdrawErc20< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof proxyAdminABI, - 'transferOwnership' + typeof drippieOptimismGoerliABI, + 'withdrawERC20' >['request']['abi'], - 'transferOwnership', + 'withdrawERC20', TMode > & { address?: Address chainId?: TChainId - functionName?: 'transferOwnership' + functionName?: 'withdrawERC20' } : UseContractWriteConfig< - typeof proxyAdminABI, - 'transferOwnership', + typeof drippieOptimismGoerliABI, + 'withdrawERC20', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'transferOwnership' + functionName?: 'withdrawERC20' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'transferOwnership', + return useContractWrite< + typeof drippieOptimismGoerliABI, + 'withdrawERC20', + TMode + >({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'withdrawERC20', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"upgrade"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"withdrawERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminUpgrade< +export function useDrippieOptimismGoerliWithdrawErc721< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof proxyAdminABI, - 'upgrade' + typeof drippieOptimismGoerliABI, + 'withdrawERC721' >['request']['abi'], - 'upgrade', + 'withdrawERC721', TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'upgrade' } - : UseContractWriteConfig & { + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawERC721' + } + : UseContractWriteConfig< + typeof drippieOptimismGoerliABI, + 'withdrawERC721', + TMode + > & { abi?: never address?: never chainId?: TChainId - functionName?: 'upgrade' + functionName?: 'withdrawERC721' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'upgrade', + return useContractWrite< + typeof drippieOptimismGoerliABI, + 'withdrawERC721', + TMode + >({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'withdrawERC721', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"upgradeAndCall"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"withdrawETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminUpgradeAndCall< +export function useDrippieOptimismGoerliWithdrawEth< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof proxyAdminAddress + TChainId extends number = keyof typeof drippieOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof proxyAdminABI, - 'upgradeAndCall' + typeof drippieOptimismGoerliABI, + 'withdrawETH' >['request']['abi'], - 'upgradeAndCall', + 'withdrawETH', TMode > & { address?: Address chainId?: TChainId - functionName?: 'upgradeAndCall' + functionName?: 'withdrawETH' } - : UseContractWriteConfig & { + : UseContractWriteConfig< + typeof drippieOptimismGoerliABI, + 'withdrawETH', + TMode + > & { abi?: never address?: never chainId?: TChainId - functionName?: 'upgradeAndCall' + functionName?: 'withdrawETH' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'upgradeAndCall', + return useContractWrite< + typeof drippieOptimismGoerliABI, + 'withdrawETH', + TMode + >({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'withdrawETH', ...config, } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function usePrepareProxyAdminWrite( +export function usePrepareDrippieOptimismGoerliWrite< + TFunctionName extends string +>( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig< + typeof drippieOptimismGoerliABI, + TFunctionName + >, 'abi' | 'address' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"changeProxyAdmin"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) - */ -export function usePrepareProxyAdminChangeProxyAdmin( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'changeProxyAdmin', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"renounceOwnership"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) - */ -export function usePrepareProxyAdminRenounceOwnership( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'renounceOwnership', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setAddress"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) - */ -export function usePrepareProxyAdminSetAddress( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'setAddress', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setAddressManager"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"CALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function usePrepareProxyAdminSetAddressManager( +export function usePrepareDrippieOptimismGoerliCall( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'setAddressManager', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'CALL', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setImplementationName"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"DELEGATECALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function usePrepareProxyAdminSetImplementationName( +export function usePrepareDrippieOptimismGoerliDelegatecall( config: Omit< UsePrepareContractWriteConfig< - typeof proxyAdminABI, - 'setImplementationName' + typeof drippieOptimismGoerliABI, + 'DELEGATECALL' >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'setImplementationName', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'DELEGATECALL', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setProxyType"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"create"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function usePrepareProxyAdminSetProxyType( +export function usePrepareDrippieOptimismGoerliCreate( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'setProxyType', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'create', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"setUpgrading"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"drip"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function usePrepareProxyAdminSetUpgrading( +export function usePrepareDrippieOptimismGoerliDrip( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'setUpgrading', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'drip', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"setOwner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function usePrepareProxyAdminTransferOwnership( +export function usePrepareDrippieOptimismGoerliSetOwner( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'transferOwnership', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'setOwner', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"upgrade"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"status"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function usePrepareProxyAdminUpgrade( +export function usePrepareDrippieOptimismGoerliStatus( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'upgrade', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'status', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link proxyAdminABI}__ and `functionName` set to `"upgradeAndCall"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"withdrawERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function usePrepareProxyAdminUpgradeAndCall( +export function usePrepareDrippieOptimismGoerliWithdrawErc20( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig< + typeof drippieOptimismGoerliABI, + 'withdrawERC20' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - functionName: 'upgradeAndCall', + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'withdrawERC20', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link proxyAdminABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"withdrawERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminEvent( +export function usePrepareDrippieOptimismGoerliWithdrawErc721( config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + UsePrepareContractWriteConfig< + typeof drippieOptimismGoerliABI, + 'withdrawERC721' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], + return usePrepareContractWrite({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'withdrawERC721', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link proxyAdminABI}__ and `eventName` set to `"OwnershipTransferred"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `functionName` set to `"withdrawETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x4200000000000000000000000000000000000018) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x4200000000000000000000000000000000000018) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useProxyAdminOwnershipTransferredEvent( +export function usePrepareDrippieOptimismGoerliWithdrawEth( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof proxyAdminAddress } = {} as any + UsePrepareContractWriteConfig< + typeof drippieOptimismGoerliABI, + 'withdrawETH' + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: proxyAdminABI, - address: proxyAdminAddress[chainId as keyof typeof proxyAdminAddress], - eventName: 'OwnershipTransferred', + return usePrepareContractWrite({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + functionName: 'withdrawETH', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieOptimismGoerliABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useSystemConfigRead< - TFunctionName extends string, - TSelectData = ReadContractResult ->( +export function useDrippieOptimismGoerliEvent( config: Omit< - UseContractReadConfig, + UseContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + return useContractEvent({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"UNSAFE_BLOCK_SIGNER_SLOT"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `eventName` set to `"DripCreated"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useSystemConfigUnsafeBlockSignerSlot< - TFunctionName extends 'UNSAFE_BLOCK_SIGNER_SLOT', - TSelectData = ReadContractResult ->( +export function useDrippieOptimismGoerliDripCreatedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'UNSAFE_BLOCK_SIGNER_SLOT', + return useContractEvent({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + eventName: 'DripCreated', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"batcherHash"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `eventName` set to `"DripExecuted"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useSystemConfigBatcherHash< - TFunctionName extends 'batcherHash', - TSelectData = ReadContractResult ->( +export function useDrippieOptimismGoerliDripExecutedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'batcherHash', + return useContractEvent({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + eventName: 'DripExecuted', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"gasLimit"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `eventName` set to `"DripStatusUpdated"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useSystemConfigGasLimit< - TFunctionName extends 'gasLimit', - TSelectData = ReadContractResult ->( +export function useDrippieOptimismGoerliDripStatusUpdatedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + UseContractEventConfig< + typeof drippieOptimismGoerliABI, + 'DripStatusUpdated' + >, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'gasLimit', + return useContractEvent({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + eventName: 'DripStatusUpdated', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"minimumGasLimit"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `eventName` set to `"OwnerUpdated"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useSystemConfigMinimumGasLimit< - TFunctionName extends 'minimumGasLimit', - TSelectData = ReadContractResult ->( +export function useDrippieOptimismGoerliOwnerUpdatedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'minimumGasLimit', + return useContractEvent({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + eventName: 'OwnerUpdated', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"overhead"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `eventName` set to `"ReceivedETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useSystemConfigOverhead< - TFunctionName extends 'overhead', - TSelectData = ReadContractResult ->( +export function useDrippieOptimismGoerliReceivedEthEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'overhead', + return useContractEvent({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + eventName: 'ReceivedETH', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"owner"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `eventName` set to `"WithdrewERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useSystemConfigOwner< - TFunctionName extends 'owner', - TSelectData = ReadContractResult ->( +export function useDrippieOptimismGoerliWithdrewErc20Event( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'owner', + return useContractEvent({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + eventName: 'WithdrewERC20', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"resourceConfig"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `eventName` set to `"WithdrewERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useSystemConfigResourceConfig< - TFunctionName extends 'resourceConfig', - TSelectData = ReadContractResult ->( +export function useDrippieOptimismGoerliWithdrewErc721Event( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'resourceConfig', + return useContractEvent({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + eventName: 'WithdrewERC721', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"scalar"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link drippieOptimismGoerliABI}__ and `eventName` set to `"WithdrewETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x8D8d533C16D23847EB04EEB0925be8900Dd3af86) */ -export function useSystemConfigScalar< - TFunctionName extends 'scalar', - TSelectData = ReadContractResult ->( +export function useDrippieOptimismGoerliWithdrewEthEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof drippieOptimismGoerliAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'scalar', + return useContractEvent({ + abi: drippieOptimismGoerliABI, + address: drippieOptimismGoerliAddress[420], + eventName: 'WithdrewETH', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"unsafeBlockSigner"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link teleportrWithdrawerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigUnsafeBlockSigner< - TFunctionName extends 'unsafeBlockSigner', - TSelectData = ReadContractResult +export function useTeleportrWithdrawerRead< + TFunctionName extends string, + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + UseContractReadConfig< + typeof teleportrWithdrawerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'unsafeBlockSigner', + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"data"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult +export function useTeleportrWithdrawerData< + TFunctionName extends 'data', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof teleportrWithdrawerABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'version', + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'data', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"owner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemConfigAddress +export function useTeleportrWithdrawerOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemConfigABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any + config: Omit< + UseContractReadConfig< + typeof teleportrWithdrawerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + return useContractRead({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'owner', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"initialize"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"recipient"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigInitialize< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemConfigAddress +export function useTeleportrWithdrawerRecipient< + TFunctionName extends 'recipient', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemConfigABI, - 'initialize' - >['request']['abi'], - 'initialize', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'initialize' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof teleportrWithdrawerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'initialize', + return useContractRead({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'recipient', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"renounceOwnership"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"teleportr"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigRenounceOwnership< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemConfigAddress +export function useTeleportrWithdrawerTeleportr< + TFunctionName extends 'teleportr', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemConfigABI, - 'renounceOwnership' - >['request']['abi'], - 'renounceOwnership', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'renounceOwnership' - } - : UseContractWriteConfig< - typeof systemConfigABI, - 'renounceOwnership', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'renounceOwnership' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof teleportrWithdrawerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'renounceOwnership', + return useContractRead({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'teleportr', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setBatcherHash"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigSetBatcherHash< +export function useTeleportrWithdrawerWrite< + TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemConfigAddress + TChainId extends number = keyof typeof teleportrWithdrawerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemConfigABI, - 'setBatcherHash' + typeof teleportrWithdrawerABI, + string >['request']['abi'], - 'setBatcherHash', + TFunctionName, TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'setBatcherHash' - } + > & { address?: Address; chainId?: TChainId } : UseContractWriteConfig< - typeof systemConfigABI, - 'setBatcherHash', + typeof teleportrWithdrawerABI, + TFunctionName, TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'setBatcherHash' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'setBatcherHash', + return useContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setGasConfig"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"CALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigSetGasConfig< +export function useTeleportrWithdrawerCall< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemConfigAddress + TChainId extends number = keyof typeof teleportrWithdrawerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemConfigABI, - 'setGasConfig' + typeof teleportrWithdrawerABI, + 'CALL' >['request']['abi'], - 'setGasConfig', + 'CALL', TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'setGasConfig' - } - : UseContractWriteConfig & { + > & { address?: Address; chainId?: TChainId; functionName?: 'CALL' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'setGasConfig' + functionName?: 'CALL' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'setGasConfig', + return useContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'CALL', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setGasLimit"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"DELEGATECALL"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigSetGasLimit< +export function useTeleportrWithdrawerDelegatecall< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemConfigAddress + TChainId extends number = keyof typeof teleportrWithdrawerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemConfigABI, - 'setGasLimit' + typeof teleportrWithdrawerABI, + 'DELEGATECALL' >['request']['abi'], - 'setGasLimit', + 'DELEGATECALL', TMode > & { address?: Address chainId?: TChainId - functionName?: 'setGasLimit' + functionName?: 'DELEGATECALL' } - : UseContractWriteConfig & { + : UseContractWriteConfig< + typeof teleportrWithdrawerABI, + 'DELEGATECALL', + TMode + > & { abi?: never address?: never chainId?: TChainId - functionName?: 'setGasLimit' + functionName?: 'DELEGATECALL' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'setGasLimit', - ...config, - } as any) + return useContractWrite( + { + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'DELEGATECALL', + ...config, + } as any + ) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setResourceConfig"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"setData"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigSetResourceConfig< +export function useTeleportrWithdrawerSetData< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemConfigAddress + TChainId extends number = keyof typeof teleportrWithdrawerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemConfigABI, - 'setResourceConfig' + typeof teleportrWithdrawerABI, + 'setData' >['request']['abi'], - 'setResourceConfig', + 'setData', TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'setResourceConfig' - } + > & { address?: Address; chainId?: TChainId; functionName?: 'setData' } : UseContractWriteConfig< - typeof systemConfigABI, - 'setResourceConfig', + typeof teleportrWithdrawerABI, + 'setData', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'setResourceConfig' + functionName?: 'setData' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'setResourceConfig', + return useContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'setData', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setUnsafeBlockSigner"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"setOwner"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigSetUnsafeBlockSigner< +export function useTeleportrWithdrawerSetOwner< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemConfigAddress + TChainId extends number = keyof typeof teleportrWithdrawerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemConfigABI, - 'setUnsafeBlockSigner' + typeof teleportrWithdrawerABI, + 'setOwner' >['request']['abi'], - 'setUnsafeBlockSigner', + 'setOwner', TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'setUnsafeBlockSigner' - } + > & { address?: Address; chainId?: TChainId; functionName?: 'setOwner' } : UseContractWriteConfig< - typeof systemConfigABI, - 'setUnsafeBlockSigner', + typeof teleportrWithdrawerABI, + 'setOwner', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'setUnsafeBlockSigner' + functionName?: 'setOwner' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite< - typeof systemConfigABI, - 'setUnsafeBlockSigner', - TMode - >({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'setUnsafeBlockSigner', + return useContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'setOwner', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"setRecipient"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigTransferOwnership< +export function useTeleportrWithdrawerSetRecipient< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemConfigAddress + TChainId extends number = keyof typeof teleportrWithdrawerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemConfigABI, - 'transferOwnership' + typeof teleportrWithdrawerABI, + 'setRecipient' >['request']['abi'], - 'transferOwnership', + 'setRecipient', TMode > & { address?: Address chainId?: TChainId - functionName?: 'transferOwnership' + functionName?: 'setRecipient' } : UseContractWriteConfig< - typeof systemConfigABI, - 'transferOwnership', + typeof teleportrWithdrawerABI, + 'setRecipient', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'transferOwnership' + functionName?: 'setRecipient' } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'transferOwnership', - ...config, - } as any) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) - */ -export function usePrepareSystemConfigWrite( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"initialize"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) - */ -export function usePrepareSystemConfigInitialize( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'initialize', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"renounceOwnership"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) - */ -export function usePrepareSystemConfigRenounceOwnership( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'renounceOwnership', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setBatcherHash"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) - */ -export function usePrepareSystemConfigSetBatcherHash( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'setBatcherHash', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setGasConfig"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) - */ -export function usePrepareSystemConfigSetGasConfig( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'setGasConfig', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setGasLimit"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) - */ -export function usePrepareSystemConfigSetGasLimit( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'setGasLimit', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setResourceConfig"`. - * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) - */ -export function usePrepareSystemConfigSetResourceConfig( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'setResourceConfig', - ...config, - } as UsePrepareContractWriteConfig) + return useContractWrite( + { + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'setRecipient', + ...config, + } as any + ) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"setUnsafeBlockSigner"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"setTeleportr"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function usePrepareSystemConfigSetUnsafeBlockSigner( - config: Omit< - UsePrepareContractWriteConfig< - typeof systemConfigABI, - 'setUnsafeBlockSigner' - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any -) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'setUnsafeBlockSigner', - ...config, - } as UsePrepareContractWriteConfig) +export function useTeleportrWithdrawerSetTeleportr< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof teleportrWithdrawerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof teleportrWithdrawerABI, + 'setTeleportr' + >['request']['abi'], + 'setTeleportr', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setTeleportr' + } + : UseContractWriteConfig< + typeof teleportrWithdrawerABI, + 'setTeleportr', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setTeleportr' + } = {} as any +) { + return useContractWrite( + { + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'setTeleportr', + ...config, + } as any + ) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemConfigABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"withdrawERC20"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function usePrepareSystemConfigTransferOwnership( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any +export function useTeleportrWithdrawerWithdrawErc20< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof teleportrWithdrawerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof teleportrWithdrawerABI, + 'withdrawERC20' + >['request']['abi'], + 'withdrawERC20', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawERC20' + } + : UseContractWriteConfig< + typeof teleportrWithdrawerABI, + 'withdrawERC20', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'withdrawERC20' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - functionName: 'transferOwnership', + return useContractWrite< + typeof teleportrWithdrawerABI, + 'withdrawERC20', + TMode + >({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'withdrawERC20', ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemConfigABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"withdrawERC721"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any +export function useTeleportrWithdrawerWithdrawErc721< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof teleportrWithdrawerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof teleportrWithdrawerABI, + 'withdrawERC721' + >['request']['abi'], + 'withdrawERC721', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawERC721' + } + : UseContractWriteConfig< + typeof teleportrWithdrawerABI, + 'withdrawERC721', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'withdrawERC721' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], + return useContractWrite< + typeof teleportrWithdrawerABI, + 'withdrawERC721', + TMode + >({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'withdrawERC721', ...config, - } as UseContractEventConfig) + } as any) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemConfigABI}__ and `eventName` set to `"ConfigUpdate"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"withdrawETH"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigConfigUpdateEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any +export function useTeleportrWithdrawerWithdrawEth< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof teleportrWithdrawerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof teleportrWithdrawerABI, + 'withdrawETH' + >['request']['abi'], + 'withdrawETH', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawETH' + } + : UseContractWriteConfig< + typeof teleportrWithdrawerABI, + 'withdrawETH', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'withdrawETH' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - eventName: 'ConfigUpdate', + return useContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'withdrawETH', ...config, - } as UseContractEventConfig) + } as any) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemConfigABI}__ and `eventName` set to `"Initialized"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"withdrawFromTeleportr"`. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigInitializedEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any +export function useTeleportrWithdrawerWithdrawFromTeleportr< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof teleportrWithdrawerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof teleportrWithdrawerABI, + 'withdrawFromTeleportr' + >['request']['abi'], + 'withdrawFromTeleportr', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'withdrawFromTeleportr' + } + : UseContractWriteConfig< + typeof teleportrWithdrawerABI, + 'withdrawFromTeleportr', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'withdrawFromTeleportr' + } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - eventName: 'Initialized', + return useContractWrite< + typeof teleportrWithdrawerABI, + 'withdrawFromTeleportr', + TMode + >({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'withdrawFromTeleportr', ...config, - } as UseContractEventConfig) + } as any) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemConfigABI}__ and `eventName` set to `"OwnershipTransferred"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__. * - * - [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290) - * - [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemConfigOwnershipTransferredEvent( +export function usePrepareTeleportrWithdrawerWrite< + TFunctionName extends string +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof systemConfigAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - const { chain } = useNetwork() - const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: systemConfigABI, - address: systemConfigAddress[chainId as keyof typeof systemConfigAddress], - eventName: 'OwnershipTransferred', + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"CALL"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorRead< - TFunctionName extends string, - TSelectData = ReadContractResult ->( +export function usePrepareTeleportrWithdrawerCall( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'CALL', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"EXIT_1_NO_RETURN_STEP"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"DELEGATECALL"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorExit_1NoReturnStep< - TFunctionName extends 'EXIT_1_NO_RETURN_STEP', - TSelectData = ReadContractResult ->( +export function usePrepareTeleportrWithdrawerDelegatecall( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig< + typeof teleportrWithdrawerABI, + 'DELEGATECALL' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'EXIT_1_NO_RETURN_STEP', + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'DELEGATECALL', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"PROXY_TRANSFER_STEP"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"setData"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorProxyTransferStep< - TFunctionName extends 'PROXY_TRANSFER_STEP', - TSelectData = ReadContractResult ->( +export function usePrepareTeleportrWithdrawerSetData( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'PROXY_TRANSFER_STEP', + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'setData', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"config"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"setOwner"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorConfig< - TFunctionName extends 'config', - TSelectData = ReadContractResult ->( +export function usePrepareTeleportrWithdrawerSetOwner( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'config', + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'setOwner', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"currentStep"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"setRecipient"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorCurrentStep< - TFunctionName extends 'currentStep', - TSelectData = ReadContractResult ->( +export function usePrepareTeleportrWithdrawerSetRecipient( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig< + typeof teleportrWithdrawerABI, + 'setRecipient' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'currentStep', + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'setRecipient', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"dynamicConfigSet"`. - * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) - */ -export function useSystemDictatorDynamicConfigSet< - TFunctionName extends 'dynamicConfigSet', - TSelectData = ReadContractResult ->( + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"setTeleportr"`. + * + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) + */ +export function usePrepareTeleportrWithdrawerSetTeleportr( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig< + typeof teleportrWithdrawerABI, + 'setTeleportr' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'dynamicConfigSet', + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'setTeleportr', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"exited"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"withdrawERC20"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorExited< - TFunctionName extends 'exited', - TSelectData = ReadContractResult ->( +export function usePrepareTeleportrWithdrawerWithdrawErc20( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig< + typeof teleportrWithdrawerABI, + 'withdrawERC20' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'exited', + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'withdrawERC20', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"finalized"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"withdrawERC721"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorFinalized< - TFunctionName extends 'finalized', - TSelectData = ReadContractResult ->( +export function usePrepareTeleportrWithdrawerWithdrawErc721( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig< + typeof teleportrWithdrawerABI, + 'withdrawERC721' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'finalized', + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'withdrawERC721', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"l2OutputOracleDynamicConfig"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"withdrawETH"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorL2OutputOracleDynamicConfig< - TFunctionName extends 'l2OutputOracleDynamicConfig', - TSelectData = ReadContractResult ->( +export function usePrepareTeleportrWithdrawerWithdrawEth( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'l2OutputOracleDynamicConfig', + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'withdrawETH', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"oldL1CrossDomainMessenger"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `functionName` set to `"withdrawFromTeleportr"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorOldL1CrossDomainMessenger< - TFunctionName extends 'oldL1CrossDomainMessenger', - TSelectData = ReadContractResult ->( +export function usePrepareTeleportrWithdrawerWithdrawFromTeleportr( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig< + typeof teleportrWithdrawerABI, + 'withdrawFromTeleportr' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'oldL1CrossDomainMessenger', + return usePrepareContractWrite({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + functionName: 'withdrawFromTeleportr', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"optimismPortalDynamicConfig"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link teleportrWithdrawerABI}__. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorOptimismPortalDynamicConfig< - TFunctionName extends 'optimismPortalDynamicConfig', - TSelectData = ReadContractResult ->( +export function useTeleportrWithdrawerEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'optimismPortalDynamicConfig', + return useContractEvent({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"owner"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `eventName` set to `"OwnerUpdated"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorOwner< - TFunctionName extends 'owner', - TSelectData = ReadContractResult ->( +export function useTeleportrWithdrawerOwnerUpdatedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractRead({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'owner', + return useContractEvent({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + eventName: 'OwnerUpdated', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `eventName` set to `"ReceivedETH"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any +export function useTeleportrWithdrawerReceivedEthEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], + return useContractEvent({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + eventName: 'ReceivedETH', ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"exit1"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `eventName` set to `"WithdrewERC20"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorExit1< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - 'exit1' - >['request']['abi'], - 'exit1', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'exit1' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'exit1' - } = {} as any +export function useTeleportrWithdrawerWithdrewErc20Event( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'exit1', + return useContractEvent({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + eventName: 'WithdrewERC20', ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"finalize"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `eventName` set to `"WithdrewERC721"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorFinalize< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - 'finalize' - >['request']['abi'], - 'finalize', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'finalize' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'finalize' - } = {} as any +export function useTeleportrWithdrawerWithdrewErc721Event( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'finalize', + return useContractEvent({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + eventName: 'WithdrewERC721', ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"initialize"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link teleportrWithdrawerABI}__ and `eventName` set to `"WithdrewETH"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0x78A25524D90E3D0596558fb43789bD800a5c3007) */ -export function useSystemDictatorInitialize< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - 'initialize' - >['request']['abi'], - 'initialize', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'initialize' - } = {} as any +export function useTeleportrWithdrawerWithdrewEthEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof teleportrWithdrawerAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'initialize', + return useContractEvent({ + abi: teleportrWithdrawerABI, + address: teleportrWithdrawerAddress[1], + eventName: 'WithdrewETH', ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"phase1"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorPhase1< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress +export function useMintManagerRead< + TFunctionName extends string, + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - 'phase1' - >['request']['abi'], - 'phase1', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'phase1' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'phase1' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'phase1', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"phase2"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"DENOMINATOR"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorPhase2< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress +export function useMintManagerDenominator< + TFunctionName extends 'DENOMINATOR', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - 'phase2' - >['request']['abi'], - 'phase2', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'phase2' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'phase2' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'phase2', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'DENOMINATOR', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"renounceOwnership"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"MINT_CAP"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorRenounceOwnership< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress +export function useMintManagerMintCap< + TFunctionName extends 'MINT_CAP', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - 'renounceOwnership' - >['request']['abi'], - 'renounceOwnership', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'renounceOwnership' - } - : UseContractWriteConfig< - typeof systemDictatorABI, - 'renounceOwnership', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'renounceOwnership' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { - return useContractWrite( - { - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'renounceOwnership', - ...config, - } as any - ) + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'MINT_CAP', + ...config, + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step1"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"MINT_PERIOD"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorStep1< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress +export function useMintManagerMintPeriod< + TFunctionName extends 'MINT_PERIOD', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - 'step1' - >['request']['abi'], - 'step1', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step1' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'step1' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'step1', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'MINT_PERIOD', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step2"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"governanceToken"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorStep2< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress +export function useMintManagerGovernanceToken< + TFunctionName extends 'governanceToken', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - 'step2' - >['request']['abi'], - 'step2', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step2' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'step2' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'step2', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'governanceToken', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step3"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"mintPermittedAfter"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorStep3< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress +export function useMintManagerMintPermittedAfter< + TFunctionName extends 'mintPermittedAfter', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - 'step3' - >['request']['abi'], - 'step3', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step3' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'step3' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'step3', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'mintPermittedAfter', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step4"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"owner"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorStep4< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress +export function useMintManagerOwner< + TFunctionName extends 'owner', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorABI, - 'step4' - >['request']['abi'], - 'step4', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step4' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'step4' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'step4', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'owner', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step5"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link mintManagerABI}__. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorStep5< +export function useMintManagerWrite< + TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress + TChainId extends number = keyof typeof mintManagerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemDictatorABI, - 'step5' + typeof mintManagerABI, + string >['request']['abi'], - 'step5', + TFunctionName, TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step5' } - : UseContractWriteConfig & { + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'step5' } = {} as any ) { - return useContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'step5', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"mint"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorTransferOwnership< +export function useMintManagerMint< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress + TChainId extends number = keyof typeof mintManagerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemDictatorABI, - 'transferOwnership' + typeof mintManagerABI, + 'mint' >['request']['abi'], - 'transferOwnership', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'transferOwnership' - } - : UseContractWriteConfig< - typeof systemDictatorABI, - 'transferOwnership', + 'mint', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'mint' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'transferOwnership' + functionName?: 'mint' } = {} as any ) { - return useContractWrite( - { - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'transferOwnership', - ...config, - } as any - ) + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'mint', + ...config, + } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"updateDynamicConfig"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"renounceOwnership"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorUpdateDynamicConfig< +export function useMintManagerRenounceOwnership< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorAddress + TChainId extends number = keyof typeof mintManagerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemDictatorABI, - 'updateDynamicConfig' + typeof mintManagerABI, + 'renounceOwnership' >['request']['abi'], - 'updateDynamicConfig', + 'renounceOwnership', TMode > & { address?: Address chainId?: TChainId - functionName?: 'updateDynamicConfig' + functionName?: 'renounceOwnership' } : UseContractWriteConfig< - typeof systemDictatorABI, - 'updateDynamicConfig', + typeof mintManagerABI, + 'renounceOwnership', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'updateDynamicConfig' + functionName?: 'renounceOwnership' } = {} as any ) { - return useContractWrite< - typeof systemDictatorABI, - 'updateDynamicConfig', - TMode - >({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'updateDynamicConfig', - ...config, - } as any) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__. - * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) - */ -export function usePrepareSystemDictatorWrite( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any -) { - return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"exit1"`. - * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) - */ -export function usePrepareSystemDictatorExit1( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any -) { - return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'exit1', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"finalize"`. - * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) - */ -export function usePrepareSystemDictatorFinalize( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any -) { - return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'finalize', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"initialize"`. - * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) - */ -export function usePrepareSystemDictatorInitialize( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any -) { - return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'initialize', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"phase1"`. - * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) - */ -export function usePrepareSystemDictatorPhase1( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any -) { - return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'phase1', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"phase2"`. - * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) - */ -export function usePrepareSystemDictatorPhase2( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any -) { - return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'phase2', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"renounceOwnership"`. - * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) - */ -export function usePrepareSystemDictatorRenounceOwnership( - config: Omit< - UsePrepareContractWriteConfig< - typeof systemDictatorABI, - 'renounceOwnership' - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any -) { - return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], functionName: 'renounceOwnership', ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step1"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"transferOwnership"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function usePrepareSystemDictatorStep1( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any +export function useMintManagerTransferOwnership< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof mintManagerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof mintManagerABI, + 'transferOwnership' + >['request']['abi'], + 'transferOwnership', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'transferOwnership' + } + : UseContractWriteConfig< + typeof mintManagerABI, + 'transferOwnership', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'transferOwnership' + } = {} as any ) { - return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'step1', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'transferOwnership', ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step2"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"upgrade"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function usePrepareSystemDictatorStep2( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any +export function useMintManagerUpgrade< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof mintManagerAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof mintManagerABI, + 'upgrade' + >['request']['abi'], + 'upgrade', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'upgrade' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'upgrade' + } = {} as any ) { - return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'step2', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'upgrade', ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step3"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link mintManagerABI}__. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function usePrepareSystemDictatorStep3( +export function usePrepareMintManagerWrite( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'step3', + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step4"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"mint"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function usePrepareSystemDictatorStep4( +export function usePrepareMintManagerMint( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'step4', + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'mint', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"step5"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"renounceOwnership"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function usePrepareSystemDictatorStep5( +export function usePrepareMintManagerRenounceOwnership( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'step5', + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'renounceOwnership', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"transferOwnership"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function usePrepareSystemDictatorTransferOwnership( +export function usePrepareMintManagerTransferOwnership( config: Omit< - UsePrepareContractWriteConfig< - typeof systemDictatorABI, - 'transferOwnership' - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], functionName: 'transferOwnership', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorABI}__ and `functionName` set to `"updateDynamicConfig"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"upgrade"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function usePrepareSystemDictatorUpdateDynamicConfig( +export function usePrepareMintManagerUpgrade( config: Omit< - UsePrepareContractWriteConfig< - typeof systemDictatorABI, - 'updateDynamicConfig' - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - functionName: 'updateDynamicConfig', + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + functionName: 'upgrade', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link mintManagerABI}__. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorEvent( +export function useMintManagerEvent( config: Omit< - UseContractEventConfig, + UseContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any -) { - return useContractEvent({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - ...config, - } as UseContractEventConfig) -} - -/** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorABI}__ and `eventName` set to `"Initialized"`. - * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) - */ -export function useSystemDictatorInitializedEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractEvent({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], - eventName: 'Initialized', + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], ...config, - } as UseContractEventConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorABI}__ and `eventName` set to `"OwnershipTransferred"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link mintManagerABI}__ and `eventName` set to `"OwnershipTransferred"`. * - * [__View Contract on Ethereum Etherscan__](https://etherscan.io/address/0xB4453CEb33d2e67FA244A24acf2E50CEF31F53cB) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) */ -export function useSystemDictatorOwnershipTransferredEvent( +export function useMintManagerOwnershipTransferredEvent( config: Omit< - UseContractEventConfig, + UseContractEventConfig, 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof systemDictatorAddress } = {} as any + > & { chainId?: keyof typeof mintManagerAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractEvent({ - abi: systemDictatorABI, - address: systemDictatorAddress[1], + abi: mintManagerABI, + address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], eventName: 'OwnershipTransferred', ...config, - } as UseContractEventConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliRead< +export function useOptimismMintableErc721FactoryRead< TFunctionName extends string, TSelectData = ReadContractResult< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryABI, TFunctionName > >( config: Omit< UseContractReadConfig< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryABI, TFunctionName, TSelectData >, 'abi' | 'address' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { + chainId?: keyof typeof optimismMintableErc721FactoryAddress + } = {} as any ) { return useContractRead({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"EXIT_1_NO_RETURN_STEP"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"bridge"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliExit_1NoReturnStep< - TFunctionName extends 'EXIT_1_NO_RETURN_STEP', +export function useOptimismMintableErc721FactoryBridge< + TFunctionName extends 'bridge', TSelectData = ReadContractResult< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryABI, TFunctionName > >( config: Omit< UseContractReadConfig< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryABI, TFunctionName, TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { + chainId?: keyof typeof optimismMintableErc721FactoryAddress + } = {} as any ) { return useContractRead({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'EXIT_1_NO_RETURN_STEP', + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], + functionName: 'bridge', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"PROXY_TRANSFER_STEP"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"isOptimismMintableERC721"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliProxyTransferStep< - TFunctionName extends 'PROXY_TRANSFER_STEP', +export function useOptimismMintableErc721FactoryIsOptimismMintableErc721< + TFunctionName extends 'isOptimismMintableERC721', TSelectData = ReadContractResult< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryABI, TFunctionName > >( config: Omit< UseContractReadConfig< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryABI, TFunctionName, TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { + chainId?: keyof typeof optimismMintableErc721FactoryAddress + } = {} as any ) { return useContractRead({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'PROXY_TRANSFER_STEP', + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], + functionName: 'isOptimismMintableERC721', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"config"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"remoteChainId"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliConfig< - TFunctionName extends 'config', +export function useOptimismMintableErc721FactoryRemoteChainId< + TFunctionName extends 'remoteChainId', TSelectData = ReadContractResult< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryABI, TFunctionName > >( config: Omit< UseContractReadConfig< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryABI, TFunctionName, TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { + chainId?: keyof typeof optimismMintableErc721FactoryAddress + } = {} as any ) { return useContractRead({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'config', + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], + functionName: 'remoteChainId', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"version"`. + * + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export function useOptimismMintableErc721FactoryVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult< + typeof optimismMintableErc721FactoryABI, + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof optimismMintableErc721FactoryABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryAddress + } = {} as any +) { + return useContractRead({ + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], + functionName: 'version', + ...config, + } as UseContractReadConfig) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export function useOptimismMintableErc721FactoryWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismMintableErc721FactoryAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismMintableErc721FactoryABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig< + typeof optimismMintableErc721FactoryABI, + TFunctionName, + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + return useContractWrite< + typeof optimismMintableErc721FactoryABI, + TFunctionName, + TMode + >({ + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"createOptimismMintableERC721"`. + * + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export function useOptimismMintableErc721FactoryCreateOptimismMintableErc721< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimismMintableErc721FactoryAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimismMintableErc721FactoryABI, + 'createOptimismMintableERC721' + >['request']['abi'], + 'createOptimismMintableERC721', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'createOptimismMintableERC721' + } + : UseContractWriteConfig< + typeof optimismMintableErc721FactoryABI, + 'createOptimismMintableERC721', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'createOptimismMintableERC721' + } = {} as any +) { + return useContractWrite< + typeof optimismMintableErc721FactoryABI, + 'createOptimismMintableERC721', + TMode + >({ + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], + functionName: 'createOptimismMintableERC721', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export function usePrepareOptimismMintableErc721FactoryWrite< + TFunctionName extends string +>( + config: Omit< + UsePrepareContractWriteConfig< + typeof optimismMintableErc721FactoryABI, + TFunctionName + >, + 'abi' | 'address' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryAddress + } = {} as any +) { + return usePrepareContractWrite({ + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"createOptimismMintableERC721"`. + * + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + */ +export function usePrepareOptimismMintableErc721FactoryCreateOptimismMintableErc721( + config: Omit< + UsePrepareContractWriteConfig< + typeof optimismMintableErc721FactoryABI, + 'createOptimismMintableERC721' + >, + 'abi' | 'address' | 'functionName' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryAddress + } = {} as any +) { + return usePrepareContractWrite({ + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], + functionName: 'createOptimismMintableERC721', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"currentStep"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliCurrentStep< - TFunctionName extends 'currentStep', - TSelectData = ReadContractResult< - typeof systemDictatorGoerliABI, - TFunctionName - > +export function useOptimismMintableErc721FactoryEvent< + TEventName extends string >( config: Omit< - UseContractReadConfig< - typeof systemDictatorGoerliABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryAddress + } = {} as any ) { - return useContractRead({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'currentStep', + return useContractEvent({ + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"dynamicConfigSet"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `eventName` set to `"OptimismMintableERC721Created"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliDynamicConfigSet< - TFunctionName extends 'dynamicConfigSet', - TSelectData = ReadContractResult< - typeof systemDictatorGoerliABI, - TFunctionName - > ->( +export function useOptimismMintableErc721FactoryOptimismMintableErc721CreatedEvent( config: Omit< - UseContractReadConfig< - typeof systemDictatorGoerliABI, - TFunctionName, - TSelectData + UseContractEventConfig< + typeof optimismMintableErc721FactoryABI, + 'OptimismMintableERC721Created' >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + 'abi' | 'address' | 'eventName' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryAddress + } = {} as any ) { - return useContractRead({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'dynamicConfigSet', + return useContractEvent({ + abi: optimismMintableErc721FactoryABI, + address: optimismMintableErc721FactoryAddress[10], + eventName: 'OptimismMintableERC721Created', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"finalized"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliFinalized< - TFunctionName extends 'finalized', +export function useOptimismMintableErc721FactoryOptimismGoerliRead< + TFunctionName extends string, TSelectData = ReadContractResult< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryOptimismGoerliABI, TFunctionName > >( config: Omit< UseContractReadConfig< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryOptimismGoerliABI, TFunctionName, TSelectData >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + 'abi' | 'address' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + } = {} as any ) { return useContractRead({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'finalized', + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"l2OutputOracleDynamicConfig"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"BRIDGE"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliL2OutputOracleDynamicConfig< - TFunctionName extends 'l2OutputOracleDynamicConfig', +export function useOptimismMintableErc721FactoryOptimismGoerliBridge< + TFunctionName extends 'BRIDGE', TSelectData = ReadContractResult< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryOptimismGoerliABI, TFunctionName > >( config: Omit< UseContractReadConfig< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryOptimismGoerliABI, TFunctionName, TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + } = {} as any ) { return useContractRead({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'l2OutputOracleDynamicConfig', + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + functionName: 'BRIDGE', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"oldL1CrossDomainMessenger"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"REMOTE_CHAIN_ID"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliOldL1CrossDomainMessenger< - TFunctionName extends 'oldL1CrossDomainMessenger', +export function useOptimismMintableErc721FactoryOptimismGoerliRemoteChainId< + TFunctionName extends 'REMOTE_CHAIN_ID', TSelectData = ReadContractResult< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryOptimismGoerliABI, TFunctionName > >( config: Omit< UseContractReadConfig< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryOptimismGoerliABI, TFunctionName, TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + } = {} as any ) { return useContractRead({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'oldL1CrossDomainMessenger', + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + functionName: 'REMOTE_CHAIN_ID', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"owner"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"isOptimismMintableERC721"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliOwner< - TFunctionName extends 'owner', +export function useOptimismMintableErc721FactoryOptimismGoerliIsOptimismMintableErc721< + TFunctionName extends 'isOptimismMintableERC721', TSelectData = ReadContractResult< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryOptimismGoerliABI, TFunctionName > >( config: Omit< UseContractReadConfig< - typeof systemDictatorGoerliABI, + typeof optimismMintableErc721FactoryOptimismGoerliABI, TFunctionName, TSelectData >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + } = {} as any ) { return useContractRead({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'owner', - ...config, - } as UseContractReadConfig) -} - -/** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__. - * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) - */ -export function useSystemDictatorGoerliWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig< - typeof systemDictatorGoerliABI, - TFunctionName, - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any -) { - return useContractWrite( - { - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - ...config, - } as any - ) -} - -/** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"exit1"`. - * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) - */ -export function useSystemDictatorGoerliExit1< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'exit1' - >['request']['abi'], - 'exit1', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'exit1' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'exit1' - } = {} as any -) { - return useContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'exit1', + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + functionName: 'isOptimismMintableERC721', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"finalize"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliFinalize< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress +export function useOptimismMintableErc721FactoryOptimismGoerliVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult< + typeof optimismMintableErc721FactoryOptimismGoerliABI, + TFunctionName + > >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'finalize' - >['request']['abi'], - 'finalize', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'finalize' } - : UseContractWriteConfig< - typeof systemDictatorGoerliABI, - 'finalize', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'finalize' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof optimismMintableErc721FactoryOptimismGoerliABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + } = {} as any ) { - return useContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'finalize', + return useContractRead({ + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + functionName: 'version', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"initialize"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliInitialize< +export function useOptimismMintableErc721FactoryOptimismGoerliWrite< + TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress + TChainId extends number = keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'initialize' + typeof optimismMintableErc721FactoryOptimismGoerliABI, + string >['request']['abi'], - 'initialize', + TFunctionName, TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } + > & { address?: Address; chainId?: TChainId } : UseContractWriteConfig< - typeof systemDictatorGoerliABI, - 'initialize', + typeof optimismMintableErc721FactoryOptimismGoerliABI, + TFunctionName, TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'initialize' } = {} as any ) { - return useContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'initialize', + return useContractWrite< + typeof optimismMintableErc721FactoryOptimismGoerliABI, + TFunctionName, + TMode + >({ + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"renounceOwnership"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"createOptimismMintableERC721"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliRenounceOwnership< +export function useOptimismMintableErc721FactoryOptimismGoerliCreateOptimismMintableErc721< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress + TChainId extends number = keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'renounceOwnership' + typeof optimismMintableErc721FactoryOptimismGoerliABI, + 'createOptimismMintableERC721' >['request']['abi'], - 'renounceOwnership', + 'createOptimismMintableERC721', TMode > & { address?: Address chainId?: TChainId - functionName?: 'renounceOwnership' + functionName?: 'createOptimismMintableERC721' } : UseContractWriteConfig< - typeof systemDictatorGoerliABI, - 'renounceOwnership', + typeof optimismMintableErc721FactoryOptimismGoerliABI, + 'createOptimismMintableERC721', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'renounceOwnership' + functionName?: 'createOptimismMintableERC721' } = {} as any ) { return useContractWrite< - typeof systemDictatorGoerliABI, - 'renounceOwnership', + typeof optimismMintableErc721FactoryOptimismGoerliABI, + 'createOptimismMintableERC721', TMode >({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'renounceOwnership', + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + functionName: 'createOptimismMintableERC721', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step1"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliStep1< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress +export function usePrepareOptimismMintableErc721FactoryOptimismGoerliWrite< + TFunctionName extends string >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'step1' - >['request']['abi'], - 'step1', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step1' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'step1' - } = {} as any + config: Omit< + UsePrepareContractWriteConfig< + typeof optimismMintableErc721FactoryOptimismGoerliABI, + TFunctionName + >, + 'abi' | 'address' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + } = {} as any ) { - return useContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step1', + return usePrepareContractWrite({ + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], ...config, - } as any) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step2"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"createOptimismMintableERC721"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliStep2< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress ->( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'step2' - >['request']['abi'], - 'step2', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step2' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'step2' - } = {} as any +export function usePrepareOptimismMintableErc721FactoryOptimismGoerliCreateOptimismMintableErc721( + config: Omit< + UsePrepareContractWriteConfig< + typeof optimismMintableErc721FactoryOptimismGoerliABI, + 'createOptimismMintableERC721' + >, + 'abi' | 'address' | 'functionName' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + } = {} as any ) { - return useContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step2', + return usePrepareContractWrite({ + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + functionName: 'createOptimismMintableERC721', ...config, - } as any) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step3"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) */ -export function useSystemDictatorGoerliStep3< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress +export function useOptimismMintableErc721FactoryOptimismGoerliEvent< + TEventName extends string >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'step3' - >['request']['abi'], - 'step3', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step3' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'step3' - } = {} as any + config: Omit< + UseContractEventConfig< + typeof optimismMintableErc721FactoryOptimismGoerliABI, + TEventName + >, + 'abi' | 'address' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + } = {} as any ) { - return useContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step3', + return useContractEvent({ + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step4"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `eventName` set to `"OptimismMintableERC721Created"`. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + */ +export function useOptimismMintableErc721FactoryOptimismGoerliOptimismMintableErc721CreatedEvent( + config: Omit< + UseContractEventConfig< + typeof optimismMintableErc721FactoryOptimismGoerliABI, + 'OptimismMintableERC721Created' + >, + 'abi' | 'address' | 'eventName' + > & { + chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + } = {} as any +) { + return useContractEvent({ + abi: optimismMintableErc721FactoryOptimismGoerliABI, + address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + eventName: 'OptimismMintableERC721Created', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link attestationStationABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function useSystemDictatorGoerliStep4< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress +export function useAttestationStationRead< + TFunctionName extends string, + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'step4' - >['request']['abi'], - 'step4', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step4' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'step4' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof attestationStationABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof attestationStationAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step4', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: attestationStationABI, + address: + attestationStationAddress[ + chainId as keyof typeof attestationStationAddress + ], ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step5"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link attestationStationABI}__ and `functionName` set to `"attestations"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function useSystemDictatorGoerliStep5< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress +export function useAttestationStationAttestations< + TFunctionName extends 'attestations', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'step5' - >['request']['abi'], - 'step5', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step5' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'step5' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof attestationStationABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof attestationStationAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step5', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: attestationStationABI, + address: + attestationStationAddress[ + chainId as keyof typeof attestationStationAddress + ], + functionName: 'attestations', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step6"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link attestationStationABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function useSystemDictatorGoerliStep6< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress +export function useAttestationStationVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'step6' - >['request']['abi'], - 'step6', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'step6' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'step6' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof attestationStationABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof attestationStationAddress } = {} as any ) { - return useContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step6', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: attestationStationABI, + address: + attestationStationAddress[ + chainId as keyof typeof attestationStationAddress + ], + functionName: 'version', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link attestationStationABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function useSystemDictatorGoerliTransferOwnership< +export function useAttestationStationWrite< + TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress + TChainId extends number = keyof typeof attestationStationAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'transferOwnership' + typeof attestationStationABI, + string >['request']['abi'], - 'transferOwnership', + TFunctionName, TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'transferOwnership' - } + > & { address?: Address; chainId?: TChainId } : UseContractWriteConfig< - typeof systemDictatorGoerliABI, - 'transferOwnership', + typeof attestationStationABI, + TFunctionName, TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'transferOwnership' } = {} as any ) { - return useContractWrite< - typeof systemDictatorGoerliABI, - 'transferOwnership', - TMode - >({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'transferOwnership', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: attestationStationABI, + address: + attestationStationAddress[ + chainId as keyof typeof attestationStationAddress + ], ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"updateL2OutputOracleDynamicConfig"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link attestationStationABI}__ and `functionName` set to `"attest"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function useSystemDictatorGoerliUpdateL2OutputOracleDynamicConfig< +export function useAttestationStationAttest< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof systemDictatorGoerliAddress + TChainId extends number = keyof typeof attestationStationAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof systemDictatorGoerliABI, - 'updateL2OutputOracleDynamicConfig' + typeof attestationStationABI, + 'attest' >['request']['abi'], - 'updateL2OutputOracleDynamicConfig', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'updateL2OutputOracleDynamicConfig' - } - : UseContractWriteConfig< - typeof systemDictatorGoerliABI, - 'updateL2OutputOracleDynamicConfig', + 'attest', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'attest' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'updateL2OutputOracleDynamicConfig' + functionName?: 'attest' } = {} as any ) { - return useContractWrite< - typeof systemDictatorGoerliABI, - 'updateL2OutputOracleDynamicConfig', - TMode - >({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'updateL2OutputOracleDynamicConfig', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: attestationStationABI, + address: + attestationStationAddress[ + chainId as keyof typeof attestationStationAddress + ], + functionName: 'attest', ...config, } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link attestationStationABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function usePrepareSystemDictatorGoerliWrite< - TFunctionName extends string ->( +export function usePrepareAttestationStationWrite( config: Omit< - UsePrepareContractWriteConfig< - typeof systemDictatorGoerliABI, - TFunctionName - >, + UsePrepareContractWriteConfig, 'abi' | 'address' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any -) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"exit1"`. - * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) - */ -export function usePrepareSystemDictatorGoerliExit1( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any -) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'exit1', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"finalize"`. - * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) - */ -export function usePrepareSystemDictatorGoerliFinalize( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any -) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'finalize', - ...config, - } as UsePrepareContractWriteConfig) -} - -/** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"initialize"`. - * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) - */ -export function usePrepareSystemDictatorGoerliInitialize( - config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { chainId?: keyof typeof attestationStationAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'initialize', + abi: attestationStationABI, + address: + attestationStationAddress[ + chainId as keyof typeof attestationStationAddress + ], ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"renounceOwnership"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link attestationStationABI}__ and `functionName` set to `"attest"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function usePrepareSystemDictatorGoerliRenounceOwnership( +export function usePrepareAttestationStationAttest( config: Omit< - UsePrepareContractWriteConfig< - typeof systemDictatorGoerliABI, - 'renounceOwnership' - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { chainId?: keyof typeof attestationStationAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'renounceOwnership', + abi: attestationStationABI, + address: + attestationStationAddress[ + chainId as keyof typeof attestationStationAddress + ], + functionName: 'attest', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step1"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link attestationStationABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function usePrepareSystemDictatorGoerliStep1( +export function useAttestationStationEvent( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof attestationStationAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step1', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: attestationStationABI, + address: + attestationStationAddress[ + chainId as keyof typeof attestationStationAddress + ], ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step2"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link attestationStationABI}__ and `eventName` set to `"AttestationCreated"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77) */ -export function usePrepareSystemDictatorGoerliStep2( +export function useAttestationStationAttestationCreatedEvent( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof attestationStationAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step2', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: attestationStationABI, + address: + attestationStationAddress[ + chainId as keyof typeof attestationStationAddress + ], + eventName: 'AttestationCreated', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step3"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2Erc721BridgeABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function usePrepareSystemDictatorGoerliStep3( +export function useL2Erc721BridgeRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step3', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step4"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"messenger"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function usePrepareSystemDictatorGoerliStep4( +export function useL2Erc721BridgeMessenger< + TFunctionName extends 'messenger', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step4', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + functionName: 'messenger', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step5"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"otherBridge"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function usePrepareSystemDictatorGoerliStep5( +export function useL2Erc721BridgeOtherBridge< + TFunctionName extends 'otherBridge', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step5', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + functionName: 'otherBridge', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"step6"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function usePrepareSystemDictatorGoerliStep6( +export function useL2Erc721BridgeVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'step6', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + functionName: 'version', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function usePrepareSystemDictatorGoerliTransferOwnership( - config: Omit< - UsePrepareContractWriteConfig< - typeof systemDictatorGoerliABI, - 'transferOwnership' - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any +export function useL2Erc721BridgeWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l2Erc721BridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l2Erc721BridgeABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any ) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'transferOwnership', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `functionName` set to `"updateL2OutputOracleDynamicConfig"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function usePrepareSystemDictatorGoerliUpdateL2OutputOracleDynamicConfig( - config: Omit< - UsePrepareContractWriteConfig< - typeof systemDictatorGoerliABI, - 'updateL2OutputOracleDynamicConfig' - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any +export function useL2Erc721BridgeBridgeErc721< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l2Erc721BridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l2Erc721BridgeABI, + 'bridgeERC721' + >['request']['abi'], + 'bridgeERC721', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'bridgeERC721' + } + : UseContractWriteConfig< + typeof l2Erc721BridgeABI, + 'bridgeERC721', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'bridgeERC721' + } = {} as any ) { - return usePrepareContractWrite({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - functionName: 'updateL2OutputOracleDynamicConfig', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + functionName: 'bridgeERC721', ...config, - } as UsePrepareContractWriteConfig) + } as any) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorGoerliABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721To"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function useSystemDictatorGoerliEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any +export function useL2Erc721BridgeBridgeErc721To< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l2Erc721BridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l2Erc721BridgeABI, + 'bridgeERC721To' + >['request']['abi'], + 'bridgeERC721To', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'bridgeERC721To' + } + : UseContractWriteConfig< + typeof l2Erc721BridgeABI, + 'bridgeERC721To', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'bridgeERC721To' + } = {} as any ) { - return useContractEvent({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + functionName: 'bridgeERC721To', ...config, - } as UseContractEventConfig) + } as any) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `eventName` set to `"Initialized"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"finalizeBridgeERC721"`. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function useSystemDictatorGoerliInitializedEvent( - config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any +export function useL2Erc721BridgeFinalizeBridgeErc721< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l2Erc721BridgeAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l2Erc721BridgeABI, + 'finalizeBridgeERC721' + >['request']['abi'], + 'finalizeBridgeERC721', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'finalizeBridgeERC721' + } + : UseContractWriteConfig< + typeof l2Erc721BridgeABI, + 'finalizeBridgeERC721', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'finalizeBridgeERC721' + } = {} as any ) { - return useContractEvent({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - eventName: 'Initialized', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite< + typeof l2Erc721BridgeABI, + 'finalizeBridgeERC721', + TMode + >({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + functionName: 'finalizeBridgeERC721', ...config, - } as UseContractEventConfig) + } as any) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link systemDictatorGoerliABI}__ and `eventName` set to `"OwnershipTransferred"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__. * - * [__View Contract on Goerli Etherscan__](https://goerli.etherscan.io/address/0x1f0613A44c9a8ECE7B3A2e0CdBdF0F5B47A50971) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function useSystemDictatorGoerliOwnershipTransferredEvent( +export function usePrepareL2Erc721BridgeWrite( config: Omit< - UseContractEventConfig< - typeof systemDictatorGoerliABI, - 'OwnershipTransferred' - >, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof systemDictatorGoerliAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { - return useContractEvent({ - abi: systemDictatorGoerliABI, - address: systemDictatorGoerliAddress[5], - eventName: 'OwnershipTransferred', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function useMintManagerRead< - TFunctionName extends string, - TSelectData = ReadContractResult ->( +export function usePrepareL2Erc721BridgeBridgeErc721( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + return usePrepareContractWrite({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + functionName: 'bridgeERC721', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"DENOMINATOR"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721To"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function useMintManagerDenominator< - TFunctionName extends 'DENOMINATOR', - TSelectData = ReadContractResult ->( +export function usePrepareL2Erc721BridgeBridgeErc721To( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'DENOMINATOR', + return usePrepareContractWrite({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + functionName: 'bridgeERC721To', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"MINT_CAP"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"finalizeBridgeERC721"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function useMintManagerMintCap< - TFunctionName extends 'MINT_CAP', - TSelectData = ReadContractResult ->( +export function usePrepareL2Erc721BridgeFinalizeBridgeErc721( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig< + typeof l2Erc721BridgeABI, + 'finalizeBridgeERC721' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'MINT_CAP', + return usePrepareContractWrite({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + functionName: 'finalizeBridgeERC721', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"MINT_PERIOD"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2Erc721BridgeABI}__. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function useMintManagerMintPeriod< - TFunctionName extends 'MINT_PERIOD', - TSelectData = ReadContractResult ->( +export function useL2Erc721BridgeEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'MINT_PERIOD', + return useContractEvent({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"governanceToken"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `eventName` set to `"ERC721BridgeFinalized"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function useMintManagerGovernanceToken< - TFunctionName extends 'governanceToken', - TSelectData = ReadContractResult ->( +export function useL2Erc721BridgeErc721BridgeFinalizedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'governanceToken', + return useContractEvent({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + eventName: 'ERC721BridgeFinalized', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"mintPermittedAfter"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `eventName` set to `"ERC721BridgeInitiated"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000014) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) */ -export function useMintManagerMintPermittedAfter< - TFunctionName extends 'mintPermittedAfter', - TSelectData = ReadContractResult ->( +export function useL2Erc721BridgeErc721BridgeInitiatedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractRead({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'mintPermittedAfter', + return useContractEvent({ + abi: l2Erc721BridgeABI, + address: + l2Erc721BridgeAddress[chainId as keyof typeof l2Erc721BridgeAddress], + eventName: 'ERC721BridgeInitiated', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"owner"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useMintManagerOwner< - TFunctionName extends 'owner', - TSelectData = ReadContractResult +export function useOptimistRead< + TFunctionName extends string, + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'owner', + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link mintManagerABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"ATTESTATION_STATION"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useMintManagerWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof mintManagerAddress +export function useOptimistAttestationStation< + TFunctionName extends 'ATTESTATION_STATION', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof mintManagerABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'ATTESTATION_STATION', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"mint"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"BASE_URI_ATTESTATION_KEY"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useMintManagerMint< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof mintManagerAddress +export function useOptimistBaseUriAttestationKey< + TFunctionName extends 'BASE_URI_ATTESTATION_KEY', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof mintManagerABI, - 'mint' - >['request']['abi'], - 'mint', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'mint' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'mint' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'mint', + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'BASE_URI_ATTESTATION_KEY', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"renounceOwnership"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"BASE_URI_ATTESTOR"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useMintManagerRenounceOwnership< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof mintManagerAddress +export function useOptimistBaseUriAttestor< + TFunctionName extends 'BASE_URI_ATTESTOR', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof mintManagerABI, - 'renounceOwnership' - >['request']['abi'], - 'renounceOwnership', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'renounceOwnership' - } - : UseContractWriteConfig< - typeof mintManagerABI, - 'renounceOwnership', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'renounceOwnership' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'renounceOwnership', + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'BASE_URI_ATTESTOR', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"OPTIMIST_ALLOWLIST"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useMintManagerTransferOwnership< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof mintManagerAddress +export function useOptimistOptimistAllowlist< + TFunctionName extends 'OPTIMIST_ALLOWLIST', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof mintManagerABI, - 'transferOwnership' - >['request']['abi'], - 'transferOwnership', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'transferOwnership' - } - : UseContractWriteConfig< - typeof mintManagerABI, - 'transferOwnership', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'transferOwnership' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'transferOwnership', + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'OPTIMIST_ALLOWLIST', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"upgrade"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"approve"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useMintManagerUpgrade< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof mintManagerAddress +export function useOptimistApprove< + TFunctionName extends 'approve', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof mintManagerABI, - 'upgrade' - >['request']['abi'], - 'upgrade', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'upgrade' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'upgrade' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractWrite({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'upgrade', + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'approve', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link mintManagerABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"balanceOf"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function usePrepareMintManagerWrite( +export function useOptimistBalanceOf< + TFunctionName extends 'balanceOf', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'balanceOf', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"mint"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"baseURI"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function usePrepareMintManagerMint( +export function useOptimistBaseUri< + TFunctionName extends 'baseURI', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'mint', + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'baseURI', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"renounceOwnership"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"getApproved"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function usePrepareMintManagerRenounceOwnership( +export function useOptimistGetApproved< + TFunctionName extends 'getApproved', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'renounceOwnership', + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'getApproved', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"transferOwnership"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"isApprovedForAll"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function usePrepareMintManagerTransferOwnership( +export function useOptimistIsApprovedForAll< + TFunctionName extends 'isApprovedForAll', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'transferOwnership', + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'isApprovedForAll', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link mintManagerABI}__ and `functionName` set to `"upgrade"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"isOnAllowList"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function usePrepareMintManagerUpgrade( +export function useOptimistIsOnAllowList< + TFunctionName extends 'isOnAllowList', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return usePrepareContractWrite({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - functionName: 'upgrade', + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'isOnAllowList', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link mintManagerABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"name"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useMintManagerEvent( +export function useOptimistName< + TFunctionName extends 'name', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'name', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link mintManagerABI}__ and `eventName` set to `"OwnershipTransferred"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"ownerOf"`. * - * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x5C4e7Ba1E219E47948e6e3F55019A647bA501005) - * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useMintManagerOwnershipTransferredEvent( +export function useOptimistOwnerOf< + TFunctionName extends 'ownerOf', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof mintManagerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { const { chain } = useNetwork() const chainId = config.chainId ?? chain?.id - return useContractEvent({ - abi: mintManagerABI, - address: mintManagerAddress[chainId as keyof typeof mintManagerAddress], - eventName: 'OwnershipTransferred', + return useContractRead({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'ownerOf', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"supportsInterface"`. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryRead< - TFunctionName extends string, - TSelectData = ReadContractResult< - typeof optimismMintableErc721FactoryABI, - TFunctionName - > +export function useOptimistSupportsInterface< + TFunctionName extends 'supportsInterface', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc721FactoryABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress - } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'supportsInterface', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"bridge"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"symbol"`. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryBridge< - TFunctionName extends 'bridge', - TSelectData = ReadContractResult< - typeof optimismMintableErc721FactoryABI, - TFunctionName - > +export function useOptimistSymbol< + TFunctionName extends 'symbol', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc721FactoryABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress - } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], - functionName: 'bridge', + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'symbol', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"isOptimismMintableERC721"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"tokenIdOfAddress"`. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryIsOptimismMintableErc721< - TFunctionName extends 'isOptimismMintableERC721', - TSelectData = ReadContractResult< - typeof optimismMintableErc721FactoryABI, - TFunctionName - > +export function useOptimistTokenIdOfAddress< + TFunctionName extends 'tokenIdOfAddress', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc721FactoryABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress - } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], - functionName: 'isOptimismMintableERC721', + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'tokenIdOfAddress', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"remoteChainId"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"tokenURI"`. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryRemoteChainId< - TFunctionName extends 'remoteChainId', - TSelectData = ReadContractResult< - typeof optimismMintableErc721FactoryABI, - TFunctionName - > +export function useOptimistTokenUri< + TFunctionName extends 'tokenURI', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc721FactoryABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress - } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], - functionName: 'remoteChainId', + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'tokenURI', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryVersion< +export function useOptimistVersion< TFunctionName extends 'version', - TSelectData = ReadContractResult< - typeof optimismMintableErc721FactoryABI, - TFunctionName - > + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc721FactoryABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress - } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], functionName: 'version', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistABI}__. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryWrite< +export function useOptimistWrite< TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismMintableErc721FactoryAddress + TChainId extends number = keyof typeof optimistAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof optimismMintableErc721FactoryABI, + typeof optimistABI, string >['request']['abi'], TFunctionName, TMode > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig< - typeof optimismMintableErc721FactoryABI, - TFunctionName, + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"burn"`. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export function useOptimistBurn< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimistAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimistABI, + 'burn' + >['request']['abi'], + 'burn', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'burn' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'burn' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'burn', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"initialize"`. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export function useOptimistInitialize< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimistAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimistABI, + 'initialize' + >['request']['abi'], + 'initialize', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'initialize' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'initialize', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"mint"`. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export function useOptimistMint< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimistAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimistABI, + 'mint' + >['request']['abi'], + 'mint', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'mint' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'mint' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'mint', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"safeTransferFrom"`. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export function useOptimistSafeTransferFrom< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimistAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimistABI, + 'safeTransferFrom' + >['request']['abi'], + 'safeTransferFrom', TMode > & { + address?: Address + chainId?: TChainId + functionName?: 'safeTransferFrom' + } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId + functionName?: 'safeTransferFrom' } = {} as any ) { - return useContractWrite< - typeof optimismMintableErc721FactoryABI, - TFunctionName, - TMode - >({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'safeTransferFrom', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"createOptimismMintableERC721"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"setApprovalForAll"`. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryCreateOptimismMintableErc721< +export function useOptimistSetApprovalForAll< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismMintableErc721FactoryAddress + TChainId extends number = keyof typeof optimistAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof optimismMintableErc721FactoryABI, - 'createOptimismMintableERC721' + typeof optimistABI, + 'setApprovalForAll' + >['request']['abi'], + 'setApprovalForAll', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setApprovalForAll' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setApprovalForAll' + } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'setApprovalForAll', + ...config, + } as any) +} + +/** + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"transferFrom"`. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export function useOptimistTransferFrom< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimistAddress +>( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimistABI, + 'transferFrom' >['request']['abi'], - 'createOptimismMintableERC721', + 'transferFrom', TMode > & { address?: Address chainId?: TChainId - functionName?: 'createOptimismMintableERC721' + functionName?: 'transferFrom' } - : UseContractWriteConfig< - typeof optimismMintableErc721FactoryABI, - 'createOptimismMintableERC721', - TMode - > & { + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'createOptimismMintableERC721' + functionName?: 'transferFrom' } = {} as any ) { - return useContractWrite< - typeof optimismMintableErc721FactoryABI, - 'createOptimismMintableERC721', - TMode - >({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], - functionName: 'createOptimismMintableERC721', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'transferFrom', ...config, } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistABI}__. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function usePrepareOptimismMintableErc721FactoryWrite< - TFunctionName extends string ->( +export function usePrepareOptimistWrite( config: Omit< - UsePrepareContractWriteConfig< - typeof optimismMintableErc721FactoryABI, - TFunctionName - >, + UsePrepareContractWriteConfig, 'abi' | 'address' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress - } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `functionName` set to `"createOptimismMintableERC721"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"burn"`. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function usePrepareOptimismMintableErc721FactoryCreateOptimismMintableErc721( +export function usePrepareOptimistBurn( config: Omit< - UsePrepareContractWriteConfig< - typeof optimismMintableErc721FactoryABI, - 'createOptimismMintableERC721' - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress - } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return usePrepareContractWrite({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], - functionName: 'createOptimismMintableERC721', + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'burn', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"initialize"`. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryEvent< - TEventName extends string ->( +export function usePrepareOptimistInitialize( config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress - } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { - return useContractEvent({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'initialize', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryABI}__ and `eventName` set to `"OptimismMintableERC721Created"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"mint"`. * - * [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryOptimismMintableErc721CreatedEvent( +export function usePrepareOptimistMint( config: Omit< - UseContractEventConfig< - typeof optimismMintableErc721FactoryABI, - 'OptimismMintableERC721Created' - >, - 'abi' | 'address' | 'eventName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryAddress - } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { - return useContractEvent({ - abi: optimismMintableErc721FactoryABI, - address: optimismMintableErc721FactoryAddress[10], - eventName: 'OptimismMintableERC721Created', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'mint', ...config, - } as UseContractEventConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"safeTransferFrom"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryOptimismGoerliRead< - TFunctionName extends string, - TSelectData = ReadContractResult< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName - > ->( +export function usePrepareOptimistSafeTransferFrom( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { - return useContractRead({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'safeTransferFrom', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"BRIDGE"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"setApprovalForAll"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryOptimismGoerliBridge< - TFunctionName extends 'BRIDGE', - TSelectData = ReadContractResult< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName - > ->( +export function usePrepareOptimistSetApprovalForAll( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName, - TSelectData - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { - return useContractRead({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], - functionName: 'BRIDGE', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'setApprovalForAll', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"REMOTE_CHAIN_ID"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistABI}__ and `functionName` set to `"transferFrom"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryOptimismGoerliRemoteChainId< - TFunctionName extends 'REMOTE_CHAIN_ID', - TSelectData = ReadContractResult< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName - > ->( +export function usePrepareOptimistTransferFrom( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName, - TSelectData - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - } = {} as any + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { - return useContractRead({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], - functionName: 'REMOTE_CHAIN_ID', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + functionName: 'transferFrom', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"isOptimismMintableERC721"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimistABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryOptimismGoerliIsOptimismMintableErc721< - TFunctionName extends 'isOptimismMintableERC721', - TSelectData = ReadContractResult< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName - > ->( +export function useOptimistEvent( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - } = {} as any + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { - return useContractRead({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], - functionName: 'isOptimismMintableERC721', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimistABI}__ and `eventName` set to `"Approval"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) */ -export function useOptimismMintableErc721FactoryOptimismGoerliVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName - > ->( +export function useOptimistApprovalEvent( config: Omit< - UseContractReadConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimistAddress } = {} as any ) { - return useContractRead({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], - functionName: 'version', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + eventName: 'Approval', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimistABI}__ and `eventName` set to `"ApprovalForAll"`. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export function useOptimistApprovalForAllEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimistAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + eventName: 'ApprovalForAll', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimistABI}__ and `eventName` set to `"Initialized"`. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export function useOptimistInitializedEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimistAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + eventName: 'Initialized', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimistABI}__ and `eventName` set to `"Transfer"`. + * + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x2335022c740d17c2837f9C884Bfe4fFdbf0A95D5) + */ +export function useOptimistTransferEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimistAddress } = {} as any +) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimistABI, + address: optimistAddress[chainId as keyof typeof optimistAddress], + eventName: 'Transfer', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistAllowlistABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function useOptimismMintableErc721FactoryOptimismGoerliWrite< +export function useOptimistAllowlistRead< TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName, - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any + config: Omit< + UseContractReadConfig< + typeof optimistAllowlistABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof optimistAllowlistAddress } = {} as any ) { - return useContractWrite< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName, - TMode - >({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + chainId as keyof typeof optimistAllowlistAddress + ], ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"createOptimismMintableERC721"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistAllowlistABI}__ and `functionName` set to `"ALLOWLIST_ATTESTOR"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function useOptimismMintableErc721FactoryOptimismGoerliCreateOptimismMintableErc721< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress +export function useOptimistAllowlistAllowlistAttestor< + TFunctionName extends 'ALLOWLIST_ATTESTOR', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - 'createOptimismMintableERC721' - >['request']['abi'], - 'createOptimismMintableERC721', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'createOptimismMintableERC721' - } - : UseContractWriteConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - 'createOptimismMintableERC721', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'createOptimismMintableERC721' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof optimistAllowlistABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAllowlistAddress } = {} as any ) { - return useContractWrite< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - 'createOptimismMintableERC721', - TMode - >({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], - functionName: 'createOptimismMintableERC721', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + chainId as keyof typeof optimistAllowlistAddress + ], + functionName: 'ALLOWLIST_ATTESTOR', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistAllowlistABI}__ and `functionName` set to `"ATTESTATION_STATION"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function usePrepareOptimismMintableErc721FactoryOptimismGoerliWrite< - TFunctionName extends string +export function useOptimistAllowlistAttestationStation< + TFunctionName extends 'ATTESTATION_STATION', + TSelectData = ReadContractResult >( config: Omit< - UsePrepareContractWriteConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TFunctionName + UseContractReadConfig< + typeof optimistAllowlistABI, + TFunctionName, + TSelectData >, - 'abi' | 'address' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - } = {} as any + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAllowlistAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + chainId as keyof typeof optimistAllowlistAddress + ], + functionName: 'ATTESTATION_STATION', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `functionName` set to `"createOptimismMintableERC721"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistAllowlistABI}__ and `functionName` set to `"COINBASE_QUEST_ATTESTOR"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function usePrepareOptimismMintableErc721FactoryOptimismGoerliCreateOptimismMintableErc721( +export function useOptimistAllowlistCoinbaseQuestAttestor< + TFunctionName extends 'COINBASE_QUEST_ATTESTOR', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - 'createOptimismMintableERC721' + UseContractReadConfig< + typeof optimistAllowlistABI, + TFunctionName, + TSelectData >, 'abi' | 'address' | 'functionName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - } = {} as any + > & { chainId?: keyof typeof optimistAllowlistAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], - functionName: 'createOptimismMintableERC721', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + chainId as keyof typeof optimistAllowlistAddress + ], + functionName: 'COINBASE_QUEST_ATTESTOR', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistAllowlistABI}__ and `functionName` set to `"COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function useOptimismMintableErc721FactoryOptimismGoerliEvent< - TEventName extends string +export function useOptimistAllowlistCoinbaseQuestEligibleAttestationKey< + TFunctionName extends 'COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY', + TSelectData = ReadContractResult >( config: Omit< - UseContractEventConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - TEventName + UseContractReadConfig< + typeof optimistAllowlistABI, + TFunctionName, + TSelectData >, - 'abi' | 'address' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - } = {} as any + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAllowlistAddress } = {} as any ) { - return useContractEvent({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + chainId as keyof typeof optimistAllowlistAddress + ], + functionName: 'COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimismMintableErc721FactoryOptimismGoerliABI}__ and `eventName` set to `"OptimismMintableERC721Created"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistAllowlistABI}__ and `functionName` set to `"OPTIMIST_CAN_MINT_ATTESTATION_KEY"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000017) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function useOptimismMintableErc721FactoryOptimismGoerliOptimismMintableErc721CreatedEvent( +export function useOptimistAllowlistOptimistCanMintAttestationKey< + TFunctionName extends 'OPTIMIST_CAN_MINT_ATTESTATION_KEY', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig< - typeof optimismMintableErc721FactoryOptimismGoerliABI, - 'OptimismMintableERC721Created' + UseContractReadConfig< + typeof optimistAllowlistABI, + TFunctionName, + TSelectData >, - 'abi' | 'address' | 'eventName' - > & { - chainId?: keyof typeof optimismMintableErc721FactoryOptimismGoerliAddress - } = {} as any + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAllowlistAddress } = {} as any ) { - return useContractEvent({ - abi: optimismMintableErc721FactoryOptimismGoerliABI, - address: optimismMintableErc721FactoryOptimismGoerliAddress[420], - eventName: 'OptimismMintableERC721Created', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + chainId as keyof typeof optimistAllowlistAddress + ], + functionName: 'OPTIMIST_CAN_MINT_ATTESTATION_KEY', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link baseFeeVaultABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistAllowlistABI}__ and `functionName` set to `"OPTIMIST_INVITER"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function useBaseFeeVaultRead< - TFunctionName extends string, - TSelectData = ReadContractResult +export function useOptimistAllowlistOptimistInviter< + TFunctionName extends 'OPTIMIST_INVITER', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any + UseContractReadConfig< + typeof optimistAllowlistABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistAllowlistAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + chainId as keyof typeof optimistAllowlistAddress + ], + functionName: 'OPTIMIST_INVITER', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"MIN_WITHDRAWAL_AMOUNT"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistAllowlistABI}__ and `functionName` set to `"isAllowedToMint"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function useBaseFeeVaultMinWithdrawalAmount< - TFunctionName extends 'MIN_WITHDRAWAL_AMOUNT', - TSelectData = ReadContractResult +export function useOptimistAllowlistIsAllowedToMint< + TFunctionName extends 'isAllowedToMint', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof optimistAllowlistABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any + > & { chainId?: keyof typeof optimistAllowlistAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], - functionName: 'MIN_WITHDRAWAL_AMOUNT', + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + chainId as keyof typeof optimistAllowlistAddress + ], + functionName: 'isAllowedToMint', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"RECIPIENT"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistAllowlistABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x482b1945D58f2E9Db0CEbe13c7fcFc6876b41180) */ -export function useBaseFeeVaultRecipient< - TFunctionName extends 'RECIPIENT', - TSelectData = ReadContractResult +export function useOptimistAllowlistVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof optimistAllowlistABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any + > & { chainId?: keyof typeof optimistAllowlistAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], - functionName: 'RECIPIENT', + abi: optimistAllowlistABI, + address: + optimistAllowlistAddress[ + chainId as keyof typeof optimistAllowlistAddress + ], + functionName: 'version', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"totalProcessed"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useBaseFeeVaultTotalProcessed< - TFunctionName extends 'totalProcessed', - TSelectData = ReadContractResult +export function useOptimistInviterRead< + TFunctionName extends string, + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], - functionName: 'totalProcessed', + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"ATTESTATION_STATION"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useBaseFeeVaultVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult +export function useOptimistInviterAttestationStation< + TFunctionName extends 'ATTESTATION_STATION', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], - functionName: 'version', + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'ATTESTATION_STATION', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link baseFeeVaultABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"CAN_INVITE_ATTESTATION_KEY"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useBaseFeeVaultWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof baseFeeVaultAddress +export function useOptimistInviterCanInviteAttestationKey< + TFunctionName extends 'CAN_INVITE_ATTESTATION_KEY', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof baseFeeVaultABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any + config: Omit< + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractWrite({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'CAN_INVITE_ATTESTATION_KEY', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"withdraw"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"CLAIMABLE_INVITE_TYPEHASH"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useBaseFeeVaultWithdraw< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof baseFeeVaultAddress +export function useOptimistInviterClaimableInviteTypehash< + TFunctionName extends 'CLAIMABLE_INVITE_TYPEHASH', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof baseFeeVaultABI, - 'withdraw' - >['request']['abi'], - 'withdraw', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'withdraw' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'withdraw' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractWrite({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], - functionName: 'withdraw', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'CLAIMABLE_INVITE_TYPEHASH', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link baseFeeVaultABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"EIP712_VERSION"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function usePrepareBaseFeeVaultWrite( +export function useOptimistInviterEip712Version< + TFunctionName extends 'EIP712_VERSION', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'EIP712_VERSION', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"withdraw"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"INVITE_GRANTER"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function usePrepareBaseFeeVaultWithdraw( +export function useOptimistInviterInviteGranter< + TFunctionName extends 'INVITE_GRANTER', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], - functionName: 'withdraw', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'INVITE_GRANTER', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link baseFeeVaultABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"MIN_COMMITMENT_PERIOD"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useBaseFeeVaultEvent( +export function useOptimistInviterMinCommitmentPeriod< + TFunctionName extends 'MIN_COMMITMENT_PERIOD', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractEvent({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'MIN_COMMITMENT_PERIOD', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link baseFeeVaultABI}__ and `eventName` set to `"Withdrawal"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"commitmentTimestamps"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useBaseFeeVaultWithdrawalEvent( +export function useOptimistInviterCommitmentTimestamps< + TFunctionName extends 'commitmentTimestamps', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractEvent({ - abi: baseFeeVaultABI, - address: baseFeeVaultAddress[420], - eventName: 'Withdrawal', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractRead({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'commitmentTimestamps', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"inviteCounts"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useGasPriceOracleRead< - TFunctionName extends string, - TSelectData = ReadContractResult +export function useOptimistInviterInviteCounts< + TFunctionName extends 'inviteCounts', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: gasPriceOracleABI, - address: gasPriceOracleAddress[420], + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'inviteCounts', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"baseFee"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"usedNonces"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useGasPriceOracleBaseFee< - TFunctionName extends 'baseFee', - TSelectData = ReadContractResult +export function useOptimistInviterUsedNonces< + TFunctionName extends 'usedNonces', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: gasPriceOracleABI, - address: gasPriceOracleAddress[420], - functionName: 'baseFee', + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'usedNonces', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"decimals"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useGasPriceOracleDecimals< - TFunctionName extends 'decimals', - TSelectData = ReadContractResult +export function useOptimistInviterVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof optimistInviterABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id return useContractRead({ - abi: gasPriceOracleABI, - address: gasPriceOracleAddress[420], - functionName: 'decimals', + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'version', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"gasPrice"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistInviterABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useGasPriceOracleGasPrice< - TFunctionName extends 'gasPrice', - TSelectData = ReadContractResult +export function useOptimistInviterWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimistInviterAddress >( - config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimistInviterABI, + string + >['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig< + typeof optimistInviterABI, + TFunctionName, + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any ) { - return useContractRead({ - abi: gasPriceOracleABI, - address: gasPriceOracleAddress[420], - functionName: 'gasPrice', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"getL1Fee"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"claimInvite"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useGasPriceOracleGetL1Fee< - TFunctionName extends 'getL1Fee', - TSelectData = ReadContractResult +export function useOptimistInviterClaimInvite< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimistInviterAddress >( - config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimistInviterABI, + 'claimInvite' + >['request']['abi'], + 'claimInvite', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'claimInvite' + } + : UseContractWriteConfig< + typeof optimistInviterABI, + 'claimInvite', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'claimInvite' + } = {} as any ) { - return useContractRead({ - abi: gasPriceOracleABI, - address: gasPriceOracleAddress[420], - functionName: 'getL1Fee', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'claimInvite', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"getL1GasUsed"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"commitInvite"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useGasPriceOracleGetL1GasUsed< - TFunctionName extends 'getL1GasUsed', - TSelectData = ReadContractResult +export function useOptimistInviterCommitInvite< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimistInviterAddress >( - config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimistInviterABI, + 'commitInvite' + >['request']['abi'], + 'commitInvite', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'commitInvite' + } + : UseContractWriteConfig< + typeof optimistInviterABI, + 'commitInvite', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'commitInvite' + } = {} as any ) { - return useContractRead({ - abi: gasPriceOracleABI, - address: gasPriceOracleAddress[420], - functionName: 'getL1GasUsed', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'commitInvite', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"l1BaseFee"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"initialize"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useGasPriceOracleL1BaseFee< - TFunctionName extends 'l1BaseFee', - TSelectData = ReadContractResult +export function useOptimistInviterInitialize< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimistInviterAddress >( - config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimistInviterABI, + 'initialize' + >['request']['abi'], + 'initialize', + TMode + > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'initialize' + } = {} as any ) { - return useContractRead({ - abi: gasPriceOracleABI, - address: gasPriceOracleAddress[420], - functionName: 'l1BaseFee', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'initialize', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"overhead"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"setInviteCounts"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useGasPriceOracleOverhead< - TFunctionName extends 'overhead', - TSelectData = ReadContractResult +export function useOptimistInviterSetInviteCounts< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof optimistInviterAddress >( - config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof optimistInviterABI, + 'setInviteCounts' + >['request']['abi'], + 'setInviteCounts', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setInviteCounts' + } + : UseContractWriteConfig< + typeof optimistInviterABI, + 'setInviteCounts', + TMode + > & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setInviteCounts' + } = {} as any ) { - return useContractRead({ - abi: gasPriceOracleABI, - address: gasPriceOracleAddress[420], - functionName: 'overhead', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractWrite({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'setInviteCounts', ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"scalar"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistInviterABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useGasPriceOracleScalar< - TFunctionName extends 'scalar', - TSelectData = ReadContractResult ->( +export function usePrepareOptimistInviterWrite( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractRead({ - abi: gasPriceOracleABI, - address: gasPriceOracleAddress[420], - functionName: 'scalar', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"version"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"claimInvite"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useGasPriceOracleVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult ->( +export function usePrepareOptimistInviterClaimInvite( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractRead({ - abi: gasPriceOracleABI, - address: gasPriceOracleAddress[420], - functionName: 'version', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'claimInvite', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"commitInvite"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useL1BlockRead< - TFunctionName extends string, - TSelectData = ReadContractResult ->( +export function usePrepareOptimistInviterCommitInvite( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'commitInvite', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"DEPOSITOR_ACCOUNT"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"initialize"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useL1BlockDepositorAccount< - TFunctionName extends 'DEPOSITOR_ACCOUNT', - TSelectData = ReadContractResult ->( +export function usePrepareOptimistInviterInitialize( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'DEPOSITOR_ACCOUNT', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'initialize', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"basefee"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link optimistInviterABI}__ and `functionName` set to `"setInviteCounts"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useL1BlockBasefee< - TFunctionName extends 'basefee', - TSelectData = ReadContractResult ->( +export function usePrepareOptimistInviterSetInviteCounts( config: Omit< - UseContractReadConfig, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'basefee', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return usePrepareContractWrite({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + functionName: 'setInviteCounts', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"batcherHash"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimistInviterABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useL1BlockBatcherHash< - TFunctionName extends 'batcherHash', - TSelectData = ReadContractResult ->( - config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any +export function useOptimistInviterEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'batcherHash', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"hash"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimistInviterABI}__ and `eventName` set to `"Initialized"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useL1BlockHash< - TFunctionName extends 'hash', - TSelectData = ReadContractResult ->( +export function useOptimistInviterInitializedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'hash', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + eventName: 'Initialized', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"l1FeeOverhead"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link optimistInviterABI}__ and `eventName` set to `"InviteClaimed"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * - [__View Contract on Optimism Optimism Explorer__](https://explorer.optimism.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) + * - [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x073031A1E1b8F5458Ed41Ce56331F5fd7e1de929) */ -export function useL1BlockL1FeeOverhead< - TFunctionName extends 'l1FeeOverhead', - TSelectData = ReadContractResult ->( +export function useOptimistInviterInviteClaimedEvent( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof optimistInviterAddress } = {} as any ) { - return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'l1FeeOverhead', + const { chain } = useNetwork() + const chainId = config.chainId ?? chain?.id + return useContractEvent({ + abi: optimistInviterABI, + address: + optimistInviterAddress[chainId as keyof typeof optimistInviterAddress], + eventName: 'InviteClaimed', ...config, - } as UseContractReadConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"l1FeeScalar"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link baseFeeVaultABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) */ -export function useL1BlockL1FeeScalar< - TFunctionName extends 'l1FeeScalar', - TSelectData = ReadContractResult +export function useBaseFeeVaultRead< + TFunctionName extends string, + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any ) { return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'l1FeeScalar', + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"number"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"MIN_WITHDRAWAL_AMOUNT"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) */ -export function useL1BlockNumber< - TFunctionName extends 'number', - TSelectData = ReadContractResult +export function useBaseFeeVaultMinWithdrawalAmount< + TFunctionName extends 'MIN_WITHDRAWAL_AMOUNT', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any ) { return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'number', + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], + functionName: 'MIN_WITHDRAWAL_AMOUNT', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"sequenceNumber"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"RECIPIENT"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) */ -export function useL1BlockSequenceNumber< - TFunctionName extends 'sequenceNumber', - TSelectData = ReadContractResult +export function useBaseFeeVaultRecipient< + TFunctionName extends 'RECIPIENT', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any ) { return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'sequenceNumber', + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], + functionName: 'RECIPIENT', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"timestamp"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"totalProcessed"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) */ -export function useL1BlockTimestamp< - TFunctionName extends 'timestamp', - TSelectData = ReadContractResult +export function useBaseFeeVaultTotalProcessed< + TFunctionName extends 'totalProcessed', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any ) { return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'timestamp', + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], + functionName: 'totalProcessed', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) */ -export function useL1BlockVersion< +export function useBaseFeeVaultVersion< TFunctionName extends 'version', - TSelectData = ReadContractResult + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any ) { return useContractRead({ - abi: l1BlockABI, - address: l1BlockAddress[420], + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], functionName: 'version', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1BlockABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link baseFeeVaultABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) */ -export function useL1BlockWrite< +export function useBaseFeeVaultWrite< TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1BlockAddress + TChainId extends number = keyof typeof baseFeeVaultAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< - PrepareWriteContractResult['request']['abi'], + PrepareWriteContractResult< + typeof baseFeeVaultABI, + string + >['request']['abi'], TFunctionName, TMode > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId } = {} as any ) { - return useContractWrite({ - abi: l1BlockABI, - address: l1BlockAddress[420], + return useContractWrite({ + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"setL1BlockValues"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"withdraw"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) */ -export function useL1BlockSetL1BlockValues< +export function useBaseFeeVaultWithdraw< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1BlockAddress + TChainId extends number = keyof typeof baseFeeVaultAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l1BlockABI, - 'setL1BlockValues' + typeof baseFeeVaultABI, + 'withdraw' >['request']['abi'], - 'setL1BlockValues', + 'withdraw', TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'setL1BlockValues' - } - : UseContractWriteConfig & { + > & { address?: Address; chainId?: TChainId; functionName?: 'withdraw' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'setL1BlockValues' + functionName?: 'withdraw' } = {} as any ) { - return useContractWrite({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'setL1BlockValues', + return useContractWrite({ + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], + functionName: 'withdraw', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link baseFeeVaultABI}__. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export function usePrepareBaseFeeVaultWrite( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any +) { + return usePrepareContractWrite({ + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link baseFeeVaultABI}__ and `functionName` set to `"withdraw"`. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export function usePrepareBaseFeeVaultWithdraw( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any +) { + return usePrepareContractWrite({ + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], + functionName: 'withdraw', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link baseFeeVaultABI}__. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) + */ +export function useBaseFeeVaultEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any +) { + return useContractEvent({ + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], ...config, - } as any) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1BlockABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link baseFeeVaultABI}__ and `eventName` set to `"Withdrawal"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000019) */ -export function usePrepareL1BlockWrite( +export function useBaseFeeVaultWithdrawalEvent( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof baseFeeVaultAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: l1BlockABI, - address: l1BlockAddress[420], + return useContractEvent({ + abi: baseFeeVaultABI, + address: baseFeeVaultAddress[420], + eventName: 'Withdrawal', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"setL1BlockValues"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) */ -export function usePrepareL1BlockSetL1BlockValues( +export function useGasPriceOracleRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1BlockAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: l1BlockABI, - address: l1BlockAddress[420], - functionName: 'setL1BlockValues', + return useContractRead({ + abi: gasPriceOracleABI, + address: gasPriceOracleAddress[420], ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1FeeVaultABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"baseFee"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) */ -export function useL1FeeVaultRead< - TFunctionName extends string, - TSelectData = ReadContractResult +export function useGasPriceOracleBaseFee< + TFunctionName extends 'baseFee', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any ) { return useContractRead({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], + abi: gasPriceOracleABI, + address: gasPriceOracleAddress[420], + functionName: 'baseFee', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"MIN_WITHDRAWAL_AMOUNT"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"decimals"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) */ -export function useL1FeeVaultMinWithdrawalAmount< - TFunctionName extends 'MIN_WITHDRAWAL_AMOUNT', - TSelectData = ReadContractResult +export function useGasPriceOracleDecimals< + TFunctionName extends 'decimals', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any + > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any ) { return useContractRead({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], - functionName: 'MIN_WITHDRAWAL_AMOUNT', + abi: gasPriceOracleABI, + address: gasPriceOracleAddress[420], + functionName: 'decimals', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"RECIPIENT"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"gasPrice"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) */ -export function useL1FeeVaultRecipient< - TFunctionName extends 'RECIPIENT', - TSelectData = ReadContractResult +export function useGasPriceOracleGasPrice< + TFunctionName extends 'gasPrice', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any + > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any ) { return useContractRead({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], - functionName: 'RECIPIENT', + abi: gasPriceOracleABI, + address: gasPriceOracleAddress[420], + functionName: 'gasPrice', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"totalProcessed"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"getL1Fee"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) */ -export function useL1FeeVaultTotalProcessed< - TFunctionName extends 'totalProcessed', - TSelectData = ReadContractResult +export function useGasPriceOracleGetL1Fee< + TFunctionName extends 'getL1Fee', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any + > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any ) { return useContractRead({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], - functionName: 'totalProcessed', + abi: gasPriceOracleABI, + address: gasPriceOracleAddress[420], + functionName: 'getL1Fee', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"getL1GasUsed"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) */ -export function useL1FeeVaultVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult +export function useGasPriceOracleGetL1GasUsed< + TFunctionName extends 'getL1GasUsed', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any + > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any ) { return useContractRead({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], - functionName: 'version', + abi: gasPriceOracleABI, + address: gasPriceOracleAddress[420], + functionName: 'getL1GasUsed', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1FeeVaultABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"l1BaseFee"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) */ -export function useL1FeeVaultWrite< - TFunctionName extends string, - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1FeeVaultAddress +export function useGasPriceOracleL1BaseFee< + TFunctionName extends 'l1BaseFee', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l1FeeVaultABI, - string - >['request']['abi'], - TFunctionName, - TMode - > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any ) { - return useContractWrite({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], + return useContractRead({ + abi: gasPriceOracleABI, + address: gasPriceOracleAddress[420], + functionName: 'l1BaseFee', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"withdraw"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"overhead"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) */ -export function useL1FeeVaultWithdraw< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l1FeeVaultAddress +export function useGasPriceOracleOverhead< + TFunctionName extends 'overhead', + TSelectData = ReadContractResult >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l1FeeVaultABI, - 'withdraw' - >['request']['abi'], - 'withdraw', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'withdraw' } - : UseContractWriteConfig & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'withdraw' - } = {} as any + config: Omit< + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any ) { - return useContractWrite({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], - functionName: 'withdraw', + return useContractRead({ + abi: gasPriceOracleABI, + address: gasPriceOracleAddress[420], + functionName: 'overhead', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1FeeVaultABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"scalar"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) */ -export function usePrepareL1FeeVaultWrite( +export function useGasPriceOracleScalar< + TFunctionName extends 'scalar', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], + return useContractRead({ + abi: gasPriceOracleABI, + address: gasPriceOracleAddress[420], + functionName: 'scalar', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"withdraw"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link gasPriceOracleABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000000F) */ -export function usePrepareL1FeeVaultWithdraw( +export function useGasPriceOracleVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult +>( config: Omit< - UsePrepareContractWriteConfig, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any + > & { chainId?: keyof typeof gasPriceOracleAddress } = {} as any ) { - return usePrepareContractWrite({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], - functionName: 'withdraw', + return useContractRead({ + abi: gasPriceOracleABI, + address: gasPriceOracleAddress[420], + functionName: 'version', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1FeeVaultABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL1FeeVaultEvent( +export function useL1BlockRead< + TFunctionName extends string, + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, + UseContractReadConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { - return useContractEvent({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], + return useContractRead({ + abi: l1BlockABI, + address: l1BlockAddress[420], ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1FeeVaultABI}__ and `eventName` set to `"Withdrawal"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"DEPOSITOR_ACCOUNT"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL1FeeVaultWithdrawalEvent( +export function useL1BlockDepositorAccount< + TFunctionName extends 'DEPOSITOR_ACCOUNT', + TSelectData = ReadContractResult +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { - return useContractEvent({ - abi: l1FeeVaultABI, - address: l1FeeVaultAddress[420], - eventName: 'Withdrawal', + return useContractRead({ + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'DEPOSITOR_ACCOUNT', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"basefee"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerRead< - TFunctionName extends string, - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockBasefee< + TFunctionName extends 'basefee', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'basefee', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"MESSAGE_VERSION"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"batcherHash"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerMessageVersion< - TFunctionName extends 'MESSAGE_VERSION', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockBatcherHash< + TFunctionName extends 'batcherHash', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'MESSAGE_VERSION', + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'batcherHash', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_CALLDATA_OVERHEAD"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"hash"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerMinGasCalldataOverhead< - TFunctionName extends 'MIN_GAS_CALLDATA_OVERHEAD', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockHash< + TFunctionName extends 'hash', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'MIN_GAS_CALLDATA_OVERHEAD', + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'hash', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"l1FeeOverhead"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerMinGasDynamicOverheadDenominator< - TFunctionName extends 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockL1FeeOverhead< + TFunctionName extends 'l1FeeOverhead', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'l1FeeOverhead', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"l1FeeScalar"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerMinGasDynamicOverheadNumerator< - TFunctionName extends 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockL1FeeScalar< + TFunctionName extends 'l1FeeScalar', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'l1FeeScalar', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"OTHER_MESSENGER"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"number"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerOtherMessenger< - TFunctionName extends 'OTHER_MESSENGER', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockNumber< + TFunctionName extends 'number', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'OTHER_MESSENGER', + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'number', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_CALL_OVERHEAD"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"sequenceNumber"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerRelayCallOverhead< - TFunctionName extends 'RELAY_CALL_OVERHEAD', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockSequenceNumber< + TFunctionName extends 'sequenceNumber', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'RELAY_CALL_OVERHEAD', + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'sequenceNumber', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_CONSTANT_OVERHEAD"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"timestamp"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerRelayConstantOverhead< - TFunctionName extends 'RELAY_CONSTANT_OVERHEAD', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockTimestamp< + TFunctionName extends 'timestamp', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'RELAY_CONSTANT_OVERHEAD', + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'timestamp', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_GAS_CHECK_BUFFER"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerRelayGasCheckBuffer< - TFunctionName extends 'RELAY_GAS_CHECK_BUFFER', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'RELAY_GAS_CHECK_BUFFER', + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'version', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_RESERVED_GAS"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1BlockABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerRelayReservedGas< - TFunctionName extends 'RELAY_RESERVED_GAS', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockWrite< + TFunctionName extends string, + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1BlockAddress >( - config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult['request']['abi'], + TFunctionName, + TMode + > & { address?: Address; chainId?: TChainId } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + } = {} as any ) { - return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'RELAY_RESERVED_GAS', + return useContractWrite({ + abi: l1BlockABI, + address: l1BlockAddress[420], ...config, - } as UseContractReadConfig) + } as any) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"baseGas"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"setL1BlockValues"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerBaseGas< - TFunctionName extends 'baseGas', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1BlockSetL1BlockValues< + TMode extends WriteContractMode = undefined, + TChainId extends number = keyof typeof l1BlockAddress >( + config: TMode extends 'prepared' + ? UseContractWriteConfig< + PrepareWriteContractResult< + typeof l1BlockABI, + 'setL1BlockValues' + >['request']['abi'], + 'setL1BlockValues', + TMode + > & { + address?: Address + chainId?: TChainId + functionName?: 'setL1BlockValues' + } + : UseContractWriteConfig & { + abi?: never + address?: never + chainId?: TChainId + functionName?: 'setL1BlockValues' + } = {} as any +) { + return useContractWrite({ + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'setL1BlockValues', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1BlockABI}__. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) + */ +export function usePrepareL1BlockWrite( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { - return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'baseGas', + return usePrepareContractWrite({ + abi: l1BlockABI, + address: l1BlockAddress[420], ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"failedMessages"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1BlockABI}__ and `functionName` set to `"setL1BlockValues"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000015) */ -export function useL2CrossDomainMessengerFailedMessages< - TFunctionName extends 'failedMessages', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > ->( +export function usePrepareL1BlockSetL1BlockValues( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UsePrepareContractWriteConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1BlockAddress } = {} as any ) { - return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'failedMessages', + return usePrepareContractWrite({ + abi: l1BlockABI, + address: l1BlockAddress[420], + functionName: 'setL1BlockValues', ...config, - } as UseContractReadConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"l1CrossDomainMessenger"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1FeeVaultABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) */ -export function useL2CrossDomainMessengerL1CrossDomainMessenger< - TFunctionName extends 'l1CrossDomainMessenger', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1FeeVaultRead< + TFunctionName extends string, + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, - 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + UseContractReadConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'l1CrossDomainMessenger', + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"messageNonce"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"MIN_WITHDRAWAL_AMOUNT"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) */ -export function useL2CrossDomainMessengerMessageNonce< - TFunctionName extends 'messageNonce', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1FeeVaultMinWithdrawalAmount< + TFunctionName extends 'MIN_WITHDRAWAL_AMOUNT', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'messageNonce', + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], + functionName: 'MIN_WITHDRAWAL_AMOUNT', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"successfulMessages"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"RECIPIENT"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) */ -export function useL2CrossDomainMessengerSuccessfulMessages< - TFunctionName extends 'successfulMessages', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1FeeVaultRecipient< + TFunctionName extends 'RECIPIENT', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'successfulMessages', + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], + functionName: 'RECIPIENT', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"totalProcessed"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) */ -export function useL2CrossDomainMessengerVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1FeeVaultTotalProcessed< + TFunctionName extends 'totalProcessed', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'version', + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], + functionName: 'totalProcessed', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"xDomainMessageSender"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) */ -export function useL2CrossDomainMessengerXDomainMessageSender< - TFunctionName extends 'xDomainMessageSender', - TSelectData = ReadContractResult< - typeof l2CrossDomainMessengerABI, - TFunctionName - > +export function useL1FeeVaultVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult >( config: Omit< - UseContractReadConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TSelectData - >, + UseContractReadConfig, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any + > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any ) { return useContractRead({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], - functionName: 'xDomainMessageSender', + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], + functionName: 'version', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1FeeVaultABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) */ -export function useL2CrossDomainMessengerWrite< +export function useL1FeeVaultWrite< TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2CrossDomainMessengerAddress + TChainId extends number = keyof typeof l1FeeVaultAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l2CrossDomainMessengerABI, + typeof l1FeeVaultABI, string >['request']['abi'], TFunctionName, TMode > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TMode - > & { + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId } = {} as any ) { - return useContractWrite< - typeof l2CrossDomainMessengerABI, - TFunctionName, - TMode - >({ - abi: l2CrossDomainMessengerABI, - address: l2CrossDomainMessengerAddress[420], + return useContractWrite({ + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"initialize"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"withdraw"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) */ -export function useL2CrossDomainMessengerInitialize< +export function useL1FeeVaultWithdraw< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2CrossDomainMessengerAddress + TChainId extends number = keyof typeof l1FeeVaultAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l2CrossDomainMessengerABI, - 'initialize' + typeof l1FeeVaultABI, + 'withdraw' >['request']['abi'], - 'initialize', - TMode - > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } - : UseContractWriteConfig< - typeof l2CrossDomainMessengerABI, - 'initialize', + 'withdraw', TMode - > & { + > & { address?: Address; chainId?: TChainId; functionName?: 'withdraw' } + : UseContractWriteConfig & { abi?: never address?: never chainId?: TChainId - functionName?: 'initialize' + functionName?: 'withdraw' } = {} as any ) { - return useContractWrite< + return useContractWrite({ + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], + functionName: 'withdraw', + ...config, + } as any) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1FeeVaultABI}__. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export function usePrepareL1FeeVaultWrite( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any +) { + return usePrepareContractWrite({ + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l1FeeVaultABI}__ and `functionName` set to `"withdraw"`. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export function usePrepareL1FeeVaultWithdraw( + config: Omit< + UsePrepareContractWriteConfig, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any +) { + return usePrepareContractWrite({ + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], + functionName: 'withdraw', + ...config, + } as UsePrepareContractWriteConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1FeeVaultABI}__. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export function useL1FeeVaultEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' + > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any +) { + return useContractEvent({ + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l1FeeVaultABI}__ and `eventName` set to `"Withdrawal"`. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x420000000000000000000000000000000000001a) + */ +export function useL1FeeVaultWithdrawalEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l1FeeVaultAddress } = {} as any +) { + return useContractEvent({ + abi: l1FeeVaultABI, + address: l1FeeVaultAddress[420], + eventName: 'Withdrawal', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export function useL2CrossDomainMessengerRead< + TFunctionName extends string, + TSelectData = ReadContractResult< typeof l2CrossDomainMessengerABI, - 'initialize', - TMode - >({ + TFunctionName + > +>( + config: Omit< + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any +) { + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - functionName: 'initialize', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"relayMessage"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"MESSAGE_VERSION"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2CrossDomainMessengerRelayMessage< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2CrossDomainMessengerAddress +export function useL2CrossDomainMessengerMessageVersion< + TFunctionName extends 'MESSAGE_VERSION', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l2CrossDomainMessengerABI, - 'relayMessage' - >['request']['abi'], - 'relayMessage', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'relayMessage' - } - : UseContractWriteConfig< - typeof l2CrossDomainMessengerABI, - 'relayMessage', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'relayMessage' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return useContractWrite< - typeof l2CrossDomainMessengerABI, - 'relayMessage', - TMode - >({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - functionName: 'relayMessage', + functionName: 'MESSAGE_VERSION', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"sendMessage"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_CALLDATA_OVERHEAD"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2CrossDomainMessengerSendMessage< - TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2CrossDomainMessengerAddress +export function useL2CrossDomainMessengerMinGasCalldataOverhead< + TFunctionName extends 'MIN_GAS_CALLDATA_OVERHEAD', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > >( - config: TMode extends 'prepared' - ? UseContractWriteConfig< - PrepareWriteContractResult< - typeof l2CrossDomainMessengerABI, - 'sendMessage' - >['request']['abi'], - 'sendMessage', - TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'sendMessage' - } - : UseContractWriteConfig< - typeof l2CrossDomainMessengerABI, - 'sendMessage', - TMode - > & { - abi?: never - address?: never - chainId?: TChainId - functionName?: 'sendMessage' - } = {} as any + config: Omit< + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return useContractWrite< - typeof l2CrossDomainMessengerABI, - 'sendMessage', - TMode - >({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - functionName: 'sendMessage', + functionName: 'MIN_GAS_CALLDATA_OVERHEAD', ...config, - } as any) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function usePrepareL2CrossDomainMessengerWrite< - TFunctionName extends string +export function useL2CrossDomainMessengerMinGasDynamicOverheadDenominator< + TFunctionName extends 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > >( config: Omit< - UsePrepareContractWriteConfig< + UseContractReadConfig< typeof l2CrossDomainMessengerABI, - TFunctionName + TFunctionName, + TSelectData >, - 'abi' | 'address' + 'abi' | 'address' | 'functionName' > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return usePrepareContractWrite({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], + functionName: 'MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"initialize"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function usePrepareL2CrossDomainMessengerInitialize( +export function useL2CrossDomainMessengerMinGasDynamicOverheadNumerator< + TFunctionName extends 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > +>( config: Omit< - UsePrepareContractWriteConfig< + UseContractReadConfig< typeof l2CrossDomainMessengerABI, - 'initialize' + TFunctionName, + TSelectData >, 'abi' | 'address' | 'functionName' > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return usePrepareContractWrite({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - functionName: 'initialize', + functionName: 'MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"relayMessage"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"OTHER_MESSENGER"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function usePrepareL2CrossDomainMessengerRelayMessage( +export function useL2CrossDomainMessengerOtherMessenger< + TFunctionName extends 'OTHER_MESSENGER', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > +>( config: Omit< - UsePrepareContractWriteConfig< + UseContractReadConfig< typeof l2CrossDomainMessengerABI, - 'relayMessage' + TFunctionName, + TSelectData >, 'abi' | 'address' | 'functionName' > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return usePrepareContractWrite({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - functionName: 'relayMessage', + functionName: 'OTHER_MESSENGER', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"sendMessage"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_CALL_OVERHEAD"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function usePrepareL2CrossDomainMessengerSendMessage( +export function useL2CrossDomainMessengerRelayCallOverhead< + TFunctionName extends 'RELAY_CALL_OVERHEAD', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > +>( config: Omit< - UsePrepareContractWriteConfig< + UseContractReadConfig< typeof l2CrossDomainMessengerABI, - 'sendMessage' + TFunctionName, + TSelectData >, 'abi' | 'address' | 'functionName' > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return usePrepareContractWrite({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - functionName: 'sendMessage', + functionName: 'RELAY_CALL_OVERHEAD', ...config, - } as UsePrepareContractWriteConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_CONSTANT_OVERHEAD"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2CrossDomainMessengerEvent( +export function useL2CrossDomainMessengerRelayConstantOverhead< + TFunctionName extends 'RELAY_CONSTANT_OVERHEAD', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return useContractEvent({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], + functionName: 'RELAY_CONSTANT_OVERHEAD', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `eventName` set to `"FailedRelayedMessage"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_GAS_CHECK_BUFFER"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2CrossDomainMessengerFailedRelayedMessageEvent( +export function useL2CrossDomainMessengerRelayGasCheckBuffer< + TFunctionName extends 'RELAY_GAS_CHECK_BUFFER', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > +>( config: Omit< - UseContractEventConfig< + UseContractReadConfig< typeof l2CrossDomainMessengerABI, - 'FailedRelayedMessage' + TFunctionName, + TSelectData >, - 'abi' | 'address' | 'eventName' + 'abi' | 'address' | 'functionName' > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return useContractEvent({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - eventName: 'FailedRelayedMessage', + functionName: 'RELAY_GAS_CHECK_BUFFER', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `eventName` set to `"Initialized"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"RELAY_RESERVED_GAS"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2CrossDomainMessengerInitializedEvent( +export function useL2CrossDomainMessengerRelayReservedGas< + TFunctionName extends 'RELAY_RESERVED_GAS', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return useContractEvent({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - eventName: 'Initialized', + functionName: 'RELAY_RESERVED_GAS', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `eventName` set to `"RelayedMessage"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"baseGas"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2CrossDomainMessengerRelayedMessageEvent( +export function useL2CrossDomainMessengerBaseGas< + TFunctionName extends 'baseGas', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return useContractEvent({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - eventName: 'RelayedMessage', + functionName: 'baseGas', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `eventName` set to `"SentMessage"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"failedMessages"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2CrossDomainMessengerSentMessageEvent( +export function useL2CrossDomainMessengerFailedMessages< + TFunctionName extends 'failedMessages', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > +>( config: Omit< - UseContractEventConfig, - 'abi' | 'address' | 'eventName' + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return useContractEvent({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - eventName: 'SentMessage', + functionName: 'failedMessages', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `eventName` set to `"SentMessageExtension1"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"l1CrossDomainMessenger"`. * * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2CrossDomainMessengerSentMessageExtension1Event( +export function useL2CrossDomainMessengerL1CrossDomainMessenger< + TFunctionName extends 'l1CrossDomainMessenger', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > +>( config: Omit< - UseContractEventConfig< + UseContractReadConfig< typeof l2CrossDomainMessengerABI, - 'SentMessageExtension1' + TFunctionName, + TSelectData >, - 'abi' | 'address' | 'eventName' + 'abi' | 'address' | 'functionName' > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { - return useContractEvent({ + return useContractRead({ abi: l2CrossDomainMessengerABI, address: l2CrossDomainMessengerAddress[420], - eventName: 'SentMessageExtension1', + functionName: 'l1CrossDomainMessenger', ...config, - } as UseContractEventConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2Erc721BridgeABI}__. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"messageNonce"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeRead< - TFunctionName extends string, - TSelectData = ReadContractResult +export function useL2CrossDomainMessengerMessageNonce< + TFunctionName extends 'messageNonce', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > >( config: Omit< - UseContractReadConfig, - 'abi' | 'address' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, + 'abi' | 'address' | 'functionName' + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return useContractRead({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + functionName: 'messageNonce', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"messenger"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"successfulMessages"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeMessenger< - TFunctionName extends 'messenger', - TSelectData = ReadContractResult +export function useL2CrossDomainMessengerSuccessfulMessages< + TFunctionName extends 'successfulMessages', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return useContractRead({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - functionName: 'messenger', + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + functionName: 'successfulMessages', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"otherBridge"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"version"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeOtherBridge< - TFunctionName extends 'otherBridge', - TSelectData = ReadContractResult +export function useL2CrossDomainMessengerVersion< + TFunctionName extends 'version', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return useContractRead({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - functionName: 'otherBridge', + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + functionName: 'version', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"version"`. + * Wraps __{@link useContractRead}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"xDomainMessageSender"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeVersion< - TFunctionName extends 'version', - TSelectData = ReadContractResult +export function useL2CrossDomainMessengerXDomainMessageSender< + TFunctionName extends 'xDomainMessageSender', + TSelectData = ReadContractResult< + typeof l2CrossDomainMessengerABI, + TFunctionName + > >( config: Omit< - UseContractReadConfig, + UseContractReadConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TSelectData + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return useContractRead({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - functionName: 'version', + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + functionName: 'xDomainMessageSender', ...config, - } as UseContractReadConfig) + } as UseContractReadConfig) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeWrite< +export function useL2CrossDomainMessengerWrite< TFunctionName extends string, TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2Erc721BridgeAddress + TChainId extends number = keyof typeof l2CrossDomainMessengerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l2Erc721BridgeABI, + typeof l2CrossDomainMessengerABI, string >['request']['abi'], TFunctionName, TMode > & { address?: Address; chainId?: TChainId } - : UseContractWriteConfig & { + : UseContractWriteConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TMode + > & { abi?: never address?: never chainId?: TChainId } = {} as any ) { - return useContractWrite({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], + return useContractWrite< + typeof l2CrossDomainMessengerABI, + TFunctionName, + TMode + >({ + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"initialize"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeBridgeErc721< +export function useL2CrossDomainMessengerInitialize< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2Erc721BridgeAddress + TChainId extends number = keyof typeof l2CrossDomainMessengerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l2Erc721BridgeABI, - 'bridgeERC721' + typeof l2CrossDomainMessengerABI, + 'initialize' >['request']['abi'], - 'bridgeERC721', + 'initialize', TMode - > & { - address?: Address - chainId?: TChainId - functionName?: 'bridgeERC721' - } + > & { address?: Address; chainId?: TChainId; functionName?: 'initialize' } : UseContractWriteConfig< - typeof l2Erc721BridgeABI, - 'bridgeERC721', + typeof l2CrossDomainMessengerABI, + 'initialize', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'bridgeERC721' - } = {} as any -) { - return useContractWrite({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - functionName: 'bridgeERC721', + functionName?: 'initialize' + } = {} as any +) { + return useContractWrite< + typeof l2CrossDomainMessengerABI, + 'initialize', + TMode + >({ + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + functionName: 'initialize', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721To"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"relayMessage"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeBridgeErc721To< +export function useL2CrossDomainMessengerRelayMessage< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2Erc721BridgeAddress + TChainId extends number = keyof typeof l2CrossDomainMessengerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l2Erc721BridgeABI, - 'bridgeERC721To' + typeof l2CrossDomainMessengerABI, + 'relayMessage' >['request']['abi'], - 'bridgeERC721To', + 'relayMessage', TMode > & { address?: Address chainId?: TChainId - functionName?: 'bridgeERC721To' + functionName?: 'relayMessage' } : UseContractWriteConfig< - typeof l2Erc721BridgeABI, - 'bridgeERC721To', + typeof l2CrossDomainMessengerABI, + 'relayMessage', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'bridgeERC721To' + functionName?: 'relayMessage' } = {} as any ) { - return useContractWrite({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - functionName: 'bridgeERC721To', + return useContractWrite< + typeof l2CrossDomainMessengerABI, + 'relayMessage', + TMode + >({ + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + functionName: 'relayMessage', ...config, } as any) } /** - * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"finalizeBridgeERC721"`. + * Wraps __{@link useContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"sendMessage"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeFinalizeBridgeErc721< +export function useL2CrossDomainMessengerSendMessage< TMode extends WriteContractMode = undefined, - TChainId extends number = keyof typeof l2Erc721BridgeAddress + TChainId extends number = keyof typeof l2CrossDomainMessengerAddress >( config: TMode extends 'prepared' ? UseContractWriteConfig< PrepareWriteContractResult< - typeof l2Erc721BridgeABI, - 'finalizeBridgeERC721' + typeof l2CrossDomainMessengerABI, + 'sendMessage' >['request']['abi'], - 'finalizeBridgeERC721', + 'sendMessage', TMode > & { address?: Address chainId?: TChainId - functionName?: 'finalizeBridgeERC721' + functionName?: 'sendMessage' } : UseContractWriteConfig< - typeof l2Erc721BridgeABI, - 'finalizeBridgeERC721', + typeof l2CrossDomainMessengerABI, + 'sendMessage', TMode > & { abi?: never address?: never chainId?: TChainId - functionName?: 'finalizeBridgeERC721' + functionName?: 'sendMessage' } = {} as any ) { return useContractWrite< - typeof l2Erc721BridgeABI, - 'finalizeBridgeERC721', + typeof l2CrossDomainMessengerABI, + 'sendMessage', TMode >({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - functionName: 'finalizeBridgeERC721', + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + functionName: 'sendMessage', ...config, } as any) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function usePrepareL2Erc721BridgeWrite( +export function usePrepareL2CrossDomainMessengerWrite< + TFunctionName extends string +>( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig< + typeof l2CrossDomainMessengerABI, + TFunctionName + >, 'abi' | 'address' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return usePrepareContractWrite({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"initialize"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function usePrepareL2Erc721BridgeBridgeErc721( +export function usePrepareL2CrossDomainMessengerInitialize( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig< + typeof l2CrossDomainMessengerABI, + 'initialize' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return usePrepareContractWrite({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - functionName: 'bridgeERC721', + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + functionName: 'initialize', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"bridgeERC721To"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"relayMessage"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function usePrepareL2Erc721BridgeBridgeErc721To( +export function usePrepareL2CrossDomainMessengerRelayMessage( config: Omit< - UsePrepareContractWriteConfig, + UsePrepareContractWriteConfig< + typeof l2CrossDomainMessengerABI, + 'relayMessage' + >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return usePrepareContractWrite({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - functionName: 'bridgeERC721To', + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + functionName: 'relayMessage', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `functionName` set to `"finalizeBridgeERC721"`. + * Wraps __{@link usePrepareContractWrite}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `functionName` set to `"sendMessage"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function usePrepareL2Erc721BridgeFinalizeBridgeErc721( +export function usePrepareL2CrossDomainMessengerSendMessage( config: Omit< UsePrepareContractWriteConfig< - typeof l2Erc721BridgeABI, - 'finalizeBridgeERC721' + typeof l2CrossDomainMessengerABI, + 'sendMessage' >, 'abi' | 'address' | 'functionName' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return usePrepareContractWrite({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - functionName: 'finalizeBridgeERC721', + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + functionName: 'sendMessage', ...config, - } as UsePrepareContractWriteConfig) + } as UsePrepareContractWriteConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2Erc721BridgeABI}__. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeEvent( +export function useL2CrossDomainMessengerEvent( config: Omit< - UseContractEventConfig, + UseContractEventConfig, 'abi' | 'address' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return useContractEvent({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], ...config, - } as UseContractEventConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `eventName` set to `"ERC721BridgeFinalized"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `eventName` set to `"FailedRelayedMessage"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeErc721BridgeFinalizedEvent( +export function useL2CrossDomainMessengerFailedRelayedMessageEvent( config: Omit< - UseContractEventConfig, + UseContractEventConfig< + typeof l2CrossDomainMessengerABI, + 'FailedRelayedMessage' + >, 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return useContractEvent({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - eventName: 'ERC721BridgeFinalized', + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + eventName: 'FailedRelayedMessage', ...config, - } as UseContractEventConfig) + } as UseContractEventConfig) } /** - * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2Erc721BridgeABI}__ and `eventName` set to `"ERC721BridgeInitiated"`. + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `eventName` set to `"Initialized"`. * - * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000014) + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) */ -export function useL2Erc721BridgeErc721BridgeInitiatedEvent( +export function useL2CrossDomainMessengerInitializedEvent( config: Omit< - UseContractEventConfig, + UseContractEventConfig, 'abi' | 'address' | 'eventName' - > & { chainId?: keyof typeof l2Erc721BridgeAddress } = {} as any + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any ) { return useContractEvent({ - abi: l2Erc721BridgeABI, - address: l2Erc721BridgeAddress[420], - eventName: 'ERC721BridgeInitiated', + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + eventName: 'Initialized', ...config, - } as UseContractEventConfig) + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `eventName` set to `"RelayedMessage"`. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export function useL2CrossDomainMessengerRelayedMessageEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any +) { + return useContractEvent({ + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + eventName: 'RelayedMessage', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `eventName` set to `"SentMessage"`. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export function useL2CrossDomainMessengerSentMessageEvent( + config: Omit< + UseContractEventConfig, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any +) { + return useContractEvent({ + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + eventName: 'SentMessage', + ...config, + } as UseContractEventConfig) +} + +/** + * Wraps __{@link useContractEvent}__ with `abi` set to __{@link l2CrossDomainMessengerABI}__ and `eventName` set to `"SentMessageExtension1"`. + * + * [__View Contract on Optimism Goerli Etherscan__](https://goerli-optimism.etherscan.io/address/0x4200000000000000000000000000000000000007) + */ +export function useL2CrossDomainMessengerSentMessageExtension1Event( + config: Omit< + UseContractEventConfig< + typeof l2CrossDomainMessengerABI, + 'SentMessageExtension1' + >, + 'abi' | 'address' | 'eventName' + > & { chainId?: keyof typeof l2CrossDomainMessengerAddress } = {} as any +) { + return useContractEvent({ + abi: l2CrossDomainMessengerABI, + address: l2CrossDomainMessengerAddress[420], + eventName: 'SentMessageExtension1', + ...config, + } as UseContractEventConfig) } /** diff --git a/packages/contracts-ts/tsup.config.ts b/packages/contracts-ts/tsup.config.ts index e65e25b796945..fcb9f3fb54058 100644 --- a/packages/contracts-ts/tsup.config.ts +++ b/packages/contracts-ts/tsup.config.ts @@ -10,4 +10,3 @@ export default defineConfig({ sourcemap: true, clean: false, }) - diff --git a/packages/contracts-ts/wagmi.config.ts b/packages/contracts-ts/wagmi.config.ts index c7fe447d91396..b455f916a9d23 100644 --- a/packages/contracts-ts/wagmi.config.ts +++ b/packages/contracts-ts/wagmi.config.ts @@ -138,7 +138,7 @@ if (!glob.sync('node_modules/*').length) { ) } -const deployments = { +const bedrockDeployments = { [1]: glob.sync( `node_modules/@eth-optimism/contracts-bedrock/deployments/${chains[1]}/*.json` ), @@ -152,12 +152,38 @@ const deployments = { `node_modules/@eth-optimism/contracts-bedrock/deployments/${chains[420]}/*.json` ), } - -Object.entries(deployments).forEach(([chain, deploymentFiles]) => { +const peripheryDeployments = { + [1]: glob.sync( + `node_modules/@eth-optimism/contracts-periphery/deployments/${chains[1]}/*.json` + ), + [10]: glob.sync( + // contracts-periphery has inconsistent naming and names optimism optimism instead of optimism-mainnet + `node_modules/@eth-optimism/contracts-periphery/deployments/optimism/*.json` + ), + [5]: glob.sync( + `node_modules/@eth-optimism/contracts-periphery/deployments/${chains[5]}/*.json` + ), + [420]: glob.sync( + `node_modules/@eth-optimism/contracts-periphery/deployments/${chains[420]}/*.json` + ), +} +console.log(peripheryDeployments) +Object.entries(bedrockDeployments).forEach(([chain, deploymentFiles]) => { + if (deploymentFiles.length === 0) { + throw new Error(`No bedrock deployments found for ${chains[chain]}`) + } +}) +Object.entries(peripheryDeployments).forEach(([chain, deploymentFiles]) => { if (deploymentFiles.length === 0) { - throw new Error(`No deployments found for ${chains[chain]}`) + throw new Error(`No periphery deployments found for ${chains[chain]}`) } }) +const deployments = { + [1]: [...bedrockDeployments[1], ...peripheryDeployments[1]], + [10]: [...bedrockDeployments[10], ...peripheryDeployments[10]], + [5]: [...bedrockDeployments[5], ...peripheryDeployments[5]], + [420]: [...bedrockDeployments[420], ...peripheryDeployments[420]], +} const getWagmiContracts = (deploymentFiles: string[]) => deploymentFiles.map((artifactPath) => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9da2e55e05418..66e23e680a3c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -312,8 +312,11 @@ importers: version: 1.0.1(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.3)(viem@0.3.30) devDependencies: '@eth-optimism/contracts-bedrock': - specifier: workspace:0.15.0 + specifier: workspace:* version: link:../contracts-bedrock + '@eth-optimism/contracts-periphery': + specifier: workspace:* + version: link:../contracts-periphery '@testing-library/jest-dom': specifier: ^5.16.5 version: 5.16.5