import { Signer , utils , Contract , ContractFactory , Overrides } from "ethers" ; import { Provider , TransactionRequest } from "@ethersproject/providers" ; import type { Multicall , MulticallInterface } from "../Multicall" ; const _abi = [ { inputs : [ { components : [ { internalType : "address" , name : "target" , type : "address" , } , { internalType : "bytes" , name : "callData" , type : "bytes" , } , ] , internalType : "struct Multicall.Call[]" , name : "calls" , type : "tuple[]" , } , ] , name : "aggregate" , outputs : [ { internalType : "uint256" , name : "blockNumber" , type : "uint256" , } , { internalType : "bytes[]" , name : "returnData" , type : "bytes[]" , } , ] , stateMutability : "nonpayable" , type : "function" , } , { inputs : [ { internalType : "uint256" , name : "blockNumber" , type : "uint256" , } , ] , name : "getBlockHash" , outputs : [ { internalType : "bytes32" , name : "blockHash" , type : "bytes32" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "getCurrentBlockCoinbase" , outputs : [ { internalType : "address" , name : "coinbase" , type : "address" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "getCurrentBlockDifficulty" , outputs : [ { internalType : "uint256" , name : "difficulty" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "getCurrentBlockGasLimit" , outputs : [ { internalType : "uint256" , name : "gaslimit" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "getCurrentBlockTimestamp" , outputs : [ { internalType : "uint256" , name : "timestamp" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ { internalType : "address" , name : "addr" , type : "address" , } , ] , name : "getEthBalance" , outputs : [ { internalType : "uint256" , name : "balance" , type : "uint256" , } , ] , stateMutability : "view" , type : "function" , } , { inputs : [ ] , name : "getLastBlockHash" , outputs : [ { internalType : "bytes32" , name : "blockHash" , type : "bytes32" , } , ] , stateMutability : "view" , type : "function" , } , ] ; const _bytecode = "0x608060405234801561001057600080fd5b50610ab3806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806372425d9d1161005b57806372425d9d1461012a57806386d516e814610148578063a8b0574e14610166578063ee82ac5e1461018457610088565b80630f28c97d1461008d578063252dba42146100ab57806327e86d6e146100dc5780634d2301cc146100fa575b600080fd5b6100956101b4565b6040516100a2919061077d565b60405180910390f35b6100c560048036038101906100c091906105a6565b6101bc565b6040516100d3929190610798565b60405180910390f35b6100e46103a7565b6040516100f19190610762565b60405180910390f35b610114600480360381019061010f919061057d565b6103bc565b604051610121919061077d565b60405180910390f35b6101326103dd565b60405161013f919061077d565b60405180910390f35b6101506103e5565b60405161015d919061077d565b60405180910390f35b61016e6103ed565b60405161017b9190610747565b60405180910390f35b61019e600480360381019061019991906105e7565b6103f5565b6040516101ab9190610762565b60405180910390f35b600042905090565b60006060439150825167ffffffffffffffff811115610204577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561023757816020015b60608152602001906001900390816102225790505b50905060005b83518110156103a157600080858381518110610282577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff168684815181106102dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001516040516102f69190610730565b6000604051808303816000865af19150503d8060008114610333576040519150601f19603f3d011682016040523d82523d6000602084013e610338565b606091505b50915091508161034757600080fd5b80848481518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101819052505050808061039990610997565b91505061023d565b50915091565b60006001436103b691906108aa565b40905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b600045905090565b600041905090565b600081409050919050565b600061041361040e846107ed565b6107c8565b9050808382526020820190508260005b8581101561045357813585016104398882610504565b845260208401935060208301925050600181019050610423565b5050509392505050565b600061047061046b84610819565b6107c8565b90508281526020810184848401111561048857600080fd5b610493848285610924565b509392505050565b6000813590506104aa81610a4f565b92915050565b600082601f8301126104c157600080fd5b81356104d1848260208601610400565b91505092915050565b600082601f8301126104eb57600080fd5b81356104fb84826020860161045d565b91505092915050565b60006040828403121561051657600080fd5b61052060406107c8565b905060006105308482850161049b565b600083015250602082013567ffffffffffffffff81111561055057600080fd5b61055c848285016104da565b60208301525092915050565b60008135905061057781610a66565b92915050565b60006020828403121561058f57600080fd5b600061059d8482850161049b565b91505092915050565b6000602082840312156105b857600080fd5b600082013567ffffffffffffffff8111156105d257600080fd5b6105de848285016104b0565b91505092915050565b6000602082840312156105f957600080fd5b600061060784828501610568565b91505092915050565b600061061c83836106b7565b905092915050565b61062d816108de565b82525050565b600061063e8261085a565b610648818561087d565b93508360208202850161065a8561084a565b8060005b8581101561069657848403895281516106778582610610565b945061068283610870565b925060208a0199505060018101905061065e565b50829750879550505050505092915050565b6106b1816108f0565b82525050565b60006106c282610865565b6106cc818561088e565b93506106dc818560208601610933565b6106e581610a3e565b840191505092915050565b60006106fb82610865565b610705818561089f565b9350610715818560208601610933565b80840191505092915050565b61072a8161091a565b82525050565b600061073c82846106f0565b915081905092915050565b600060208201905061075c6000830184610624565b92915050565b600060208201905061077760008301846106a8565b92915050565b60006020820190506107926000830184610721565b92915050565b60006040820190506107ad6000830185610721565b81810360208301526107bf8184610633565b90509392505050565b60006107d26107e3565b90506107de8282610966565b919050565b6000604051905090565b600067ffffffffffffffff82111561080857610807610a0f565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561083457610833610a0f565b5b61083d82610a3e565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006108b58261091a565b91506108c08361091a565b9250828210156108d3576108d26109e0565b5b828203905092915050565b60006108e9826108fa565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015610951578082015181840152602081019050610936565b83811115610960576000848401525b50505050565b61096f82610a3e565b810181811067ffffffffffffffff8211171561098e5761098d610a0f565b5b80604052505050565b60006109a28261091a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156109d5576109d46109e0565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b610a58816108de565b8114610a6357600080fd5b50565b610a6f8161091a565b8114610a7a57600080fd5b5056fea26469706673582212207ecc9fc9526b5f8ad9f803546a75f9b7cee7b135f8ec19a7267294a95a43d0a964736f6c63430008030033" ; export class Multicall__factory extends ContractFactory { constructor ( signer ? ) { super ( _abi , _bytecode , signer ) ; } deploy ( overrides ? ) { return super . deploy ( overrides || { } ) as Promise < Multicall > ; } getDeployTransaction ( overrides ? ) { return super . getDeployTransaction ( overrides || { } ) ; } attach ( address ) { return super . attach ( address ) as Multicall ; } connect ( signer ) { return super . connect ( signer ) as Multicall__factory ; } static readonly bytecode = _bytecode ; static readonly abi = _abi ; static createInterface ( ) { return new utils . Interface ( _abi ) as MulticallInterface ; } static connect ( address , signerOrProvider ) { return new Contract ( address , _abi , signerOrProvider ) as Multicall ; } }