UNPKG

@eth-optimism/contracts-periphery

Version:

[Optimism] External (out-of-protocol) L1 and L2 smart contracts for Optimism

250 lines (249 loc) 17.8 kB
{ "_format": "hh-sol-artifact-1", "contractName": "OptimistInviterHelper", "sourceName": "contracts/testing/helpers/OptimistInviterHelper.sol", "abi": [ { "inputs": [ { "internalType": "contract OptimistInviter", "name": "_optimistInviter", "type": "address" }, { "internalType": "string", "name": "_name", "type": "string" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "CLAIMABLE_INVITE_TYPEHASH", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "EIP712_DOMAIN_TYPEHASH", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "consumeNonce", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "currentNonce", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "issuer", "type": "address" }, { "internalType": "bytes32", "name": "nonce", "type": "bytes32" } ], "internalType": "struct OptimistInviter.ClaimableInvite", "name": "_claimableInvite", "type": "tuple" } ], "name": "getClaimableInviteStructHash", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_issuer", "type": "address" } ], "name": "getClaimableInviteWithNewNonce", "outputs": [ { "components": [ { "internalType": "address", "name": "issuer", "type": "address" }, { "internalType": "bytes32", "name": "nonce", "type": "bytes32" } ], "internalType": "struct OptimistInviter.ClaimableInvite", "name": "", "type": "tuple" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "issuer", "type": "address" }, { "internalType": "bytes32", "name": "nonce", "type": "bytes32" } ], "internalType": "struct OptimistInviter.ClaimableInvite", "name": "_claimableInvite", "type": "tuple" } ], "name": "getDigest", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "issuer", "type": "address" }, { "internalType": "bytes32", "name": "nonce", "type": "bytes32" } ], "internalType": "struct OptimistInviter.ClaimableInvite", "name": "_claimableInvite", "type": "tuple" }, { "internalType": "bytes", "name": "_name", "type": "bytes" }, { "internalType": "bytes", "name": "_version", "type": "bytes" }, { "internalType": "uint256", "name": "_chainid", "type": "uint256" }, { "internalType": "address", "name": "_verifyingContract", "type": "address" } ], "name": "getDigestWithEIP712Domain", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "optimistInviter", "outputs": [ { "internalType": "contract OptimistInviter", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ], "bytecode": "0x60806040523480156200001157600080fd5b5060405162000d5a38038062000d5a83398101604081905262000034916200007c565b600080546001600160a01b0319166001600160a01b03841617905560016200005d82826200020b565b505050620002d7565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156200009057600080fd5b82516001600160a01b0381168114620000a857600080fd5b602084810151919350906001600160401b0380821115620000c857600080fd5b818601915086601f830112620000dd57600080fd5b815181811115620000f257620000f262000066565b604051601f8201601f19908116603f011681019083821181831017156200011d576200011d62000066565b8160405282815289868487010111156200013657600080fd5b600093505b828410156200015a57848401860151818501870152928501926200013b565b828411156200016c5760008684830101525b8096505050505050509250929050565b600181811c908216806200019157607f821691505b602082108103620001b257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200020657600081815260208120601f850160051c81016020861015620001e15750805b601f850160051c820191505b818110156200020257828155600101620001ed565b5050505b505050565b81516001600160401b0381111562000227576200022762000066565b6200023f816200023884546200017c565b84620001b8565b602080601f8311600181146200027757600084156200025e5750858301515b600019600386901b1c1916600185901b17855562000202565b600085815260208120601f198616915b82811015620002a85788860151825594840194600190910190840162000287565b5085821015620002c75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610a7380620002e76000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c8063adb610a311610076578063c7977be71161005b578063c7977be71461018d578063d1829907146101b4578063eb1df626146101f957600080fd5b8063adb610a31461015d578063c4fc453d1461016657600080fd5b80631c6e7f25116100a75780631c6e7f25146100fe57806334b15118146101115780638ebe24e51461011957600080fd5b8063019a4f49146100c357806306fdde03146100e9575b600080fd5b6100d66100d1366004610774565b61020c565b6040519081526020015b60405180910390f35b6100f1610315565b6040516100e09190610834565b6100d661010c366004610885565b6103a3565b6100d661050c565b61012c6101273660046108a8565b61054e565b60408051825173ffffffffffffffffffffffffffffffffffffffff16815260209283015192810192909252016100e0565b6100d660025481565b6100d67f6529fd129351e725d7bcbc468b0b0b4675477e56b58514e69ab7e66ddfd20fce81565b6100d67f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6000546101d49073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e0565b6100d66102073660046108c3565b610599565b8351602080860191909120845185830120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9481019490945283019190915260608201526080810183905273ffffffffffffffffffffffffffffffffffffffff821660a0820152600090819060c00160405160208183030381529060405280519060200120905061030a816102af8980360381019061020791906108c3565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b979650505050505050565b600180546103229061091a565b80601f016020809104026020016040519081016040528092919081815260200182805461034e9061091a565b801561039b5780601f106103705761010080835404028352916020019161039b565b820191906000526020600020905b81548152906001019060200180831161037e57829003601f168201915b505050505081565b600061050682600180546103b69061091a565b80601f01602080910402602001604051908101604052809291908181526020018280546103e29061091a565b801561042f5780601f106104045761010080835404028352916020019161042f565b820191906000526020600020905b81548152906001019060200180831161041257829003601f168201915b505060008054604080517feccec5a8000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff909216955063eccec5a8945060048082019450908290030181865afa1580156104a0573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526104e69190810190610967565b600054469073ffffffffffffffffffffffffffffffffffffffff1661020c565b92915050565b600280546000918261051d836109de565b9190505560405160200161053391815260200190565b60405160208183030381529060405280519060200120905090565b604080518082019091526000808252602082015260405180604001604052808373ffffffffffffffffffffffffffffffffffffffff16815260200161059161050c565b905292915050565b80516020808301516040516000936105fc937f6529fd129351e725d7bcbc468b0b0b4675477e56b58514e69ab7e66ddfd20fce9391920192835273ffffffffffffffffffffffffffffffffffffffff919091166020830152604082015260600190565b604051602081830303815290604052805190602001209050919050565b60006040828403121561062b57600080fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156106a7576106a7610631565b604052919050565b600067ffffffffffffffff8211156106c9576106c9610631565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261070657600080fd5b8135610719610714826106af565b610660565b81815284602083860101111561072e57600080fd5b816020850160208301376000918101602001919091529392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076f57600080fd5b919050565b600080600080600060c0868803121561078c57600080fd5b6107968787610619565b9450604086013567ffffffffffffffff808211156107b357600080fd5b6107bf89838a016106f5565b955060608801359150808211156107d557600080fd5b506107e2888289016106f5565b935050608086013591506107f860a0870161074b565b90509295509295909350565b60005b8381101561081f578181015183820152602001610807565b8381111561082e576000848401525b50505050565b6020815260008251806020840152610853816040850160208701610804565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006040828403121561089757600080fd5b6108a18383610619565b9392505050565b6000602082840312156108ba57600080fd5b6108a18261074b565b6000604082840312156108d557600080fd5b6040516040810181811067ffffffffffffffff821117156108f8576108f8610631565b6040526109048361074b565b8152602083013560208201528091505092915050565b600181811c9082168061092e57607f821691505b60208210810361062b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006020828403121561097957600080fd5b815167ffffffffffffffff81111561099057600080fd5b8201601f810184136109a157600080fd5b80516109af610714826106af565b8181528560208385010111156109c457600080fd5b6109d5826020830160208601610804565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610a36577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea264697066735822122008a451c64e453f0c26c3c7e7ca787efc17ba10a6e47ae42ac0a5decc70e0d2af64736f6c634300080f0033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100be5760003560e01c8063adb610a311610076578063c7977be71161005b578063c7977be71461018d578063d1829907146101b4578063eb1df626146101f957600080fd5b8063adb610a31461015d578063c4fc453d1461016657600080fd5b80631c6e7f25116100a75780631c6e7f25146100fe57806334b15118146101115780638ebe24e51461011957600080fd5b8063019a4f49146100c357806306fdde03146100e9575b600080fd5b6100d66100d1366004610774565b61020c565b6040519081526020015b60405180910390f35b6100f1610315565b6040516100e09190610834565b6100d661010c366004610885565b6103a3565b6100d661050c565b61012c6101273660046108a8565b61054e565b60408051825173ffffffffffffffffffffffffffffffffffffffff16815260209283015192810192909252016100e0565b6100d660025481565b6100d67f6529fd129351e725d7bcbc468b0b0b4675477e56b58514e69ab7e66ddfd20fce81565b6100d67f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6000546101d49073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e0565b6100d66102073660046108c3565b610599565b8351602080860191909120845185830120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9481019490945283019190915260608201526080810183905273ffffffffffffffffffffffffffffffffffffffff821660a0820152600090819060c00160405160208183030381529060405280519060200120905061030a816102af8980360381019061020791906108c3565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b979650505050505050565b600180546103229061091a565b80601f016020809104026020016040519081016040528092919081815260200182805461034e9061091a565b801561039b5780601f106103705761010080835404028352916020019161039b565b820191906000526020600020905b81548152906001019060200180831161037e57829003601f168201915b505050505081565b600061050682600180546103b69061091a565b80601f01602080910402602001604051908101604052809291908181526020018280546103e29061091a565b801561042f5780601f106104045761010080835404028352916020019161042f565b820191906000526020600020905b81548152906001019060200180831161041257829003601f168201915b505060008054604080517feccec5a8000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff909216955063eccec5a8945060048082019450908290030181865afa1580156104a0573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526104e69190810190610967565b600054469073ffffffffffffffffffffffffffffffffffffffff1661020c565b92915050565b600280546000918261051d836109de565b9190505560405160200161053391815260200190565b60405160208183030381529060405280519060200120905090565b604080518082019091526000808252602082015260405180604001604052808373ffffffffffffffffffffffffffffffffffffffff16815260200161059161050c565b905292915050565b80516020808301516040516000936105fc937f6529fd129351e725d7bcbc468b0b0b4675477e56b58514e69ab7e66ddfd20fce9391920192835273ffffffffffffffffffffffffffffffffffffffff919091166020830152604082015260600190565b604051602081830303815290604052805190602001209050919050565b60006040828403121561062b57600080fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156106a7576106a7610631565b604052919050565b600067ffffffffffffffff8211156106c9576106c9610631565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261070657600080fd5b8135610719610714826106af565b610660565b81815284602083860101111561072e57600080fd5b816020850160208301376000918101602001919091529392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461076f57600080fd5b919050565b600080600080600060c0868803121561078c57600080fd5b6107968787610619565b9450604086013567ffffffffffffffff808211156107b357600080fd5b6107bf89838a016106f5565b955060608801359150808211156107d557600080fd5b506107e2888289016106f5565b935050608086013591506107f860a0870161074b565b90509295509295909350565b60005b8381101561081f578181015183820152602001610807565b8381111561082e576000848401525b50505050565b6020815260008251806020840152610853816040850160208701610804565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60006040828403121561089757600080fd5b6108a18383610619565b9392505050565b6000602082840312156108ba57600080fd5b6108a18261074b565b6000604082840312156108d557600080fd5b6040516040810181811067ffffffffffffffff821117156108f8576108f8610631565b6040526109048361074b565b8152602083013560208201528091505092915050565b600181811c9082168061092e57607f821691505b60208210810361062b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006020828403121561097957600080fd5b815167ffffffffffffffff81111561099057600080fd5b8201601f810184136109a157600080fd5b80516109af610714826106af565b8181528560208385010111156109c457600080fd5b6109d5826020830160208601610804565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610a36577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea264697066735822122008a451c64e453f0c26c3c7e7ca787efc17ba10a6e47ae42ac0a5decc70e0d2af64736f6c634300080f0033", "linkReferences": {}, "deployedLinkReferences": {} }