diff --git a/espresso/devnet-tests/key_rotation_test.go b/espresso/devnet-tests/key_rotation_test.go index eebb33e0975..a9ac7d23c74 100644 --- a/espresso/devnet-tests/key_rotation_test.go +++ b/espresso/devnet-tests/key_rotation_test.go @@ -67,10 +67,10 @@ func TestChangeBatchInboxOwner(t *testing.T) { proxyAdmin, err := e2ebindings.NewProxyAdmin(proxyAdminAddress, d.L1) require.NoError(t, err) - // Verify current owner matches + // Verify current owner matches initially (they're set to the same address during deployment) proxyAdminOwner, err := proxyAdmin.Owner(&bind.CallOpts{}) require.NoError(t, err) - require.Equal(t, currentOwner, proxyAdminOwner, "BatchAuthenticator owner should match ProxyAdmin owner") + require.Equal(t, currentOwner, proxyAdminOwner, "BatchAuthenticator owner should initially match ProxyAdmin owner") // Use batch authenticator owner key to sign the transaction batchAuthenticatorPrivateKeyHex := os.Getenv("BATCH_AUTHENTICATOR_OWNER_PRIVATE_KEY") @@ -83,18 +83,40 @@ func TestChangeBatchInboxOwner(t *testing.T) { batchAuthenticatorOwnerOpts, err := bind.NewKeyedTransactorWithChainID(batchAuthenticatorKey, l1ChainID) require.NoError(t, err) - // Call TransferOwnership on the ProxyAdmin directly + // Transfer ownership of both ProxyAdmin and BatchAuthenticator + // Note: BatchAuthenticator and ProxyAdmin have independent ownership since the migration + // to OwnableWithGuardiansUpgradeable, so we need to transfer both. + + // 1. Transfer ProxyAdmin ownership tx, err := proxyAdmin.TransferOwnership(batchAuthenticatorOwnerOpts, bobAddress) require.NoError(t, err) + _, err = wait.ForReceiptOK(ctx, d.L1, tx.Hash()) + require.NoError(t, err) - // Wait for transaction receipt and check if it succeeded + // 2. Transfer BatchAuthenticator ownership (2-step process with Ownable2StepUpgradeable) + // Step 2a: Current owner initiates transfer + tx, err = batchAuthenticator.TransferOwnership(batchAuthenticatorOwnerOpts, bobAddress) + require.NoError(t, err) _, err = wait.ForReceiptOK(ctx, d.L1, tx.Hash()) require.NoError(t, err) - // Ensure the owner has been changed + // Step 2b: New owner (Bob) accepts ownership + bobOpts, err := bind.NewKeyedTransactorWithChainID(d.secrets.Bob, l1ChainID) + require.NoError(t, err) + tx, err = batchAuthenticator.AcceptOwnership(bobOpts) + require.NoError(t, err) + _, err = wait.ForReceiptOK(ctx, d.L1, tx.Hash()) + require.NoError(t, err) + + // Verify ProxyAdmin owner has been changed + newProxyAdminOwner, err := proxyAdmin.Owner(&bind.CallOpts{}) + require.NoError(t, err) + require.Equal(t, bobAddress, newProxyAdminOwner, "ProxyAdmin owner should be updated to Bob") + + // Verify BatchAuthenticator owner has been changed newOwner, err := batchAuthenticator.Owner(&bind.CallOpts{}) require.NoError(t, err) - require.Equal(t, newOwner, bobAddress) + require.Equal(t, bobAddress, newOwner, "BatchAuthenticator owner should be updated to Bob") // Check that everything still functions require.NoError(t, d.RunSimpleL2Burn()) diff --git a/espresso/environment/enclave_helpers.go b/espresso/environment/enclave_helpers.go index e8dfd756529..1ab4debac92 100644 --- a/espresso/environment/enclave_helpers.go +++ b/espresso/environment/enclave_helpers.go @@ -39,6 +39,11 @@ const ( ENCLAVE_INTERMEDIATE_IMAGE_TAG = "op-batcher-enclave:tests" ENCLAVE_IMAGE_TAG = "op-batcher-enclaver:tests" ESPRESSO_ENABLE_ENCLAVE_TESTS = "ESPRESSO_RUN_ENCLAVE_TESTS" + + // TeeTypeNitro corresponds to IEspressoTEEVerifier.TeeType.NITRO enum value + TeeTypeNitro uint8 = 1 + // ServiceTypeBatchPoster corresponds to ServiceType.BatchPoster enum value + ServiceTypeBatchPoster uint8 = 0 ) // Skips the calling test if `ESPRESSO_ENABLE_ENCLAVE_TESTS` is not set. @@ -274,21 +279,15 @@ func RegisterEnclaveHash(ctx context.Context, sys *e2esys.System, pcr0Bytes []by return fmt.Errorf("failed to create verifier: %w", err) } - nitroVerifierAddress, err := verifier.EspressoNitroTEEVerifier(&bind.CallOpts{}) - if err != nil { - return fmt.Errorf("failed to get nitro verifier address: %w", err) - } - - nitroVerifier, err := bindings.NewEspressoNitroTEEVerifier(nitroVerifierAddress, l1Client) - if err != nil { - return fmt.Errorf("failed to create nitro verifier: %w", err) - } - opts, err := bind.NewKeyedTransactorWithChainID(sys.Cfg.Secrets.Deployer, sys.Cfg.L1ChainIDBig()) if err != nil { return fmt.Errorf("failed to create transactor: %w", err) } - registrationTx, err := nitroVerifier.SetEnclaveHash(opts, crypto.Keccak256Hash(pcr0Bytes), true) + + // SetEnclaveHash must be called through EspressoTEEVerifier wrapper because + // NitroTEEVerifier.setEnclaveHash has onlyTEEVerifier modifier, restricting calls + // to only the TEEVerifier contract. The wrapper has onlyGuardianOrOwner permissions. + registrationTx, err := verifier.SetEnclaveHash(opts, crypto.Keccak256Hash(pcr0Bytes), true, TeeTypeNitro, ServiceTypeBatchPoster) if err != nil { return fmt.Errorf("failed to create registration transaction: %w", err) } diff --git a/op-batcher/bindings/batch_authenticator.go b/op-batcher/bindings/batch_authenticator.go index 62196dab21d..6d96fa74356 100644 --- a/op-batcher/bindings/batch_authenticator.go +++ b/op-batcher/bindings/batch_authenticator.go @@ -31,8 +31,8 @@ var ( // BatchAuthenticatorMetaData contains all meta data concerning the BatchAuthenticator contract. var BatchAuthenticatorMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_espressoTEEVerifier\",\"type\":\"address\",\"internalType\":\"contractIEspressoTEEVerifier\"},{\"name\":\"_teeBatcher\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_nonTeeBatcher\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"activeIsTee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"authenticateBatchInfo\",\"inputs\":[{\"name\":\"commitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"espressoTEEVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEspressoTEEVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonTeeBatcher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerSigner\",\"inputs\":[{\"name\":\"attestationTbs\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"switchBatcher\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"teeBatcher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"validBatchInfo\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BatchInfoAuthenticated\",\"inputs\":[{\"name\":\"commitment\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"signer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SignerRegistrationInitiated\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", - Bin: "0x60e060405234801561000f575f5ffd5b50604051611c58380380611c5883398181016040528101906100319190610358565b61004d6100426101f760201b60201c565b6101fe60201b60201c565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036100bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100b29061043c565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610129576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610120906104ca565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250508273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1681525050600160025f6101000a81548160ff0219169083151502179055506101ee816101fe60201b60201c565b505050506104e8565b5f33905090565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102ec826102c3565b9050919050565b5f6102fd826102e2565b9050919050565b61030d816102f3565b8114610317575f5ffd5b50565b5f8151905061032881610304565b92915050565b610337816102e2565b8114610341575f5ffd5b50565b5f815190506103528161032e565b92915050565b5f5f5f5f608085870312156103705761036f6102bf565b5b5f61037d8782880161031a565b945050602061038e87828801610344565b935050604061039f87828801610344565b92505060606103b087828801610344565b91505092959194509250565b5f82825260208201905092915050565b7f426174636841757468656e74696361746f723a207a65726f20746565206261745f8201527f6368657200000000000000000000000000000000000000000000000000000000602082015250565b5f6104266024836103bc565b9150610431826103cc565b604082019050919050565b5f6020820190508181035f8301526104538161041a565b9050919050565b7f426174636841757468656e74696361746f723a207a65726f206e6f6e2d7465655f8201527f2062617463686572000000000000000000000000000000000000000000000000602082015250565b5f6104b46028836103bc565b91506104bf8261045a565b604082019050919050565b5f6020820190508181035f8301526104e1816104a8565b9050919050565b60805160a05160c0516117316105275f395f81816102ad0152818161047a015261063801525f61028901525f81816103b7015261074401526117315ff3fe608060405234801561000f575f5ffd5b50600436106100b2575f3560e01c8063bc347f471161006f578063bc347f4714610154578063d909ba7c1461015e578063f2fde38b1461017c578063f81f208314610198578063fa14fe6d146101c8578063fc619e41146101e6576100b2565b806354fd4d50146100b6578063715018a6146100d45780637877a9ed146100de5780638da5cb5b146100fc578063b1bd42851461011a578063ba58e82a14610138575b5f5ffd5b6100be610202565b6040516100cb9190610d3a565b60405180910390f35b6100dc61023b565b005b6100e661024e565b6040516100f39190610d74565b60405180910390f35b610104610260565b6040516101119190610dcc565b60405180910390f35b610122610287565b60405161012f9190610dcc565b60405180910390f35b610152600480360381019061014d9190610e4e565b6102ab565b005b61015c610383565b005b6101666103b5565b6040516101739190610dcc565b60405180910390f35b61019660048036038101906101919190610ef6565b6103d9565b005b6101b260048036038101906101ad9190610f54565b61045b565b6040516101bf9190610d74565b60405180910390f35b6101d0610478565b6040516101dd9190610fda565b60405180910390f35b61020060048036038101906101fb9190610ff3565b61049c565b005b6040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b610243610847565b61024c5f6108c5565b565b60025f9054906101000a900460ff1681565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166335ecb4c18585858560016040518663ffffffff1660e01b815260040161030d95949392919061110d565b5f604051808303815f87803b158015610324575f5ffd5b505af1158015610336573d5f5f3e3d5ffd5b505050503373ffffffffffffffffffffffffffffffffffffffff167f665b016a0ac50d1280744eaaff1cf21254d0fd30e4c3987d291913c32163416c60405160405180910390a250505050565b61038b610847565b60025f9054906101000a900460ff161560025f6101000a81548160ff021916908315150217905550565b7f000000000000000000000000000000000000000000000000000000000000000081565b6103e1610847565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361044f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610446906111c4565b60405180910390fd5b610458816108c5565b50565b6001602052805f5260405f205f915054906101000a900460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f82828080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505090506041815114610527576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051e9061122c565b60405180910390fd5b5f8160408151811061053c5761053b61124a565b5b602001015160f81c60f81b60f81c90505f8160ff161480610560575060018160ff16145b156105bb57601b8161057291906112b0565b90508060f81b8260408151811061058c5761058b61124a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053505b5f6105c68684610986565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062d9061132e565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d80a4c286040518163ffffffff1660e01b8152600401602060405180830381865afa15801561069f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106c39190611387565b73ffffffffffffffffffffffffffffffffffffffff16630123d0c1826040518263ffffffff1660e01b81526004016106fb9190610dcc565b602060405180830381865afa158015610716573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061073a91906113dc565b15801561079357507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b156107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ca90611451565b60405180910390fd5b6001805f8881526020019081526020015f205f6101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff16867f731978a77d438b0ea35a9034fb28d9cf9372e1649f18c213110adcfab65c5c5c60405160405180910390a3505050505050565b61084f6109ab565b73ffffffffffffffffffffffffffffffffffffffff1661086d610260565b73ffffffffffffffffffffffffffffffffffffffff16146108c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ba906114b9565b60405180910390fd5b565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5f5f61099385856109b2565b915091506109a0816109fe565b819250505092915050565b5f33905090565b5f5f60418351036109ef575f5f5f602086015192506040860151915060608601515f1a90506109e387828585610bc9565b945094505050506109f7565b5f6002915091505b9250929050565b5f6004811115610a1157610a1061109a565b5b816004811115610a2457610a2361109a565b5b0315610bc65760016004811115610a3e57610a3d61109a565b5b816004811115610a5157610a5061109a565b5b03610a91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8890611521565b60405180910390fd5b60026004811115610aa557610aa461109a565b5b816004811115610ab857610ab761109a565b5b03610af8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aef90611589565b60405180910390fd5b60036004811115610b0c57610b0b61109a565b5b816004811115610b1f57610b1e61109a565b5b03610b5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5690611617565b60405180910390fd5b600480811115610b7257610b7161109a565b5b816004811115610b8557610b8461109a565b5b03610bc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbc906116a5565b60405180910390fd5b5b50565b5f5f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0835f1c1115610c01575f600391509150610cc1565b601b8560ff1614158015610c195750601c8560ff1614155b15610c2a575f600491509150610cc1565b5f6001878787876040515f8152602001604052604051610c4d94939291906116e1565b6020604051602081039080840390855afa158015610c6d573d5f5f3e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610cb9575f60019250925050610cc1565b805f92509250505b94509492505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610d0c82610cca565b610d168185610cd4565b9350610d26818560208601610ce4565b610d2f81610cf2565b840191505092915050565b5f6020820190508181035f830152610d528184610d02565b905092915050565b5f8115159050919050565b610d6e81610d5a565b82525050565b5f602082019050610d875f830184610d65565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610db682610d8d565b9050919050565b610dc681610dac565b82525050565b5f602082019050610ddf5f830184610dbd565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f840112610e0e57610e0d610ded565b5b8235905067ffffffffffffffff811115610e2b57610e2a610df1565b5b602083019150836001820283011115610e4757610e46610df5565b5b9250929050565b5f5f5f5f60408587031215610e6657610e65610de5565b5b5f85013567ffffffffffffffff811115610e8357610e82610de9565b5b610e8f87828801610df9565b9450945050602085013567ffffffffffffffff811115610eb257610eb1610de9565b5b610ebe87828801610df9565b925092505092959194509250565b610ed581610dac565b8114610edf575f5ffd5b50565b5f81359050610ef081610ecc565b92915050565b5f60208284031215610f0b57610f0a610de5565b5b5f610f1884828501610ee2565b91505092915050565b5f819050919050565b610f3381610f21565b8114610f3d575f5ffd5b50565b5f81359050610f4e81610f2a565b92915050565b5f60208284031215610f6957610f68610de5565b5b5f610f7684828501610f40565b91505092915050565b5f819050919050565b5f610fa2610f9d610f9884610d8d565b610f7f565b610d8d565b9050919050565b5f610fb382610f88565b9050919050565b5f610fc482610fa9565b9050919050565b610fd481610fba565b82525050565b5f602082019050610fed5f830184610fcb565b92915050565b5f5f5f6040848603121561100a57611009610de5565b5b5f61101786828701610f40565b935050602084013567ffffffffffffffff81111561103857611037610de9565b5b61104486828701610df9565b92509250509250925092565b5f82825260208201905092915050565b828183375f83830152505050565b5f6110798385611050565b9350611086838584611060565b61108f83610cf2565b840190509392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106110d8576110d761109a565b5b50565b5f8190506110e8826110c7565b919050565b5f6110f7826110db565b9050919050565b611107816110ed565b82525050565b5f6060820190508181035f83015261112681878961106e565b9050818103602083015261113b81858761106e565b905061114a60408301846110fe565b9695505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6111ae602683610cd4565b91506111b982611154565b604082019050919050565b5f6020820190508181035f8301526111db816111a2565b9050919050565b7f496e76616c6964207369676e6174757265206c656e67746800000000000000005f82015250565b5f611216601883610cd4565b9150611221826111e2565b602082019050919050565b5f6020820190508181035f8301526112438161120a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60ff82169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6112ba82611277565b91506112c583611277565b9250828201905060ff8111156112de576112dd611283565b5b92915050565b7f496e76616c6964207369676e61747572650000000000000000000000000000005f82015250565b5f611318601183610cd4565b9150611323826112e4565b602082019050919050565b5f6020820190508181035f8301526113458161130c565b9050919050565b5f61135682610dac565b9050919050565b6113668161134c565b8114611370575f5ffd5b50565b5f815190506113818161135d565b92915050565b5f6020828403121561139c5761139b610de5565b5b5f6113a984828501611373565b91505092915050565b6113bb81610d5a565b81146113c5575f5ffd5b50565b5f815190506113d6816113b2565b92915050565b5f602082840312156113f1576113f0610de5565b5b5f6113fe848285016113c8565b91505092915050565b7f496e76616c6964207369676e65720000000000000000000000000000000000005f82015250565b5f61143b600e83610cd4565b915061144682611407565b602082019050919050565b5f6020820190508181035f8301526114688161142f565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6114a3602083610cd4565b91506114ae8261146f565b602082019050919050565b5f6020820190508181035f8301526114d081611497565b9050919050565b7f45434453413a20696e76616c6964207369676e617475726500000000000000005f82015250565b5f61150b601883610cd4565b9150611516826114d7565b602082019050919050565b5f6020820190508181035f830152611538816114ff565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e677468005f82015250565b5f611573601f83610cd4565b915061157e8261153f565b602082019050919050565b5f6020820190508181035f8301526115a081611567565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c5f8201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b5f611601602283610cd4565b915061160c826115a7565b604082019050919050565b5f6020820190508181035f83015261162e816115f5565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c5f8201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b5f61168f602283610cd4565b915061169a82611635565b604082019050919050565b5f6020820190508181035f8301526116bc81611683565b9050919050565b6116cc81610f21565b82525050565b6116db81611277565b82525050565b5f6080820190506116f45f8301876116c3565b61170160208301866116d2565b61170e60408301856116c3565b61171b60608301846116c3565b9594505050505056fea164736f6c634300081c000a", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEFAULT_ADMIN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GUARDIAN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"activeIsTee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addGuardian\",\"inputs\":[{\"name\":\"guardian\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"authenticateBatchInfo\",\"inputs\":[{\"name\":\"commitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"espressoTEEVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEspressoTEEVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGuardians\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleAdmin\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleMember\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleMemberCount\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleMembers\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"grantRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"guardianCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hasRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initVersion\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_espressoTEEVerifier\",\"type\":\"address\",\"internalType\":\"contractIEspressoTEEVerifier\"},{\"name\":\"_teeBatcher\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_nonTeeBatcher\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isGuardian\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nitroValidator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonTeeBatcher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxyAdmin\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIProxyAdmin\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxyAdminOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerSigner\",\"inputs\":[{\"name\":\"attestationTbs\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeGuardian\",\"inputs\":[{\"name\":\"guardian\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"callerConfirmation\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"revokeRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNonTeeBatcher\",\"inputs\":[{\"name\":\"_newNonTeeBatcher\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setTeeBatcher\",\"inputs\":[{\"name\":\"_newTeeBatcher\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"switchBatcher\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"teeBatcher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"validBatchInfo\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"validateBatch\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"validateNonTeeBatch\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"validateTeeBatch\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BatchInfoAuthenticated\",\"inputs\":[{\"name\":\"commitment\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"signer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BatcherSwitched\",\"inputs\":[{\"name\":\"activeIsTee\",\"type\":\"bool\",\"indexed\":true,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GuardianAdded\",\"inputs\":[{\"name\":\"guardian\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GuardianRemoved\",\"inputs\":[{\"name\":\"guardian\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NonTeeBatcherUpdated\",\"inputs\":[{\"name\":\"oldNonTeeBatcher\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newNonTeeBatcher\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleAdminChanged\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"previousAdminRole\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newAdminRole\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleGranted\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleRevoked\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SignerRegistrationInitiated\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TeeBatcherUpdated\",\"inputs\":[{\"name\":\"oldTeeBatcher\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newTeeBatcher\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AccessControlBadConfirmation\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AccessControlUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"neededRole\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"InvalidAddress\",\"inputs\":[{\"name\":\"contract_\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"InvalidGuardianAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotGuardian\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"NotGuardianOrOwner\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ProxyAdminOwnedBase_NotProxyAdmin\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ProxyAdminOwnedBase_NotProxyAdminOrProxyAdminOwner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ProxyAdminOwnedBase_NotProxyAdminOwner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ProxyAdminOwnedBase_NotResolvedDelegateProxy\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ProxyAdminOwnedBase_NotSharedProxyAdminOwner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ProxyAdminOwnedBase_ProxyAdminNotFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReinitializableBase_ZeroInitVersion\",\"inputs\":[]}]", + Bin: "0x60a060405234801561000f575f5ffd5b50600160805261001d610022565b6100d4565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100725760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d15780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516135c56100f35f395f81816103f0015261175f01526135c55ff3fe608060405234801561000f575f5ffd5b50600436106102b7575f3560e01c80639010d07c11610171578063ca15c873116100d2578063f2fde38b11610088578063f8c8765e1161006e578063f8c8765e14610679578063fa14fe6d1461068c578063fc619e41146106ac575f5ffd5b8063f2fde38b14610644578063f81f208314610657575f5ffd5b8063d909ba7c116100b8578063d909ba7c14610614578063dad544e014610634578063e30c39781461063c575f5ffd5b8063ca15c873146105ee578063d547741f14610601575f5ffd5b8063a3246ad311610127578063b1bd42851161010d578063b1bd4285146105b3578063ba58e82a146105d3578063bc347f47146105e6575f5ffd5b8063a3246ad31461058d578063a526d83b146105a0575f5ffd5b806391d148541161015757806391d148541461050f578063995bd81e14610573578063a217fddf14610586575f5ffd5b80639010d07c146104e957806391a1a35d146104fc575f5ffd5b80633e47158c1161021b578063715018a6116101d157806379ba5097116101b757806379ba5097146104c65780638c8fc531146104ce5780638da5cb5b146104e1575f5ffd5b8063715018a6146104995780637877a9ed146104a1575f5ffd5b806354fd4d501161020157806354fd4d501461042a5780636f7eda47146104735780637140415614610486575f5ffd5b80633e47158c1461041a57806354387ad714610422575f5ffd5b806324ea54f411610270578063361d2d7b11610256578063361d2d7b146103c357806336568abe146103d657806338d38c97146103e9575f5ffd5b806324ea54f4146103875780632f2ff15d146103ae575f5ffd5b80630c68ba21116102a05780630c68ba21146102f85780631b076a4c1461030b578063248a9ca314610338575f5ffd5b806301ffc9a7146102bb5780630665f04b146102e3575b5f5ffd5b6102ce6102c9366004612e74565b6106bf565b60405190151581526020015b60405180910390f35b6102eb61071a565b6040516102da9190612eb3565b6102ce610306366004612f2c565b610808565b610313610854565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102da565b610379610346366004612f47565b5f9081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b6040519081526020016102da565b6103797f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a504181565b6103c16103bc366004612f5e565b6108ea565b005b6103c16103d1366004612f2c565b610933565b6103c16103e4366004612f5e565b610a15565b60405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016102da565b610313610a73565b610379610c79565b6104666040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516102da9190612f8c565b6103c1610481366004612f2c565b610ca3565b6103c1610494366004612f2c565b610d86565b6103c1610e47565b6003546102ce9074010000000000000000000000000000000000000000900460ff1681565b6103c1610e5a565b6103c16104dc366004612f2c565b610ed2565b610313610fb5565b6103136104f7366004612fdf565b610fbe565b6103c161050a36600461303d565b610ffe565b6102ce61051d366004612f5e565b5f9182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6103c161058136600461303d565b611035565b6103795f81565b6102eb61059b366004612f47565b61125e565b6103c16105ae366004612f2c565b6112a1565b6002546103139073ffffffffffffffffffffffffffffffffffffffff1681565b6103c16105e136600461308e565b6113ae565b6103c161146c565b6103796105fc366004612f47565b61159a565b6103c161060f366004612f5e565b6115d1565b6001546103139073ffffffffffffffffffffffffffffffffffffffff1681565b610313611614565b610313611665565b6103c1610652366004612f2c565b6116a6565b6102ce610665366004612f47565b5f6020819052908152604090205460ff1681565b6103c16106873660046130fa565b61175d565b6003546103139073ffffffffffffffffffffffffffffffffffffffff1681565b6103c16106ba366004613153565b611a6e565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610714575061071482611e5c565b92915050565b60605f6107467f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a504161159a565b90505f8167ffffffffffffffff81111561076257610762613182565b60405190808252806020026020018201604052801561078b578160200160208202803683370190505b5090505f5b82811015610801576107c27f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a504182610fbe565b8282815181106107d4576107d46131af565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101610790565b5092915050565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527f18476f5b3d6d00091ddd56161ac5e9ba807d29b59f48f8df98938ee352a7cf23602052604081205460ff16610714565b600354604080517fd80a4c2800000000000000000000000000000000000000000000000000000000815290515f9273ffffffffffffffffffffffffffffffffffffffff169163d80a4c289160048083019260209291908290030181865afa1580156108c1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108e591906131dc565b905090565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015461092381611ef2565b61092d8383611efc565b50505050565b60025473ffffffffffffffffffffffffffffffffffffffff828116911614610a12576002546109799073ffffffffffffffffffffffffffffffffffffffff166014611f51565b61099a8273ffffffffffffffffffffffffffffffffffffffff166014611f51565b6040516020016109ab92919061320e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a0000000000000000000000000000000000000000000000000000000008252610a0991600401612f8c565b60405180910390fd5b50565b73ffffffffffffffffffffffffffffffffffffffff81163314610a64576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a6e828261218e565b505050565b5f80610a9d7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905073ffffffffffffffffffffffffffffffffffffffff811615610ac057919050565b6040518060400160405280601a81526020017f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572000000000000815250516002610b0391906132f1565b604080513060208201525f918101919091527f4f564d5f4c3143726f7373446f6d61696e4d657373656e6765720000000000009190911790610b5d906060015b604051602081830303815290604052805190602001205490565b14610b94576040517f54e433cd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080513060208201526001918101919091525f90610bb590606001610b43565b905073ffffffffffffffffffffffffffffffffffffffff811615610c47578073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c1c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c4091906131dc565b9250505090565b6040517f332144db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6108e57f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a504161159a565b610cab6121da565b73ffffffffffffffffffffffffffffffffffffffff8116610d10576040517f8e4c8aa600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610a09565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f5186a10c46a3a9c7ec5470c24b80c6414eba1320cf76bf72ef5135773c7b3327905f90a35050565b610d8e6121da565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527f18476f5b3d6d00091ddd56161ac5e9ba807d29b59f48f8df98938ee352a7cf23602052604090205460ff1615610a1257610e047f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a5041826115d1565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fb8107d0c6b40be480ce3172ee66ba6d64b71f6b1685a851340036e6e2e3e3c52905f90a250565b610e4f6121da565b610e585f612232565b565b3380610e64611665565b73ffffffffffffffffffffffffffffffffffffffff1614610ec9576040517f118cdaa700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610a09565b610a1281612232565b610eda6121da565b73ffffffffffffffffffffffffffffffffffffffff8116610f3f576040517f8e4c8aa600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610a09565b6002805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fc85a6d3bc379dcb6b0bfec0a8d348be6dd937e2a34b2e2faaeb5762fc586aee5905f90a35050565b5f6108e5612278565b5f8281527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000602081905260408220610ff690846122a0565b949350505050565b60035474010000000000000000000000000000000000000000900460ff161561102c57610a6e838383611035565b610a6e83610933565b60015473ffffffffffffffffffffffffffffffffffffffff8481169116146110ad5760015461107b9073ffffffffffffffffffffffffffffffffffffffff166014611f51565b61109c8473ffffffffffffffffffffffffffffffffffffffff166014611f51565b6040516020016109ab929190613308565b5f49156111c8575f5b8049156110cf57806110c781613385565b9150506110b6565b5f6110db8260206132f1565b67ffffffffffffffff8111156110f3576110f3613182565b6040519080825280601f01601f19166020018201604052801561111d576020820181803683370190505b5090505f5b8281101561113d578049602080830284010152600101611122565b5080516020808301919091205f8181529182905260409091205460ff166111c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c696420626c6f6220626174636800000000000000000000000000006044820152606401610a09565b505050505050565b5f82826040516111d99291906133bc565b60408051918290039091205f8181526020819052919091205490915060ff1661092d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c69642063616c6c64617461206261746368000000000000000000006044820152606401610a09565b5f8181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000602081905260409091206060919061129a906122ab565b9392505050565b6112a96121da565b73ffffffffffffffffffffffffffffffffffffffff81166112f6576040517f1b08105400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527f18476f5b3d6d00091ddd56161ac5e9ba807d29b59f48f8df98938ee352a7cf23602052604090205460ff16610a125761136b7f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a5041826108ea565b60405173ffffffffffffffffffffffffffffffffffffffff8216907f038596bb31e2e7d3d9f184d4c98b310103f6d7f5830e5eec32bffe6f1728f969905f90a250565b6003546040517f7f82ea6c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690637f82ea6c9061140f9087908790879087906001905f90600401613474565b5f604051808303815f87803b158015611426575f5ffd5b505af1158015611438573d5f5f3e3d5ffd5b50506040513392507f665b016a0ac50d1280744eaaff1cf21254d0fd30e4c3987d291913c32163416c91505f90a250505050565b335f9081527f18476f5b3d6d00091ddd56161ac5e9ba807d29b59f48f8df98938ee352a7cf23602052604090205460ff161580156114dd57506114ad610fb5565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15611516576040517fd53780c4000000000000000000000000000000000000000000000000000000008152336004820152602401610a09565b6003805460ff7401000000000000000000000000000000000000000080830482161581027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9093169290921792839055604051919092049091161515907fb957d7fc29e5974594db2f2e132076d52f42c0734eae05fd5ea080d1ba175ad3905f90a2565b5f8181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200060208190526040822061129a906122b7565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015461160a81611ef2565b61092d838361218e565b5f61161d610a73565b73ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c1573d5f5f3e3d5ffd5b5f807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c005b5473ffffffffffffffffffffffffffffffffffffffff1692915050565b6116ae6121da565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255611717610fb5565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b7f000000000000000000000000000000000000000000000000000000000000000060ff165f61178a6122c0565b805490915068010000000000000000900460ff16806117b75750805467ffffffffffffffff808416911610155b156117ee576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001667ffffffffffffffff831617680100000000000000001781556118336122e8565b61183c83612369565b73ffffffffffffffffffffffffffffffffffffffff85166118a1576040517f8e4c8aa600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86166004820152602401610a09565b73ffffffffffffffffffffffffffffffffffffffff8416611906576040517f8e4c8aa600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610a09565b73ffffffffffffffffffffffffffffffffffffffff861661196b576040517f8e4c8aa600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87166004820152602401610a09565b600380546001805473ffffffffffffffffffffffffffffffffffffffff8981167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316179092556002805489841692169190911790557fffffffffffffffffffffff000000000000000000000000000000000000000000909116908816177401000000000000000000000000000000000000000017905580547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16815560405167ffffffffffffffff831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b5f82828080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152505082519293505060419091149050611b15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e67746800000000000000006044820152606401610a09565b5f81604081518110611b2957611b296131af565b016020015160f81c9050801580611b4357508060ff166001145b15611b9b57611b53601b826134c6565b90508060f81b82604081518110611b6c57611b6c6131af565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053505b5f611ba68684612393565b905073ffffffffffffffffffffffffffffffffffffffff8116611c4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f426174636841757468656e74696361746f723a20696e76616c6964207369676e60448201527f61747572650000000000000000000000000000000000000000000000000000006064820152608401610a09565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d80a4c286040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cb5573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611cd991906131dc565b73ffffffffffffffffffffffffffffffffffffffff16636d8f5aa9825f6040518363ffffffff1660e01b8152600401611d139291906134df565b602060405180830381865afa158015611d2e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d529190613512565b611dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f426174636841757468656e74696361746f723a20696e76616c6964207369676e60448201527f65720000000000000000000000000000000000000000000000000000000000006064820152608401610a09565b5f8681526020819052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555173ffffffffffffffffffffffffffffffffffffffff83169188917f731978a77d438b0ea35a9034fb28d9cf9372e1649f18c213110adcfab65c5c5c9190a3505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061071457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610714565b610a1281336123b5565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200081611f29858561245f565b90508015610ff6575f858152602083905260409020611f48908561257d565b50949350505050565b60605f611f5f8360026132f1565b611f6a906002613531565b67ffffffffffffffff811115611f8257611f82613182565b6040519080825280601f01601f191660200182016040528015611fac576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f81518110611fe257611fe26131af565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612044576120446131af565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053505f61207e8460026132f1565b612089906001613531565b90505b6001811115612125577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106120ca576120ca6131af565b1a60f81b8282815181106120e0576120e06131af565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a90535060049490941c9361211e81613544565b905061208c565b50831561129a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a09565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000816121bb858561259e565b90508015610ff6575f858152602083905260409020611f48908561267a565b336121e3610fb5565b73ffffffffffffffffffffffffffffffffffffffff1614610e58576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610a09565b5f61223b610fb5565b90506122468261269b565b73ffffffffffffffffffffffffffffffffffffffff81161561226e5761226c5f8261218e565b505b610a6e5f83611efc565b5f807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300611689565b5f61129a83836126eb565b60605f61129a83612711565b5f610714825490565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610714565b336122f1610a73565b73ffffffffffffffffffffffffffffffffffffffff1614158015612332575033612319611614565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610e58576040517fc4050a2600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61237161276a565b61237a816127a8565b6123826127b9565b61238a6127b9565b610a12816127c1565b5f5f5f6123a085856127fe565b915091506123ad81612840565b509392505050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661245b576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260248101839052604401610a09565b5050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616855290915282205460ff16612574575f8481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556125103390565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610714565b5f915050610714565b5f61129a8373ffffffffffffffffffffffffffffffffffffffff8416612a93565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268006020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616855290915282205460ff1615612574575f8481526020828152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610714565b5f61129a8373ffffffffffffffffffffffffffffffffffffffff8416612adf565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080547fffffffffffffffffffffffff000000000000000000000000000000000000000016815561245b82612bb9565b5f825f018281548110612700576127006131af565b905f5260205f200154905092915050565b6060815f0180548060200260200160405190810160405280929190818152602001828054801561275e57602002820191905f5260205f20905b81548152602001906001019080831161274a575b50505050509050919050565b612772612c4e565b610e58576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127b061276a565b610a1281612c6c565b610e5861276a565b6127c961276a565b6127d35f82611efc565b50610a127f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50415f612cc3565b5f5f8251604103612832576020830151604084015160608501515f1a61282687828585612d64565b94509450505050612839565b505f905060025b9250929050565b5f81600481111561285357612853613412565b0361285b5750565b600181600481111561286f5761286f613412565b036128d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a09565b60028160048111156128ea576128ea613412565b03612951576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a09565b600381600481111561296557612965613412565b036129f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610a09565b6004816004811115612a0657612a06613412565b03610a12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610a09565b5f818152600183016020526040812054612ad857508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610714565b505f610714565b5f8181526001830160205260408120548015612574575f612b01600183613578565b85549091505f90612b1490600190613578565b9050808214612b73575f865f018281548110612b3257612b326131af565b905f5260205f200154905080875f018481548110612b5257612b526131af565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080612b8457612b8461358b565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610714565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080547fffffffffffffffffffffffff0000000000000000000000000000000000000000811673ffffffffffffffffffffffffffffffffffffffff848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f612c576122c0565b5468010000000000000000900460ff16919050565b612c7461276a565b73ffffffffffffffffffffffffffffffffffffffff8116610ec9576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401610a09565b7f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b6268005f612d1c845f9081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b5f85815260208490526040808220600101869055519192508491839187917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a450505050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612d9957505f90506003612e6b565b8460ff16601b14158015612db157508460ff16601c14155b15612dc157505f90506004612e6b565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612e12573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116612e65575f60019250925050612e6b565b91505f90505b94509492505050565b5f60208284031215612e84575f5ffd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461129a575f5ffd5b602080825282518282018190525f918401906040840190835b81811015612f0057835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101612ecc565b509095945050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610a12575f5ffd5b5f60208284031215612f3c575f5ffd5b813561129a81612f0b565b5f60208284031215612f57575f5ffd5b5035919050565b5f5f60408385031215612f6f575f5ffd5b823591506020830135612f8181612f0b565b809150509250929050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f5f60408385031215612ff0575f5ffd5b50508035926020909101359150565b5f5f83601f84011261300f575f5ffd5b50813567ffffffffffffffff811115613026575f5ffd5b602083019150836020828501011115612839575f5ffd5b5f5f5f6040848603121561304f575f5ffd5b833561305a81612f0b565b9250602084013567ffffffffffffffff811115613075575f5ffd5b61308186828701612fff565b9497909650939450505050565b5f5f5f5f604085870312156130a1575f5ffd5b843567ffffffffffffffff8111156130b7575f5ffd5b6130c387828801612fff565b909550935050602085013567ffffffffffffffff8111156130e2575f5ffd5b6130ee87828801612fff565b95989497509550505050565b5f5f5f5f6080858703121561310d575f5ffd5b843561311881612f0b565b9350602085013561312881612f0b565b9250604085013561313881612f0b565b9150606085013561314881612f0b565b939692955090935050565b5f5f5f60408486031215613165575f5ffd5b83359250602084013567ffffffffffffffff811115613075575f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f602082840312156131ec575f5ffd5b815161129a81612f0b565b5f81518060208401855e5f93019283525090919050565b7f4261746368496e626f783a2062617463686572206e6f7420617574686f72697a81527f656420746f20706f737420696e2066616c6c6261636b206d6f64652e2045787060208201527f65637465643a200000000000000000000000000000000000000000000000000060408201525f61328b60478301856131f7565b7f2c2041637475616c3a200000000000000000000000000000000000000000000081526132bb600a8201856131f7565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082028115828204841417610714576107146132c4565b7f4261746368496e626f783a2062617463686572206e6f7420617574686f72697a81527f656420746f20706f737420696e20544545206d6f64652e20457870656374656460208201527f3a2000000000000000000000000000000000000000000000000000000000000060408201525f61328b60428301856131f7565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036133b5576133b56132c4565b5060010190565b818382375f9101908152919050565b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110610a12577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b608081525f61348760808301888a6133cb565b828103602084015261349a8187896133cb565b9150506134a68461343f565b8360408301526134b58361343f565b826060830152979650505050505050565b60ff8181168382160190811115610714576107146132c4565b73ffffffffffffffffffffffffffffffffffffffff83168152604081016135058361343f565b8260208301529392505050565b5f60208284031215613522575f5ffd5b8151801515811461129a575f5ffd5b80820180821115610714576107146132c4565b5f81613552576135526132c4565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b81810381811115610714576107146132c4565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c634300081d000a", } // BatchAuthenticatorABI is the input ABI used to generate the binding from. @@ -44,7 +44,7 @@ var BatchAuthenticatorABI = BatchAuthenticatorMetaData.ABI var BatchAuthenticatorBin = BatchAuthenticatorMetaData.Bin // DeployBatchAuthenticator deploys a new Ethereum contract, binding an instance of BatchAuthenticator to it. -func DeployBatchAuthenticator(auth *bind.TransactOpts, backend bind.ContractBackend, _espressoTEEVerifier common.Address, _teeBatcher common.Address, _nonTeeBatcher common.Address, _owner common.Address) (common.Address, *types.Transaction, *BatchAuthenticator, error) { +func DeployBatchAuthenticator(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *BatchAuthenticator, error) { parsed, err := BatchAuthenticatorMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -53,7 +53,7 @@ func DeployBatchAuthenticator(auth *bind.TransactOpts, backend bind.ContractBack return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BatchAuthenticatorBin), backend, _espressoTEEVerifier, _teeBatcher, _nonTeeBatcher, _owner) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BatchAuthenticatorBin), backend) if err != nil { return common.Address{}, nil, nil, err } @@ -202,6 +202,68 @@ func (_BatchAuthenticator *BatchAuthenticatorTransactorRaw) Transact(opts *bind. return _BatchAuthenticator.Contract.contract.Transact(opts, method, params...) } +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_BatchAuthenticator *BatchAuthenticatorCaller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_BatchAuthenticator *BatchAuthenticatorSession) DEFAULTADMINROLE() ([32]byte, error) { + return _BatchAuthenticator.Contract.DEFAULTADMINROLE(&_BatchAuthenticator.CallOpts) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) DEFAULTADMINROLE() ([32]byte, error) { + return _BatchAuthenticator.Contract.DEFAULTADMINROLE(&_BatchAuthenticator.CallOpts) +} + +// GUARDIANROLE is a free data retrieval call binding the contract method 0x24ea54f4. +// +// Solidity: function GUARDIAN_ROLE() view returns(bytes32) +func (_BatchAuthenticator *BatchAuthenticatorCaller) GUARDIANROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "GUARDIAN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GUARDIANROLE is a free data retrieval call binding the contract method 0x24ea54f4. +// +// Solidity: function GUARDIAN_ROLE() view returns(bytes32) +func (_BatchAuthenticator *BatchAuthenticatorSession) GUARDIANROLE() ([32]byte, error) { + return _BatchAuthenticator.Contract.GUARDIANROLE(&_BatchAuthenticator.CallOpts) +} + +// GUARDIANROLE is a free data retrieval call binding the contract method 0x24ea54f4. +// +// Solidity: function GUARDIAN_ROLE() view returns(bytes32) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) GUARDIANROLE() ([32]byte, error) { + return _BatchAuthenticator.Contract.GUARDIANROLE(&_BatchAuthenticator.CallOpts) +} + // ActiveIsTee is a free data retrieval call binding the contract method 0x7877a9ed. // // Solidity: function activeIsTee() view returns(bool) @@ -264,74 +326,74 @@ func (_BatchAuthenticator *BatchAuthenticatorCallerSession) EspressoTEEVerifier( return _BatchAuthenticator.Contract.EspressoTEEVerifier(&_BatchAuthenticator.CallOpts) } -// NonTeeBatcher is a free data retrieval call binding the contract method 0xb1bd4285. +// GetGuardians is a free data retrieval call binding the contract method 0x0665f04b. // -// Solidity: function nonTeeBatcher() view returns(address) -func (_BatchAuthenticator *BatchAuthenticatorCaller) NonTeeBatcher(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function getGuardians() view returns(address[]) +func (_BatchAuthenticator *BatchAuthenticatorCaller) GetGuardians(opts *bind.CallOpts) ([]common.Address, error) { var out []interface{} - err := _BatchAuthenticator.contract.Call(opts, &out, "nonTeeBatcher") + err := _BatchAuthenticator.contract.Call(opts, &out, "getGuardians") if err != nil { - return *new(common.Address), err + return *new([]common.Address), err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) return out0, err } -// NonTeeBatcher is a free data retrieval call binding the contract method 0xb1bd4285. +// GetGuardians is a free data retrieval call binding the contract method 0x0665f04b. // -// Solidity: function nonTeeBatcher() view returns(address) -func (_BatchAuthenticator *BatchAuthenticatorSession) NonTeeBatcher() (common.Address, error) { - return _BatchAuthenticator.Contract.NonTeeBatcher(&_BatchAuthenticator.CallOpts) +// Solidity: function getGuardians() view returns(address[]) +func (_BatchAuthenticator *BatchAuthenticatorSession) GetGuardians() ([]common.Address, error) { + return _BatchAuthenticator.Contract.GetGuardians(&_BatchAuthenticator.CallOpts) } -// NonTeeBatcher is a free data retrieval call binding the contract method 0xb1bd4285. +// GetGuardians is a free data retrieval call binding the contract method 0x0665f04b. // -// Solidity: function nonTeeBatcher() view returns(address) -func (_BatchAuthenticator *BatchAuthenticatorCallerSession) NonTeeBatcher() (common.Address, error) { - return _BatchAuthenticator.Contract.NonTeeBatcher(&_BatchAuthenticator.CallOpts) +// Solidity: function getGuardians() view returns(address[]) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) GetGuardians() ([]common.Address, error) { + return _BatchAuthenticator.Contract.GetGuardians(&_BatchAuthenticator.CallOpts) } -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. // -// Solidity: function owner() view returns(address) -func (_BatchAuthenticator *BatchAuthenticatorCaller) Owner(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_BatchAuthenticator *BatchAuthenticatorCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { var out []interface{} - err := _BatchAuthenticator.contract.Call(opts, &out, "owner") + err := _BatchAuthenticator.contract.Call(opts, &out, "getRoleAdmin", role) if err != nil { - return *new(common.Address), err + return *new([32]byte), err } - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) return out0, err } -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. // -// Solidity: function owner() view returns(address) -func (_BatchAuthenticator *BatchAuthenticatorSession) Owner() (common.Address, error) { - return _BatchAuthenticator.Contract.Owner(&_BatchAuthenticator.CallOpts) +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_BatchAuthenticator *BatchAuthenticatorSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _BatchAuthenticator.Contract.GetRoleAdmin(&_BatchAuthenticator.CallOpts, role) } -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. // -// Solidity: function owner() view returns(address) -func (_BatchAuthenticator *BatchAuthenticatorCallerSession) Owner() (common.Address, error) { - return _BatchAuthenticator.Contract.Owner(&_BatchAuthenticator.CallOpts) +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _BatchAuthenticator.Contract.GetRoleAdmin(&_BatchAuthenticator.CallOpts, role) } -// TeeBatcher is a free data retrieval call binding the contract method 0xd909ba7c. +// GetRoleMember is a free data retrieval call binding the contract method 0x9010d07c. // -// Solidity: function teeBatcher() view returns(address) -func (_BatchAuthenticator *BatchAuthenticatorCaller) TeeBatcher(opts *bind.CallOpts) (common.Address, error) { +// Solidity: function getRoleMember(bytes32 role, uint256 index) view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCaller) GetRoleMember(opts *bind.CallOpts, role [32]byte, index *big.Int) (common.Address, error) { var out []interface{} - err := _BatchAuthenticator.contract.Call(opts, &out, "teeBatcher") + err := _BatchAuthenticator.contract.Call(opts, &out, "getRoleMember", role, index) if err != nil { return *new(common.Address), err @@ -343,26 +405,119 @@ func (_BatchAuthenticator *BatchAuthenticatorCaller) TeeBatcher(opts *bind.CallO } -// TeeBatcher is a free data retrieval call binding the contract method 0xd909ba7c. +// GetRoleMember is a free data retrieval call binding the contract method 0x9010d07c. // -// Solidity: function teeBatcher() view returns(address) -func (_BatchAuthenticator *BatchAuthenticatorSession) TeeBatcher() (common.Address, error) { - return _BatchAuthenticator.Contract.TeeBatcher(&_BatchAuthenticator.CallOpts) +// Solidity: function getRoleMember(bytes32 role, uint256 index) view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorSession) GetRoleMember(role [32]byte, index *big.Int) (common.Address, error) { + return _BatchAuthenticator.Contract.GetRoleMember(&_BatchAuthenticator.CallOpts, role, index) } -// TeeBatcher is a free data retrieval call binding the contract method 0xd909ba7c. +// GetRoleMember is a free data retrieval call binding the contract method 0x9010d07c. // -// Solidity: function teeBatcher() view returns(address) -func (_BatchAuthenticator *BatchAuthenticatorCallerSession) TeeBatcher() (common.Address, error) { - return _BatchAuthenticator.Contract.TeeBatcher(&_BatchAuthenticator.CallOpts) +// Solidity: function getRoleMember(bytes32 role, uint256 index) view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) GetRoleMember(role [32]byte, index *big.Int) (common.Address, error) { + return _BatchAuthenticator.Contract.GetRoleMember(&_BatchAuthenticator.CallOpts, role, index) } -// ValidBatchInfo is a free data retrieval call binding the contract method 0xf81f2083. +// GetRoleMemberCount is a free data retrieval call binding the contract method 0xca15c873. // -// Solidity: function validBatchInfo(bytes32 ) view returns(bool) -func (_BatchAuthenticator *BatchAuthenticatorCaller) ValidBatchInfo(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { +// Solidity: function getRoleMemberCount(bytes32 role) view returns(uint256) +func (_BatchAuthenticator *BatchAuthenticatorCaller) GetRoleMemberCount(opts *bind.CallOpts, role [32]byte) (*big.Int, error) { var out []interface{} - err := _BatchAuthenticator.contract.Call(opts, &out, "validBatchInfo", arg0) + err := _BatchAuthenticator.contract.Call(opts, &out, "getRoleMemberCount", role) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetRoleMemberCount is a free data retrieval call binding the contract method 0xca15c873. +// +// Solidity: function getRoleMemberCount(bytes32 role) view returns(uint256) +func (_BatchAuthenticator *BatchAuthenticatorSession) GetRoleMemberCount(role [32]byte) (*big.Int, error) { + return _BatchAuthenticator.Contract.GetRoleMemberCount(&_BatchAuthenticator.CallOpts, role) +} + +// GetRoleMemberCount is a free data retrieval call binding the contract method 0xca15c873. +// +// Solidity: function getRoleMemberCount(bytes32 role) view returns(uint256) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) GetRoleMemberCount(role [32]byte) (*big.Int, error) { + return _BatchAuthenticator.Contract.GetRoleMemberCount(&_BatchAuthenticator.CallOpts, role) +} + +// GetRoleMembers is a free data retrieval call binding the contract method 0xa3246ad3. +// +// Solidity: function getRoleMembers(bytes32 role) view returns(address[]) +func (_BatchAuthenticator *BatchAuthenticatorCaller) GetRoleMembers(opts *bind.CallOpts, role [32]byte) ([]common.Address, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "getRoleMembers", role) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetRoleMembers is a free data retrieval call binding the contract method 0xa3246ad3. +// +// Solidity: function getRoleMembers(bytes32 role) view returns(address[]) +func (_BatchAuthenticator *BatchAuthenticatorSession) GetRoleMembers(role [32]byte) ([]common.Address, error) { + return _BatchAuthenticator.Contract.GetRoleMembers(&_BatchAuthenticator.CallOpts, role) +} + +// GetRoleMembers is a free data retrieval call binding the contract method 0xa3246ad3. +// +// Solidity: function getRoleMembers(bytes32 role) view returns(address[]) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) GetRoleMembers(role [32]byte) ([]common.Address, error) { + return _BatchAuthenticator.Contract.GetRoleMembers(&_BatchAuthenticator.CallOpts, role) +} + +// GuardianCount is a free data retrieval call binding the contract method 0x54387ad7. +// +// Solidity: function guardianCount() view returns(uint256) +func (_BatchAuthenticator *BatchAuthenticatorCaller) GuardianCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "guardianCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GuardianCount is a free data retrieval call binding the contract method 0x54387ad7. +// +// Solidity: function guardianCount() view returns(uint256) +func (_BatchAuthenticator *BatchAuthenticatorSession) GuardianCount() (*big.Int, error) { + return _BatchAuthenticator.Contract.GuardianCount(&_BatchAuthenticator.CallOpts) +} + +// GuardianCount is a free data retrieval call binding the contract method 0x54387ad7. +// +// Solidity: function guardianCount() view returns(uint256) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) GuardianCount() (*big.Int, error) { + return _BatchAuthenticator.Contract.GuardianCount(&_BatchAuthenticator.CallOpts) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "hasRole", role, account) if err != nil { return *new(bool), err @@ -374,159 +529,2116 @@ func (_BatchAuthenticator *BatchAuthenticatorCaller) ValidBatchInfo(opts *bind.C } -// ValidBatchInfo is a free data retrieval call binding the contract method 0xf81f2083. +// HasRole is a free data retrieval call binding the contract method 0x91d14854. // -// Solidity: function validBatchInfo(bytes32 ) view returns(bool) -func (_BatchAuthenticator *BatchAuthenticatorSession) ValidBatchInfo(arg0 [32]byte) (bool, error) { - return _BatchAuthenticator.Contract.ValidBatchInfo(&_BatchAuthenticator.CallOpts, arg0) +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _BatchAuthenticator.Contract.HasRole(&_BatchAuthenticator.CallOpts, role, account) } -// ValidBatchInfo is a free data retrieval call binding the contract method 0xf81f2083. +// HasRole is a free data retrieval call binding the contract method 0x91d14854. // -// Solidity: function validBatchInfo(bytes32 ) view returns(bool) -func (_BatchAuthenticator *BatchAuthenticatorCallerSession) ValidBatchInfo(arg0 [32]byte) (bool, error) { - return _BatchAuthenticator.Contract.ValidBatchInfo(&_BatchAuthenticator.CallOpts, arg0) +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _BatchAuthenticator.Contract.HasRole(&_BatchAuthenticator.CallOpts, role, account) } -// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// InitVersion is a free data retrieval call binding the contract method 0x38d38c97. // -// Solidity: function version() view returns(string) -func (_BatchAuthenticator *BatchAuthenticatorCaller) Version(opts *bind.CallOpts) (string, error) { +// Solidity: function initVersion() view returns(uint8) +func (_BatchAuthenticator *BatchAuthenticatorCaller) InitVersion(opts *bind.CallOpts) (uint8, error) { var out []interface{} - err := _BatchAuthenticator.contract.Call(opts, &out, "version") + err := _BatchAuthenticator.contract.Call(opts, &out, "initVersion") if err != nil { - return *new(string), err + return *new(uint8), err } - out0 := *abi.ConvertType(out[0], new(string)).(*string) + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) return out0, err } -// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// InitVersion is a free data retrieval call binding the contract method 0x38d38c97. // -// Solidity: function version() view returns(string) -func (_BatchAuthenticator *BatchAuthenticatorSession) Version() (string, error) { - return _BatchAuthenticator.Contract.Version(&_BatchAuthenticator.CallOpts) +// Solidity: function initVersion() view returns(uint8) +func (_BatchAuthenticator *BatchAuthenticatorSession) InitVersion() (uint8, error) { + return _BatchAuthenticator.Contract.InitVersion(&_BatchAuthenticator.CallOpts) } -// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// InitVersion is a free data retrieval call binding the contract method 0x38d38c97. // -// Solidity: function version() view returns(string) -func (_BatchAuthenticator *BatchAuthenticatorCallerSession) Version() (string, error) { - return _BatchAuthenticator.Contract.Version(&_BatchAuthenticator.CallOpts) +// Solidity: function initVersion() view returns(uint8) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) InitVersion() (uint8, error) { + return _BatchAuthenticator.Contract.InitVersion(&_BatchAuthenticator.CallOpts) } -// AuthenticateBatchInfo is a paid mutator transaction binding the contract method 0xfc619e41. +// IsGuardian is a free data retrieval call binding the contract method 0x0c68ba21. // -// Solidity: function authenticateBatchInfo(bytes32 commitment, bytes _signature) returns() -func (_BatchAuthenticator *BatchAuthenticatorTransactor) AuthenticateBatchInfo(opts *bind.TransactOpts, commitment [32]byte, _signature []byte) (*types.Transaction, error) { - return _BatchAuthenticator.contract.Transact(opts, "authenticateBatchInfo", commitment, _signature) +// Solidity: function isGuardian(address account) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorCaller) IsGuardian(opts *bind.CallOpts, account common.Address) (bool, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "isGuardian", account) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } -// AuthenticateBatchInfo is a paid mutator transaction binding the contract method 0xfc619e41. +// IsGuardian is a free data retrieval call binding the contract method 0x0c68ba21. // -// Solidity: function authenticateBatchInfo(bytes32 commitment, bytes _signature) returns() -func (_BatchAuthenticator *BatchAuthenticatorSession) AuthenticateBatchInfo(commitment [32]byte, _signature []byte) (*types.Transaction, error) { - return _BatchAuthenticator.Contract.AuthenticateBatchInfo(&_BatchAuthenticator.TransactOpts, commitment, _signature) +// Solidity: function isGuardian(address account) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorSession) IsGuardian(account common.Address) (bool, error) { + return _BatchAuthenticator.Contract.IsGuardian(&_BatchAuthenticator.CallOpts, account) } -// AuthenticateBatchInfo is a paid mutator transaction binding the contract method 0xfc619e41. +// IsGuardian is a free data retrieval call binding the contract method 0x0c68ba21. // -// Solidity: function authenticateBatchInfo(bytes32 commitment, bytes _signature) returns() -func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) AuthenticateBatchInfo(commitment [32]byte, _signature []byte) (*types.Transaction, error) { - return _BatchAuthenticator.Contract.AuthenticateBatchInfo(&_BatchAuthenticator.TransactOpts, commitment, _signature) +// Solidity: function isGuardian(address account) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) IsGuardian(account common.Address) (bool, error) { + return _BatchAuthenticator.Contract.IsGuardian(&_BatchAuthenticator.CallOpts, account) } -// RegisterSigner is a paid mutator transaction binding the contract method 0xba58e82a. +// NitroValidator is a free data retrieval call binding the contract method 0x1b076a4c. // -// Solidity: function registerSigner(bytes attestationTbs, bytes signature) returns() -func (_BatchAuthenticator *BatchAuthenticatorTransactor) RegisterSigner(opts *bind.TransactOpts, attestationTbs []byte, signature []byte) (*types.Transaction, error) { - return _BatchAuthenticator.contract.Transact(opts, "registerSigner", attestationTbs, signature) +// Solidity: function nitroValidator() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCaller) NitroValidator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "nitroValidator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } -// RegisterSigner is a paid mutator transaction binding the contract method 0xba58e82a. +// NitroValidator is a free data retrieval call binding the contract method 0x1b076a4c. // -// Solidity: function registerSigner(bytes attestationTbs, bytes signature) returns() -func (_BatchAuthenticator *BatchAuthenticatorSession) RegisterSigner(attestationTbs []byte, signature []byte) (*types.Transaction, error) { - return _BatchAuthenticator.Contract.RegisterSigner(&_BatchAuthenticator.TransactOpts, attestationTbs, signature) +// Solidity: function nitroValidator() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorSession) NitroValidator() (common.Address, error) { + return _BatchAuthenticator.Contract.NitroValidator(&_BatchAuthenticator.CallOpts) } -// RegisterSigner is a paid mutator transaction binding the contract method 0xba58e82a. +// NitroValidator is a free data retrieval call binding the contract method 0x1b076a4c. // -// Solidity: function registerSigner(bytes attestationTbs, bytes signature) returns() -func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) RegisterSigner(attestationTbs []byte, signature []byte) (*types.Transaction, error) { - return _BatchAuthenticator.Contract.RegisterSigner(&_BatchAuthenticator.TransactOpts, attestationTbs, signature) +// Solidity: function nitroValidator() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) NitroValidator() (common.Address, error) { + return _BatchAuthenticator.Contract.NitroValidator(&_BatchAuthenticator.CallOpts) } -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// NonTeeBatcher is a free data retrieval call binding the contract method 0xb1bd4285. // -// Solidity: function renounceOwnership() returns() -func (_BatchAuthenticator *BatchAuthenticatorTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BatchAuthenticator.contract.Transact(opts, "renounceOwnership") +// Solidity: function nonTeeBatcher() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCaller) NonTeeBatcher(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "nonTeeBatcher") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// NonTeeBatcher is a free data retrieval call binding the contract method 0xb1bd4285. // -// Solidity: function renounceOwnership() returns() -func (_BatchAuthenticator *BatchAuthenticatorSession) RenounceOwnership() (*types.Transaction, error) { - return _BatchAuthenticator.Contract.RenounceOwnership(&_BatchAuthenticator.TransactOpts) +// Solidity: function nonTeeBatcher() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorSession) NonTeeBatcher() (common.Address, error) { + return _BatchAuthenticator.Contract.NonTeeBatcher(&_BatchAuthenticator.CallOpts) } -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// NonTeeBatcher is a free data retrieval call binding the contract method 0xb1bd4285. // -// Solidity: function renounceOwnership() returns() -func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _BatchAuthenticator.Contract.RenounceOwnership(&_BatchAuthenticator.TransactOpts) +// Solidity: function nonTeeBatcher() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) NonTeeBatcher() (common.Address, error) { + return _BatchAuthenticator.Contract.NonTeeBatcher(&_BatchAuthenticator.CallOpts) } -// SwitchBatcher is a paid mutator transaction binding the contract method 0xbc347f47. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function switchBatcher() returns() -func (_BatchAuthenticator *BatchAuthenticatorTransactor) SwitchBatcher(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BatchAuthenticator.contract.Transact(opts, "switchBatcher") +// Solidity: function owner() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } -// SwitchBatcher is a paid mutator transaction binding the contract method 0xbc347f47. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function switchBatcher() returns() -func (_BatchAuthenticator *BatchAuthenticatorSession) SwitchBatcher() (*types.Transaction, error) { - return _BatchAuthenticator.Contract.SwitchBatcher(&_BatchAuthenticator.TransactOpts) +// Solidity: function owner() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorSession) Owner() (common.Address, error) { + return _BatchAuthenticator.Contract.Owner(&_BatchAuthenticator.CallOpts) } -// SwitchBatcher is a paid mutator transaction binding the contract method 0xbc347f47. +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) Owner() (common.Address, error) { + return _BatchAuthenticator.Contract.Owner(&_BatchAuthenticator.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "pendingOwner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorSession) PendingOwner() (common.Address, error) { + return _BatchAuthenticator.Contract.PendingOwner(&_BatchAuthenticator.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) PendingOwner() (common.Address, error) { + return _BatchAuthenticator.Contract.PendingOwner(&_BatchAuthenticator.CallOpts) +} + +// ProxyAdmin is a free data retrieval call binding the contract method 0x3e47158c. +// +// Solidity: function proxyAdmin() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCaller) ProxyAdmin(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "proxyAdmin") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ProxyAdmin is a free data retrieval call binding the contract method 0x3e47158c. +// +// Solidity: function proxyAdmin() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorSession) ProxyAdmin() (common.Address, error) { + return _BatchAuthenticator.Contract.ProxyAdmin(&_BatchAuthenticator.CallOpts) +} + +// ProxyAdmin is a free data retrieval call binding the contract method 0x3e47158c. +// +// Solidity: function proxyAdmin() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) ProxyAdmin() (common.Address, error) { + return _BatchAuthenticator.Contract.ProxyAdmin(&_BatchAuthenticator.CallOpts) +} + +// ProxyAdminOwner is a free data retrieval call binding the contract method 0xdad544e0. +// +// Solidity: function proxyAdminOwner() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCaller) ProxyAdminOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "proxyAdminOwner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ProxyAdminOwner is a free data retrieval call binding the contract method 0xdad544e0. +// +// Solidity: function proxyAdminOwner() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorSession) ProxyAdminOwner() (common.Address, error) { + return _BatchAuthenticator.Contract.ProxyAdminOwner(&_BatchAuthenticator.CallOpts) +} + +// ProxyAdminOwner is a free data retrieval call binding the contract method 0xdad544e0. +// +// Solidity: function proxyAdminOwner() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) ProxyAdminOwner() (common.Address, error) { + return _BatchAuthenticator.Contract.ProxyAdminOwner(&_BatchAuthenticator.CallOpts) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _BatchAuthenticator.Contract.SupportsInterface(&_BatchAuthenticator.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _BatchAuthenticator.Contract.SupportsInterface(&_BatchAuthenticator.CallOpts, interfaceId) +} + +// TeeBatcher is a free data retrieval call binding the contract method 0xd909ba7c. +// +// Solidity: function teeBatcher() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCaller) TeeBatcher(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "teeBatcher") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TeeBatcher is a free data retrieval call binding the contract method 0xd909ba7c. +// +// Solidity: function teeBatcher() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorSession) TeeBatcher() (common.Address, error) { + return _BatchAuthenticator.Contract.TeeBatcher(&_BatchAuthenticator.CallOpts) +} + +// TeeBatcher is a free data retrieval call binding the contract method 0xd909ba7c. +// +// Solidity: function teeBatcher() view returns(address) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) TeeBatcher() (common.Address, error) { + return _BatchAuthenticator.Contract.TeeBatcher(&_BatchAuthenticator.CallOpts) +} + +// ValidBatchInfo is a free data retrieval call binding the contract method 0xf81f2083. +// +// Solidity: function validBatchInfo(bytes32 ) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorCaller) ValidBatchInfo(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "validBatchInfo", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// ValidBatchInfo is a free data retrieval call binding the contract method 0xf81f2083. +// +// Solidity: function validBatchInfo(bytes32 ) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorSession) ValidBatchInfo(arg0 [32]byte) (bool, error) { + return _BatchAuthenticator.Contract.ValidBatchInfo(&_BatchAuthenticator.CallOpts, arg0) +} + +// ValidBatchInfo is a free data retrieval call binding the contract method 0xf81f2083. +// +// Solidity: function validBatchInfo(bytes32 ) view returns(bool) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) ValidBatchInfo(arg0 [32]byte) (bool, error) { + return _BatchAuthenticator.Contract.ValidBatchInfo(&_BatchAuthenticator.CallOpts, arg0) +} + +// ValidateBatch is a free data retrieval call binding the contract method 0x91a1a35d. +// +// Solidity: function validateBatch(address sender, bytes data) view returns() +func (_BatchAuthenticator *BatchAuthenticatorCaller) ValidateBatch(opts *bind.CallOpts, sender common.Address, data []byte) error { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "validateBatch", sender, data) + + if err != nil { + return err + } + + return err + +} + +// ValidateBatch is a free data retrieval call binding the contract method 0x91a1a35d. +// +// Solidity: function validateBatch(address sender, bytes data) view returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) ValidateBatch(sender common.Address, data []byte) error { + return _BatchAuthenticator.Contract.ValidateBatch(&_BatchAuthenticator.CallOpts, sender, data) +} + +// ValidateBatch is a free data retrieval call binding the contract method 0x91a1a35d. +// +// Solidity: function validateBatch(address sender, bytes data) view returns() +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) ValidateBatch(sender common.Address, data []byte) error { + return _BatchAuthenticator.Contract.ValidateBatch(&_BatchAuthenticator.CallOpts, sender, data) +} + +// ValidateNonTeeBatch is a free data retrieval call binding the contract method 0x361d2d7b. +// +// Solidity: function validateNonTeeBatch(address sender) view returns() +func (_BatchAuthenticator *BatchAuthenticatorCaller) ValidateNonTeeBatch(opts *bind.CallOpts, sender common.Address) error { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "validateNonTeeBatch", sender) + + if err != nil { + return err + } + + return err + +} + +// ValidateNonTeeBatch is a free data retrieval call binding the contract method 0x361d2d7b. +// +// Solidity: function validateNonTeeBatch(address sender) view returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) ValidateNonTeeBatch(sender common.Address) error { + return _BatchAuthenticator.Contract.ValidateNonTeeBatch(&_BatchAuthenticator.CallOpts, sender) +} + +// ValidateNonTeeBatch is a free data retrieval call binding the contract method 0x361d2d7b. +// +// Solidity: function validateNonTeeBatch(address sender) view returns() +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) ValidateNonTeeBatch(sender common.Address) error { + return _BatchAuthenticator.Contract.ValidateNonTeeBatch(&_BatchAuthenticator.CallOpts, sender) +} + +// ValidateTeeBatch is a free data retrieval call binding the contract method 0x995bd81e. +// +// Solidity: function validateTeeBatch(address sender, bytes data) view returns() +func (_BatchAuthenticator *BatchAuthenticatorCaller) ValidateTeeBatch(opts *bind.CallOpts, sender common.Address, data []byte) error { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "validateTeeBatch", sender, data) + + if err != nil { + return err + } + + return err + +} + +// ValidateTeeBatch is a free data retrieval call binding the contract method 0x995bd81e. +// +// Solidity: function validateTeeBatch(address sender, bytes data) view returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) ValidateTeeBatch(sender common.Address, data []byte) error { + return _BatchAuthenticator.Contract.ValidateTeeBatch(&_BatchAuthenticator.CallOpts, sender, data) +} + +// ValidateTeeBatch is a free data retrieval call binding the contract method 0x995bd81e. +// +// Solidity: function validateTeeBatch(address sender, bytes data) view returns() +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) ValidateTeeBatch(sender common.Address, data []byte) error { + return _BatchAuthenticator.Contract.ValidateTeeBatch(&_BatchAuthenticator.CallOpts, sender, data) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_BatchAuthenticator *BatchAuthenticatorCaller) Version(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _BatchAuthenticator.contract.Call(opts, &out, "version") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_BatchAuthenticator *BatchAuthenticatorSession) Version() (string, error) { + return _BatchAuthenticator.Contract.Version(&_BatchAuthenticator.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_BatchAuthenticator *BatchAuthenticatorCallerSession) Version() (string, error) { + return _BatchAuthenticator.Contract.Version(&_BatchAuthenticator.CallOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "acceptOwnership") +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) AcceptOwnership() (*types.Transaction, error) { + return _BatchAuthenticator.Contract.AcceptOwnership(&_BatchAuthenticator.TransactOpts) +} + +// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. +// +// Solidity: function acceptOwnership() returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _BatchAuthenticator.Contract.AcceptOwnership(&_BatchAuthenticator.TransactOpts) +} + +// AddGuardian is a paid mutator transaction binding the contract method 0xa526d83b. +// +// Solidity: function addGuardian(address guardian) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) AddGuardian(opts *bind.TransactOpts, guardian common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "addGuardian", guardian) +} + +// AddGuardian is a paid mutator transaction binding the contract method 0xa526d83b. +// +// Solidity: function addGuardian(address guardian) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) AddGuardian(guardian common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.AddGuardian(&_BatchAuthenticator.TransactOpts, guardian) +} + +// AddGuardian is a paid mutator transaction binding the contract method 0xa526d83b. +// +// Solidity: function addGuardian(address guardian) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) AddGuardian(guardian common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.AddGuardian(&_BatchAuthenticator.TransactOpts, guardian) +} + +// AuthenticateBatchInfo is a paid mutator transaction binding the contract method 0xfc619e41. +// +// Solidity: function authenticateBatchInfo(bytes32 commitment, bytes _signature) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) AuthenticateBatchInfo(opts *bind.TransactOpts, commitment [32]byte, _signature []byte) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "authenticateBatchInfo", commitment, _signature) +} + +// AuthenticateBatchInfo is a paid mutator transaction binding the contract method 0xfc619e41. +// +// Solidity: function authenticateBatchInfo(bytes32 commitment, bytes _signature) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) AuthenticateBatchInfo(commitment [32]byte, _signature []byte) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.AuthenticateBatchInfo(&_BatchAuthenticator.TransactOpts, commitment, _signature) +} + +// AuthenticateBatchInfo is a paid mutator transaction binding the contract method 0xfc619e41. +// +// Solidity: function authenticateBatchInfo(bytes32 commitment, bytes _signature) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) AuthenticateBatchInfo(commitment [32]byte, _signature []byte) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.AuthenticateBatchInfo(&_BatchAuthenticator.TransactOpts, commitment, _signature) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "grantRole", role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.GrantRole(&_BatchAuthenticator.TransactOpts, role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.GrantRole(&_BatchAuthenticator.TransactOpts, role, account) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf8c8765e. +// +// Solidity: function initialize(address _espressoTEEVerifier, address _teeBatcher, address _nonTeeBatcher, address _owner) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) Initialize(opts *bind.TransactOpts, _espressoTEEVerifier common.Address, _teeBatcher common.Address, _nonTeeBatcher common.Address, _owner common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "initialize", _espressoTEEVerifier, _teeBatcher, _nonTeeBatcher, _owner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf8c8765e. +// +// Solidity: function initialize(address _espressoTEEVerifier, address _teeBatcher, address _nonTeeBatcher, address _owner) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) Initialize(_espressoTEEVerifier common.Address, _teeBatcher common.Address, _nonTeeBatcher common.Address, _owner common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.Initialize(&_BatchAuthenticator.TransactOpts, _espressoTEEVerifier, _teeBatcher, _nonTeeBatcher, _owner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xf8c8765e. +// +// Solidity: function initialize(address _espressoTEEVerifier, address _teeBatcher, address _nonTeeBatcher, address _owner) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) Initialize(_espressoTEEVerifier common.Address, _teeBatcher common.Address, _nonTeeBatcher common.Address, _owner common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.Initialize(&_BatchAuthenticator.TransactOpts, _espressoTEEVerifier, _teeBatcher, _nonTeeBatcher, _owner) +} + +// RegisterSigner is a paid mutator transaction binding the contract method 0xba58e82a. +// +// Solidity: function registerSigner(bytes attestationTbs, bytes signature) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) RegisterSigner(opts *bind.TransactOpts, attestationTbs []byte, signature []byte) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "registerSigner", attestationTbs, signature) +} + +// RegisterSigner is a paid mutator transaction binding the contract method 0xba58e82a. +// +// Solidity: function registerSigner(bytes attestationTbs, bytes signature) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) RegisterSigner(attestationTbs []byte, signature []byte) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.RegisterSigner(&_BatchAuthenticator.TransactOpts, attestationTbs, signature) +} + +// RegisterSigner is a paid mutator transaction binding the contract method 0xba58e82a. +// +// Solidity: function registerSigner(bytes attestationTbs, bytes signature) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) RegisterSigner(attestationTbs []byte, signature []byte) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.RegisterSigner(&_BatchAuthenticator.TransactOpts, attestationTbs, signature) +} + +// RemoveGuardian is a paid mutator transaction binding the contract method 0x71404156. +// +// Solidity: function removeGuardian(address guardian) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) RemoveGuardian(opts *bind.TransactOpts, guardian common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "removeGuardian", guardian) +} + +// RemoveGuardian is a paid mutator transaction binding the contract method 0x71404156. +// +// Solidity: function removeGuardian(address guardian) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) RemoveGuardian(guardian common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.RemoveGuardian(&_BatchAuthenticator.TransactOpts, guardian) +} + +// RemoveGuardian is a paid mutator transaction binding the contract method 0x71404156. +// +// Solidity: function removeGuardian(address guardian) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) RemoveGuardian(guardian common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.RemoveGuardian(&_BatchAuthenticator.TransactOpts, guardian) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) RenounceOwnership() (*types.Transaction, error) { + return _BatchAuthenticator.Contract.RenounceOwnership(&_BatchAuthenticator.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _BatchAuthenticator.Contract.RenounceOwnership(&_BatchAuthenticator.TransactOpts) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address callerConfirmation) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, callerConfirmation common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "renounceRole", role, callerConfirmation) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address callerConfirmation) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) RenounceRole(role [32]byte, callerConfirmation common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.RenounceRole(&_BatchAuthenticator.TransactOpts, role, callerConfirmation) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address callerConfirmation) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) RenounceRole(role [32]byte, callerConfirmation common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.RenounceRole(&_BatchAuthenticator.TransactOpts, role, callerConfirmation) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "revokeRole", role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.RevokeRole(&_BatchAuthenticator.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.RevokeRole(&_BatchAuthenticator.TransactOpts, role, account) +} + +// SetNonTeeBatcher is a paid mutator transaction binding the contract method 0x8c8fc531. +// +// Solidity: function setNonTeeBatcher(address _newNonTeeBatcher) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) SetNonTeeBatcher(opts *bind.TransactOpts, _newNonTeeBatcher common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "setNonTeeBatcher", _newNonTeeBatcher) +} + +// SetNonTeeBatcher is a paid mutator transaction binding the contract method 0x8c8fc531. +// +// Solidity: function setNonTeeBatcher(address _newNonTeeBatcher) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) SetNonTeeBatcher(_newNonTeeBatcher common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.SetNonTeeBatcher(&_BatchAuthenticator.TransactOpts, _newNonTeeBatcher) +} + +// SetNonTeeBatcher is a paid mutator transaction binding the contract method 0x8c8fc531. +// +// Solidity: function setNonTeeBatcher(address _newNonTeeBatcher) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) SetNonTeeBatcher(_newNonTeeBatcher common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.SetNonTeeBatcher(&_BatchAuthenticator.TransactOpts, _newNonTeeBatcher) +} + +// SetTeeBatcher is a paid mutator transaction binding the contract method 0x6f7eda47. +// +// Solidity: function setTeeBatcher(address _newTeeBatcher) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) SetTeeBatcher(opts *bind.TransactOpts, _newTeeBatcher common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "setTeeBatcher", _newTeeBatcher) +} + +// SetTeeBatcher is a paid mutator transaction binding the contract method 0x6f7eda47. +// +// Solidity: function setTeeBatcher(address _newTeeBatcher) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) SetTeeBatcher(_newTeeBatcher common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.SetTeeBatcher(&_BatchAuthenticator.TransactOpts, _newTeeBatcher) +} + +// SetTeeBatcher is a paid mutator transaction binding the contract method 0x6f7eda47. +// +// Solidity: function setTeeBatcher(address _newTeeBatcher) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) SetTeeBatcher(_newTeeBatcher common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.SetTeeBatcher(&_BatchAuthenticator.TransactOpts, _newTeeBatcher) +} + +// SwitchBatcher is a paid mutator transaction binding the contract method 0xbc347f47. +// +// Solidity: function switchBatcher() returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) SwitchBatcher(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "switchBatcher") +} + +// SwitchBatcher is a paid mutator transaction binding the contract method 0xbc347f47. +// +// Solidity: function switchBatcher() returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) SwitchBatcher() (*types.Transaction, error) { + return _BatchAuthenticator.Contract.SwitchBatcher(&_BatchAuthenticator.TransactOpts) +} + +// SwitchBatcher is a paid mutator transaction binding the contract method 0xbc347f47. +// +// Solidity: function switchBatcher() returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) SwitchBatcher() (*types.Transaction, error) { + return _BatchAuthenticator.Contract.SwitchBatcher(&_BatchAuthenticator.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_BatchAuthenticator *BatchAuthenticatorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.TransferOwnership(&_BatchAuthenticator.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _BatchAuthenticator.Contract.TransferOwnership(&_BatchAuthenticator.TransactOpts, newOwner) +} + +// BatchAuthenticatorBatchInfoAuthenticatedIterator is returned from FilterBatchInfoAuthenticated and is used to iterate over the raw logs and unpacked data for BatchInfoAuthenticated events raised by the BatchAuthenticator contract. +type BatchAuthenticatorBatchInfoAuthenticatedIterator struct { + Event *BatchAuthenticatorBatchInfoAuthenticated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BatchAuthenticatorBatchInfoAuthenticatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorBatchInfoAuthenticated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorBatchInfoAuthenticated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BatchAuthenticatorBatchInfoAuthenticatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BatchAuthenticatorBatchInfoAuthenticatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BatchAuthenticatorBatchInfoAuthenticated represents a BatchInfoAuthenticated event raised by the BatchAuthenticator contract. +type BatchAuthenticatorBatchInfoAuthenticated struct { + Commitment [32]byte + Signer common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBatchInfoAuthenticated is a free log retrieval operation binding the contract event 0x731978a77d438b0ea35a9034fb28d9cf9372e1649f18c213110adcfab65c5c5c. +// +// Solidity: event BatchInfoAuthenticated(bytes32 indexed commitment, address indexed signer) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterBatchInfoAuthenticated(opts *bind.FilterOpts, commitment [][32]byte, signer []common.Address) (*BatchAuthenticatorBatchInfoAuthenticatedIterator, error) { + + var commitmentRule []interface{} + for _, commitmentItem := range commitment { + commitmentRule = append(commitmentRule, commitmentItem) + } + var signerRule []interface{} + for _, signerItem := range signer { + signerRule = append(signerRule, signerItem) + } + + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "BatchInfoAuthenticated", commitmentRule, signerRule) + if err != nil { + return nil, err + } + return &BatchAuthenticatorBatchInfoAuthenticatedIterator{contract: _BatchAuthenticator.contract, event: "BatchInfoAuthenticated", logs: logs, sub: sub}, nil +} + +// WatchBatchInfoAuthenticated is a free log subscription operation binding the contract event 0x731978a77d438b0ea35a9034fb28d9cf9372e1649f18c213110adcfab65c5c5c. +// +// Solidity: event BatchInfoAuthenticated(bytes32 indexed commitment, address indexed signer) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchBatchInfoAuthenticated(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorBatchInfoAuthenticated, commitment [][32]byte, signer []common.Address) (event.Subscription, error) { + + var commitmentRule []interface{} + for _, commitmentItem := range commitment { + commitmentRule = append(commitmentRule, commitmentItem) + } + var signerRule []interface{} + for _, signerItem := range signer { + signerRule = append(signerRule, signerItem) + } + + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "BatchInfoAuthenticated", commitmentRule, signerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BatchAuthenticatorBatchInfoAuthenticated) + if err := _BatchAuthenticator.contract.UnpackLog(event, "BatchInfoAuthenticated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBatchInfoAuthenticated is a log parse operation binding the contract event 0x731978a77d438b0ea35a9034fb28d9cf9372e1649f18c213110adcfab65c5c5c. +// +// Solidity: event BatchInfoAuthenticated(bytes32 indexed commitment, address indexed signer) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseBatchInfoAuthenticated(log types.Log) (*BatchAuthenticatorBatchInfoAuthenticated, error) { + event := new(BatchAuthenticatorBatchInfoAuthenticated) + if err := _BatchAuthenticator.contract.UnpackLog(event, "BatchInfoAuthenticated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BatchAuthenticatorBatcherSwitchedIterator is returned from FilterBatcherSwitched and is used to iterate over the raw logs and unpacked data for BatcherSwitched events raised by the BatchAuthenticator contract. +type BatchAuthenticatorBatcherSwitchedIterator struct { + Event *BatchAuthenticatorBatcherSwitched // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BatchAuthenticatorBatcherSwitchedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorBatcherSwitched) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorBatcherSwitched) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BatchAuthenticatorBatcherSwitchedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BatchAuthenticatorBatcherSwitchedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BatchAuthenticatorBatcherSwitched represents a BatcherSwitched event raised by the BatchAuthenticator contract. +type BatchAuthenticatorBatcherSwitched struct { + ActiveIsTee bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBatcherSwitched is a free log retrieval operation binding the contract event 0xb957d7fc29e5974594db2f2e132076d52f42c0734eae05fd5ea080d1ba175ad3. +// +// Solidity: event BatcherSwitched(bool indexed activeIsTee) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterBatcherSwitched(opts *bind.FilterOpts, activeIsTee []bool) (*BatchAuthenticatorBatcherSwitchedIterator, error) { + + var activeIsTeeRule []interface{} + for _, activeIsTeeItem := range activeIsTee { + activeIsTeeRule = append(activeIsTeeRule, activeIsTeeItem) + } + + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "BatcherSwitched", activeIsTeeRule) + if err != nil { + return nil, err + } + return &BatchAuthenticatorBatcherSwitchedIterator{contract: _BatchAuthenticator.contract, event: "BatcherSwitched", logs: logs, sub: sub}, nil +} + +// WatchBatcherSwitched is a free log subscription operation binding the contract event 0xb957d7fc29e5974594db2f2e132076d52f42c0734eae05fd5ea080d1ba175ad3. +// +// Solidity: event BatcherSwitched(bool indexed activeIsTee) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchBatcherSwitched(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorBatcherSwitched, activeIsTee []bool) (event.Subscription, error) { + + var activeIsTeeRule []interface{} + for _, activeIsTeeItem := range activeIsTee { + activeIsTeeRule = append(activeIsTeeRule, activeIsTeeItem) + } + + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "BatcherSwitched", activeIsTeeRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BatchAuthenticatorBatcherSwitched) + if err := _BatchAuthenticator.contract.UnpackLog(event, "BatcherSwitched", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBatcherSwitched is a log parse operation binding the contract event 0xb957d7fc29e5974594db2f2e132076d52f42c0734eae05fd5ea080d1ba175ad3. +// +// Solidity: event BatcherSwitched(bool indexed activeIsTee) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseBatcherSwitched(log types.Log) (*BatchAuthenticatorBatcherSwitched, error) { + event := new(BatchAuthenticatorBatcherSwitched) + if err := _BatchAuthenticator.contract.UnpackLog(event, "BatcherSwitched", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BatchAuthenticatorGuardianAddedIterator is returned from FilterGuardianAdded and is used to iterate over the raw logs and unpacked data for GuardianAdded events raised by the BatchAuthenticator contract. +type BatchAuthenticatorGuardianAddedIterator struct { + Event *BatchAuthenticatorGuardianAdded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BatchAuthenticatorGuardianAddedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorGuardianAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorGuardianAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BatchAuthenticatorGuardianAddedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BatchAuthenticatorGuardianAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BatchAuthenticatorGuardianAdded represents a GuardianAdded event raised by the BatchAuthenticator contract. +type BatchAuthenticatorGuardianAdded struct { + Guardian common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterGuardianAdded is a free log retrieval operation binding the contract event 0x038596bb31e2e7d3d9f184d4c98b310103f6d7f5830e5eec32bffe6f1728f969. +// +// Solidity: event GuardianAdded(address indexed guardian) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterGuardianAdded(opts *bind.FilterOpts, guardian []common.Address) (*BatchAuthenticatorGuardianAddedIterator, error) { + + var guardianRule []interface{} + for _, guardianItem := range guardian { + guardianRule = append(guardianRule, guardianItem) + } + + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "GuardianAdded", guardianRule) + if err != nil { + return nil, err + } + return &BatchAuthenticatorGuardianAddedIterator{contract: _BatchAuthenticator.contract, event: "GuardianAdded", logs: logs, sub: sub}, nil +} + +// WatchGuardianAdded is a free log subscription operation binding the contract event 0x038596bb31e2e7d3d9f184d4c98b310103f6d7f5830e5eec32bffe6f1728f969. +// +// Solidity: event GuardianAdded(address indexed guardian) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchGuardianAdded(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorGuardianAdded, guardian []common.Address) (event.Subscription, error) { + + var guardianRule []interface{} + for _, guardianItem := range guardian { + guardianRule = append(guardianRule, guardianItem) + } + + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "GuardianAdded", guardianRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BatchAuthenticatorGuardianAdded) + if err := _BatchAuthenticator.contract.UnpackLog(event, "GuardianAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseGuardianAdded is a log parse operation binding the contract event 0x038596bb31e2e7d3d9f184d4c98b310103f6d7f5830e5eec32bffe6f1728f969. +// +// Solidity: event GuardianAdded(address indexed guardian) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseGuardianAdded(log types.Log) (*BatchAuthenticatorGuardianAdded, error) { + event := new(BatchAuthenticatorGuardianAdded) + if err := _BatchAuthenticator.contract.UnpackLog(event, "GuardianAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BatchAuthenticatorGuardianRemovedIterator is returned from FilterGuardianRemoved and is used to iterate over the raw logs and unpacked data for GuardianRemoved events raised by the BatchAuthenticator contract. +type BatchAuthenticatorGuardianRemovedIterator struct { + Event *BatchAuthenticatorGuardianRemoved // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BatchAuthenticatorGuardianRemovedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorGuardianRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorGuardianRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BatchAuthenticatorGuardianRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BatchAuthenticatorGuardianRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BatchAuthenticatorGuardianRemoved represents a GuardianRemoved event raised by the BatchAuthenticator contract. +type BatchAuthenticatorGuardianRemoved struct { + Guardian common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterGuardianRemoved is a free log retrieval operation binding the contract event 0xb8107d0c6b40be480ce3172ee66ba6d64b71f6b1685a851340036e6e2e3e3c52. +// +// Solidity: event GuardianRemoved(address indexed guardian) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterGuardianRemoved(opts *bind.FilterOpts, guardian []common.Address) (*BatchAuthenticatorGuardianRemovedIterator, error) { + + var guardianRule []interface{} + for _, guardianItem := range guardian { + guardianRule = append(guardianRule, guardianItem) + } + + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "GuardianRemoved", guardianRule) + if err != nil { + return nil, err + } + return &BatchAuthenticatorGuardianRemovedIterator{contract: _BatchAuthenticator.contract, event: "GuardianRemoved", logs: logs, sub: sub}, nil +} + +// WatchGuardianRemoved is a free log subscription operation binding the contract event 0xb8107d0c6b40be480ce3172ee66ba6d64b71f6b1685a851340036e6e2e3e3c52. +// +// Solidity: event GuardianRemoved(address indexed guardian) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchGuardianRemoved(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorGuardianRemoved, guardian []common.Address) (event.Subscription, error) { + + var guardianRule []interface{} + for _, guardianItem := range guardian { + guardianRule = append(guardianRule, guardianItem) + } + + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "GuardianRemoved", guardianRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BatchAuthenticatorGuardianRemoved) + if err := _BatchAuthenticator.contract.UnpackLog(event, "GuardianRemoved", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseGuardianRemoved is a log parse operation binding the contract event 0xb8107d0c6b40be480ce3172ee66ba6d64b71f6b1685a851340036e6e2e3e3c52. +// +// Solidity: event GuardianRemoved(address indexed guardian) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseGuardianRemoved(log types.Log) (*BatchAuthenticatorGuardianRemoved, error) { + event := new(BatchAuthenticatorGuardianRemoved) + if err := _BatchAuthenticator.contract.UnpackLog(event, "GuardianRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BatchAuthenticatorInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the BatchAuthenticator contract. +type BatchAuthenticatorInitializedIterator struct { + Event *BatchAuthenticatorInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BatchAuthenticatorInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BatchAuthenticatorInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BatchAuthenticatorInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BatchAuthenticatorInitialized represents a Initialized event raised by the BatchAuthenticator contract. +type BatchAuthenticatorInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterInitialized(opts *bind.FilterOpts) (*BatchAuthenticatorInitializedIterator, error) { + + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &BatchAuthenticatorInitializedIterator{contract: _BatchAuthenticator.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorInitialized) (event.Subscription, error) { + + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BatchAuthenticatorInitialized) + if err := _BatchAuthenticator.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseInitialized(log types.Log) (*BatchAuthenticatorInitialized, error) { + event := new(BatchAuthenticatorInitialized) + if err := _BatchAuthenticator.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BatchAuthenticatorNonTeeBatcherUpdatedIterator is returned from FilterNonTeeBatcherUpdated and is used to iterate over the raw logs and unpacked data for NonTeeBatcherUpdated events raised by the BatchAuthenticator contract. +type BatchAuthenticatorNonTeeBatcherUpdatedIterator struct { + Event *BatchAuthenticatorNonTeeBatcherUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BatchAuthenticatorNonTeeBatcherUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorNonTeeBatcherUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorNonTeeBatcherUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BatchAuthenticatorNonTeeBatcherUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BatchAuthenticatorNonTeeBatcherUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BatchAuthenticatorNonTeeBatcherUpdated represents a NonTeeBatcherUpdated event raised by the BatchAuthenticator contract. +type BatchAuthenticatorNonTeeBatcherUpdated struct { + OldNonTeeBatcher common.Address + NewNonTeeBatcher common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNonTeeBatcherUpdated is a free log retrieval operation binding the contract event 0xc85a6d3bc379dcb6b0bfec0a8d348be6dd937e2a34b2e2faaeb5762fc586aee5. +// +// Solidity: event NonTeeBatcherUpdated(address indexed oldNonTeeBatcher, address indexed newNonTeeBatcher) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterNonTeeBatcherUpdated(opts *bind.FilterOpts, oldNonTeeBatcher []common.Address, newNonTeeBatcher []common.Address) (*BatchAuthenticatorNonTeeBatcherUpdatedIterator, error) { + + var oldNonTeeBatcherRule []interface{} + for _, oldNonTeeBatcherItem := range oldNonTeeBatcher { + oldNonTeeBatcherRule = append(oldNonTeeBatcherRule, oldNonTeeBatcherItem) + } + var newNonTeeBatcherRule []interface{} + for _, newNonTeeBatcherItem := range newNonTeeBatcher { + newNonTeeBatcherRule = append(newNonTeeBatcherRule, newNonTeeBatcherItem) + } + + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "NonTeeBatcherUpdated", oldNonTeeBatcherRule, newNonTeeBatcherRule) + if err != nil { + return nil, err + } + return &BatchAuthenticatorNonTeeBatcherUpdatedIterator{contract: _BatchAuthenticator.contract, event: "NonTeeBatcherUpdated", logs: logs, sub: sub}, nil +} + +// WatchNonTeeBatcherUpdated is a free log subscription operation binding the contract event 0xc85a6d3bc379dcb6b0bfec0a8d348be6dd937e2a34b2e2faaeb5762fc586aee5. +// +// Solidity: event NonTeeBatcherUpdated(address indexed oldNonTeeBatcher, address indexed newNonTeeBatcher) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchNonTeeBatcherUpdated(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorNonTeeBatcherUpdated, oldNonTeeBatcher []common.Address, newNonTeeBatcher []common.Address) (event.Subscription, error) { + + var oldNonTeeBatcherRule []interface{} + for _, oldNonTeeBatcherItem := range oldNonTeeBatcher { + oldNonTeeBatcherRule = append(oldNonTeeBatcherRule, oldNonTeeBatcherItem) + } + var newNonTeeBatcherRule []interface{} + for _, newNonTeeBatcherItem := range newNonTeeBatcher { + newNonTeeBatcherRule = append(newNonTeeBatcherRule, newNonTeeBatcherItem) + } + + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "NonTeeBatcherUpdated", oldNonTeeBatcherRule, newNonTeeBatcherRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BatchAuthenticatorNonTeeBatcherUpdated) + if err := _BatchAuthenticator.contract.UnpackLog(event, "NonTeeBatcherUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseNonTeeBatcherUpdated is a log parse operation binding the contract event 0xc85a6d3bc379dcb6b0bfec0a8d348be6dd937e2a34b2e2faaeb5762fc586aee5. +// +// Solidity: event NonTeeBatcherUpdated(address indexed oldNonTeeBatcher, address indexed newNonTeeBatcher) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseNonTeeBatcherUpdated(log types.Log) (*BatchAuthenticatorNonTeeBatcherUpdated, error) { + event := new(BatchAuthenticatorNonTeeBatcherUpdated) + if err := _BatchAuthenticator.contract.UnpackLog(event, "NonTeeBatcherUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BatchAuthenticatorOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the BatchAuthenticator contract. +type BatchAuthenticatorOwnershipTransferStartedIterator struct { + Event *BatchAuthenticatorOwnershipTransferStarted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BatchAuthenticatorOwnershipTransferStartedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorOwnershipTransferStarted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorOwnershipTransferStarted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BatchAuthenticatorOwnershipTransferStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BatchAuthenticatorOwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BatchAuthenticatorOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the BatchAuthenticator contract. +type BatchAuthenticatorOwnershipTransferStarted struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BatchAuthenticatorOwnershipTransferStartedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &BatchAuthenticatorOwnershipTransferStartedIterator{contract: _BatchAuthenticator.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BatchAuthenticatorOwnershipTransferStarted) + if err := _BatchAuthenticator.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. // -// Solidity: function switchBatcher() returns() -func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) SwitchBatcher() (*types.Transaction, error) { - return _BatchAuthenticator.Contract.SwitchBatcher(&_BatchAuthenticator.TransactOpts) +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseOwnershipTransferStarted(log types.Log) (*BatchAuthenticatorOwnershipTransferStarted, error) { + event := new(BatchAuthenticatorOwnershipTransferStarted) + if err := _BatchAuthenticator.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BatchAuthenticatorOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the BatchAuthenticator contract. +type BatchAuthenticatorOwnershipTransferredIterator struct { + Event *BatchAuthenticatorOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BatchAuthenticatorOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BatchAuthenticatorOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BatchAuthenticatorOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BatchAuthenticatorOwnershipTransferred represents a OwnershipTransferred event raised by the BatchAuthenticator contract. +type BatchAuthenticatorOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BatchAuthenticatorOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &BatchAuthenticatorOwnershipTransferredIterator{contract: _BatchAuthenticator.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BatchAuthenticatorOwnershipTransferred) + if err := _BatchAuthenticator.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseOwnershipTransferred(log types.Log) (*BatchAuthenticatorOwnershipTransferred, error) { + event := new(BatchAuthenticatorOwnershipTransferred) + if err := _BatchAuthenticator.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BatchAuthenticatorRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the BatchAuthenticator contract. +type BatchAuthenticatorRoleAdminChangedIterator struct { + Event *BatchAuthenticatorRoleAdminChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BatchAuthenticatorRoleAdminChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorRoleAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorRoleAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BatchAuthenticatorRoleAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BatchAuthenticatorRoleAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BatchAuthenticatorRoleAdminChanged represents a RoleAdminChanged event raised by the BatchAuthenticator contract. +type BatchAuthenticatorRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw types.Log // Blockchain specific contextual infos } -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. // -// Solidity: function transferOwnership(address newOwner) returns() -func (_BatchAuthenticator *BatchAuthenticatorTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _BatchAuthenticator.contract.Transact(opts, "transferOwnership", newOwner) +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*BatchAuthenticatorRoleAdminChangedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return &BatchAuthenticatorRoleAdminChangedIterator{contract: _BatchAuthenticator.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil } -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. // -// Solidity: function transferOwnership(address newOwner) returns() -func (_BatchAuthenticator *BatchAuthenticatorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _BatchAuthenticator.Contract.TransferOwnership(&_BatchAuthenticator.TransactOpts, newOwner) +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BatchAuthenticatorRoleAdminChanged) + if err := _BatchAuthenticator.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil } -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. // -// Solidity: function transferOwnership(address newOwner) returns() -func (_BatchAuthenticator *BatchAuthenticatorTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _BatchAuthenticator.Contract.TransferOwnership(&_BatchAuthenticator.TransactOpts, newOwner) +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseRoleAdminChanged(log types.Log) (*BatchAuthenticatorRoleAdminChanged, error) { + event := new(BatchAuthenticatorRoleAdminChanged) + if err := _BatchAuthenticator.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil } -// BatchAuthenticatorBatchInfoAuthenticatedIterator is returned from FilterBatchInfoAuthenticated and is used to iterate over the raw logs and unpacked data for BatchInfoAuthenticated events raised by the BatchAuthenticator contract. -type BatchAuthenticatorBatchInfoAuthenticatedIterator struct { - Event *BatchAuthenticatorBatchInfoAuthenticated // Event containing the contract specifics and raw log +// BatchAuthenticatorRoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the BatchAuthenticator contract. +type BatchAuthenticatorRoleGrantedIterator struct { + Event *BatchAuthenticatorRoleGranted // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -540,7 +2652,7 @@ type BatchAuthenticatorBatchInfoAuthenticatedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *BatchAuthenticatorBatchInfoAuthenticatedIterator) Next() bool { +func (it *BatchAuthenticatorRoleGrantedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -549,7 +2661,7 @@ func (it *BatchAuthenticatorBatchInfoAuthenticatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(BatchAuthenticatorBatchInfoAuthenticated) + it.Event = new(BatchAuthenticatorRoleGranted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -564,7 +2676,7 @@ func (it *BatchAuthenticatorBatchInfoAuthenticatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(BatchAuthenticatorBatchInfoAuthenticated) + it.Event = new(BatchAuthenticatorRoleGranted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -580,60 +2692,69 @@ func (it *BatchAuthenticatorBatchInfoAuthenticatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *BatchAuthenticatorBatchInfoAuthenticatedIterator) Error() error { +func (it *BatchAuthenticatorRoleGrantedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *BatchAuthenticatorBatchInfoAuthenticatedIterator) Close() error { +func (it *BatchAuthenticatorRoleGrantedIterator) Close() error { it.sub.Unsubscribe() return nil } -// BatchAuthenticatorBatchInfoAuthenticated represents a BatchInfoAuthenticated event raised by the BatchAuthenticator contract. -type BatchAuthenticatorBatchInfoAuthenticated struct { - Commitment [32]byte - Signer common.Address - Raw types.Log // Blockchain specific contextual infos +// BatchAuthenticatorRoleGranted represents a RoleGranted event raised by the BatchAuthenticator contract. +type BatchAuthenticatorRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterBatchInfoAuthenticated is a free log retrieval operation binding the contract event 0x731978a77d438b0ea35a9034fb28d9cf9372e1649f18c213110adcfab65c5c5c. +// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. // -// Solidity: event BatchInfoAuthenticated(bytes32 indexed commitment, address indexed signer) -func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterBatchInfoAuthenticated(opts *bind.FilterOpts, commitment [][32]byte, signer []common.Address) (*BatchAuthenticatorBatchInfoAuthenticatedIterator, error) { +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*BatchAuthenticatorRoleGrantedIterator, error) { - var commitmentRule []interface{} - for _, commitmentItem := range commitment { - commitmentRule = append(commitmentRule, commitmentItem) + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) } - var signerRule []interface{} - for _, signerItem := range signer { - signerRule = append(signerRule, signerItem) + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) } - logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "BatchInfoAuthenticated", commitmentRule, signerRule) + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) if err != nil { return nil, err } - return &BatchAuthenticatorBatchInfoAuthenticatedIterator{contract: _BatchAuthenticator.contract, event: "BatchInfoAuthenticated", logs: logs, sub: sub}, nil + return &BatchAuthenticatorRoleGrantedIterator{contract: _BatchAuthenticator.contract, event: "RoleGranted", logs: logs, sub: sub}, nil } -// WatchBatchInfoAuthenticated is a free log subscription operation binding the contract event 0x731978a77d438b0ea35a9034fb28d9cf9372e1649f18c213110adcfab65c5c5c. +// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. // -// Solidity: event BatchInfoAuthenticated(bytes32 indexed commitment, address indexed signer) -func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchBatchInfoAuthenticated(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorBatchInfoAuthenticated, commitment [][32]byte, signer []common.Address) (event.Subscription, error) { +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { - var commitmentRule []interface{} - for _, commitmentItem := range commitment { - commitmentRule = append(commitmentRule, commitmentItem) + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) } - var signerRule []interface{} - for _, signerItem := range signer { - signerRule = append(signerRule, signerItem) + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) } - logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "BatchInfoAuthenticated", commitmentRule, signerRule) + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) if err != nil { return nil, err } @@ -643,8 +2764,8 @@ func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchBatchInfoAuthenticat select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(BatchAuthenticatorBatchInfoAuthenticated) - if err := _BatchAuthenticator.contract.UnpackLog(event, "BatchInfoAuthenticated", log); err != nil { + event := new(BatchAuthenticatorRoleGranted) + if err := _BatchAuthenticator.contract.UnpackLog(event, "RoleGranted", log); err != nil { return err } event.Raw = log @@ -665,21 +2786,21 @@ func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchBatchInfoAuthenticat }), nil } -// ParseBatchInfoAuthenticated is a log parse operation binding the contract event 0x731978a77d438b0ea35a9034fb28d9cf9372e1649f18c213110adcfab65c5c5c. +// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. // -// Solidity: event BatchInfoAuthenticated(bytes32 indexed commitment, address indexed signer) -func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseBatchInfoAuthenticated(log types.Log) (*BatchAuthenticatorBatchInfoAuthenticated, error) { - event := new(BatchAuthenticatorBatchInfoAuthenticated) - if err := _BatchAuthenticator.contract.UnpackLog(event, "BatchInfoAuthenticated", log); err != nil { +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseRoleGranted(log types.Log) (*BatchAuthenticatorRoleGranted, error) { + event := new(BatchAuthenticatorRoleGranted) + if err := _BatchAuthenticator.contract.UnpackLog(event, "RoleGranted", log); err != nil { return nil, err } event.Raw = log return event, nil } -// BatchAuthenticatorOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the BatchAuthenticator contract. -type BatchAuthenticatorOwnershipTransferredIterator struct { - Event *BatchAuthenticatorOwnershipTransferred // Event containing the contract specifics and raw log +// BatchAuthenticatorRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the BatchAuthenticator contract. +type BatchAuthenticatorRoleRevokedIterator struct { + Event *BatchAuthenticatorRoleRevoked // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -693,7 +2814,7 @@ type BatchAuthenticatorOwnershipTransferredIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *BatchAuthenticatorOwnershipTransferredIterator) Next() bool { +func (it *BatchAuthenticatorRoleRevokedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -702,7 +2823,7 @@ func (it *BatchAuthenticatorOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(BatchAuthenticatorOwnershipTransferred) + it.Event = new(BatchAuthenticatorRoleRevoked) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -717,7 +2838,7 @@ func (it *BatchAuthenticatorOwnershipTransferredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(BatchAuthenticatorOwnershipTransferred) + it.Event = new(BatchAuthenticatorRoleRevoked) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -733,60 +2854,69 @@ func (it *BatchAuthenticatorOwnershipTransferredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *BatchAuthenticatorOwnershipTransferredIterator) Error() error { +func (it *BatchAuthenticatorRoleRevokedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *BatchAuthenticatorOwnershipTransferredIterator) Close() error { +func (it *BatchAuthenticatorRoleRevokedIterator) Close() error { it.sub.Unsubscribe() return nil } -// BatchAuthenticatorOwnershipTransferred represents a OwnershipTransferred event raised by the BatchAuthenticator contract. -type BatchAuthenticatorOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos +// BatchAuthenticatorRoleRevoked represents a RoleRevoked event raised by the BatchAuthenticator contract. +type BatchAuthenticatorRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BatchAuthenticatorOwnershipTransferredIterator, error) { +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*BatchAuthenticatorRoleRevokedIterator, error) { - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) } - logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) if err != nil { return nil, err } - return &BatchAuthenticatorOwnershipTransferredIterator{contract: _BatchAuthenticator.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &BatchAuthenticatorRoleRevokedIterator{contract: _BatchAuthenticator.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil } -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) } - logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) if err != nil { return nil, err } @@ -796,8 +2926,8 @@ func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchOwnershipTransferred select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(BatchAuthenticatorOwnershipTransferred) - if err := _BatchAuthenticator.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(BatchAuthenticatorRoleRevoked) + if err := _BatchAuthenticator.contract.UnpackLog(event, "RoleRevoked", log); err != nil { return err } event.Raw = log @@ -818,12 +2948,12 @@ func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchOwnershipTransferred }), nil } -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseOwnershipTransferred(log types.Log) (*BatchAuthenticatorOwnershipTransferred, error) { - event := new(BatchAuthenticatorOwnershipTransferred) - if err := _BatchAuthenticator.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseRoleRevoked(log types.Log) (*BatchAuthenticatorRoleRevoked, error) { + event := new(BatchAuthenticatorRoleRevoked) + if err := _BatchAuthenticator.contract.UnpackLog(event, "RoleRevoked", log); err != nil { return nil, err } event.Raw = log @@ -973,3 +3103,156 @@ func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseSignerRegistrationIn event.Raw = log return event, nil } + +// BatchAuthenticatorTeeBatcherUpdatedIterator is returned from FilterTeeBatcherUpdated and is used to iterate over the raw logs and unpacked data for TeeBatcherUpdated events raised by the BatchAuthenticator contract. +type BatchAuthenticatorTeeBatcherUpdatedIterator struct { + Event *BatchAuthenticatorTeeBatcherUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BatchAuthenticatorTeeBatcherUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorTeeBatcherUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BatchAuthenticatorTeeBatcherUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BatchAuthenticatorTeeBatcherUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BatchAuthenticatorTeeBatcherUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BatchAuthenticatorTeeBatcherUpdated represents a TeeBatcherUpdated event raised by the BatchAuthenticator contract. +type BatchAuthenticatorTeeBatcherUpdated struct { + OldTeeBatcher common.Address + NewTeeBatcher common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTeeBatcherUpdated is a free log retrieval operation binding the contract event 0x5186a10c46a3a9c7ec5470c24b80c6414eba1320cf76bf72ef5135773c7b3327. +// +// Solidity: event TeeBatcherUpdated(address indexed oldTeeBatcher, address indexed newTeeBatcher) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) FilterTeeBatcherUpdated(opts *bind.FilterOpts, oldTeeBatcher []common.Address, newTeeBatcher []common.Address) (*BatchAuthenticatorTeeBatcherUpdatedIterator, error) { + + var oldTeeBatcherRule []interface{} + for _, oldTeeBatcherItem := range oldTeeBatcher { + oldTeeBatcherRule = append(oldTeeBatcherRule, oldTeeBatcherItem) + } + var newTeeBatcherRule []interface{} + for _, newTeeBatcherItem := range newTeeBatcher { + newTeeBatcherRule = append(newTeeBatcherRule, newTeeBatcherItem) + } + + logs, sub, err := _BatchAuthenticator.contract.FilterLogs(opts, "TeeBatcherUpdated", oldTeeBatcherRule, newTeeBatcherRule) + if err != nil { + return nil, err + } + return &BatchAuthenticatorTeeBatcherUpdatedIterator{contract: _BatchAuthenticator.contract, event: "TeeBatcherUpdated", logs: logs, sub: sub}, nil +} + +// WatchTeeBatcherUpdated is a free log subscription operation binding the contract event 0x5186a10c46a3a9c7ec5470c24b80c6414eba1320cf76bf72ef5135773c7b3327. +// +// Solidity: event TeeBatcherUpdated(address indexed oldTeeBatcher, address indexed newTeeBatcher) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) WatchTeeBatcherUpdated(opts *bind.WatchOpts, sink chan<- *BatchAuthenticatorTeeBatcherUpdated, oldTeeBatcher []common.Address, newTeeBatcher []common.Address) (event.Subscription, error) { + + var oldTeeBatcherRule []interface{} + for _, oldTeeBatcherItem := range oldTeeBatcher { + oldTeeBatcherRule = append(oldTeeBatcherRule, oldTeeBatcherItem) + } + var newTeeBatcherRule []interface{} + for _, newTeeBatcherItem := range newTeeBatcher { + newTeeBatcherRule = append(newTeeBatcherRule, newTeeBatcherItem) + } + + logs, sub, err := _BatchAuthenticator.contract.WatchLogs(opts, "TeeBatcherUpdated", oldTeeBatcherRule, newTeeBatcherRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BatchAuthenticatorTeeBatcherUpdated) + if err := _BatchAuthenticator.contract.UnpackLog(event, "TeeBatcherUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTeeBatcherUpdated is a log parse operation binding the contract event 0x5186a10c46a3a9c7ec5470c24b80c6414eba1320cf76bf72ef5135773c7b3327. +// +// Solidity: event TeeBatcherUpdated(address indexed oldTeeBatcher, address indexed newTeeBatcher) +func (_BatchAuthenticator *BatchAuthenticatorFilterer) ParseTeeBatcherUpdated(log types.Log) (*BatchAuthenticatorTeeBatcherUpdated, error) { + event := new(BatchAuthenticatorTeeBatcherUpdated) + if err := _BatchAuthenticator.contract.UnpackLog(event, "TeeBatcherUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/op-batcher/bindings/batch_inbox.go b/op-batcher/bindings/batch_inbox.go index 7009f1b2330..f15a4e23237 100644 --- a/op-batcher/bindings/batch_inbox.go +++ b/op-batcher/bindings/batch_inbox.go @@ -31,8 +31,8 @@ var ( // BatchInboxMetaData contains all meta data concerning the BatchInbox contract. var BatchInboxMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_batchAuthenticator\",\"type\":\"address\",\"internalType\":\"contractIBatchAuthenticator\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"batchAuthenticator\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBatchAuthenticator\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nonTeeBatcher\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", - Bin: "0x60c060405234801561000f575f5ffd5b50604051610f9b380380610f9b8339818101604052810190610031919061029d565b61004d61004261013c60201b60201c565b61014360201b60201c565b5f8273ffffffffffffffffffffffffffffffffffffffff1663b1bd42856040518163ffffffff1660e01b8152600401602060405180830381865afa158015610097573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100bb91906102db565b90508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508273ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250506101348261014360201b60201c565b505050610306565b5f33905090565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61023182610208565b9050919050565b5f61024282610227565b9050919050565b61025281610238565b811461025c575f5ffd5b50565b5f8151905061026d81610249565b92915050565b61027c81610227565b8114610286575f5ffd5b50565b5f8151905061029781610273565b92915050565b5f5f604083850312156102b3576102b2610204565b5b5f6102c08582860161025f565b92505060206102d185828601610289565b9150509250929050565b5f602082840312156102f0576102ef610204565b5b5f6102fd84828501610289565b91505092915050565b60805160a051610c596103425f395f8181605c0152818161019a0152818161029401526104e101525f818161037201526104bd0152610c595ff3fe608060405234801561000f575f5ffd5b5060043610610059575f3560e01c8063715018a6146104015780638da5cb5b1461040b578063b1bd428514610429578063e758457314610447578063f2fde38b146104655761005a565b5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637877a9ed6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100e79190610704565b15610370575f5f1b5f4914610277575f5f67ffffffffffffffff8111156101115761011061072f565b5b6040519080825280601f01601f1916602001820160405280156101435781602001600182028036833780820191505090505b5090505f5f90505b5f5f1b81491461018d578181496040516020016101699291906107d7565b6040516020818303038152906040529150808061018590610834565b91505061014b565b5f828051906020012090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f81f2083826040518263ffffffff1660e01b81526004016101f1919061088a565b602060405180830381865afa15801561020c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102309190610704565b61026f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610266906108fd565b60405180910390fd5b50505061036b565b5f5f3660405161028892919061094d565b604051809103902090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f81f2083826040518263ffffffff1660e01b81526004016102eb919061088a565b602060405180830381865afa158015610306573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061032a9190610704565b610369576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610360906109af565b60405180910390fd5b505b6103ff565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f590610a17565b60405180910390fd5b5b005b610409610481565b005b610413610494565b6040516104209190610a74565b60405180910390f35b6104316104bb565b60405161043e9190610a74565b60405180910390f35b61044f6104df565b60405161045c9190610ae8565b60405180910390f35b61047f600480360381019061047a9190610b2b565b610503565b005b610489610585565b6104925f610603565b565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b61050b610585565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057090610bc6565b60405180910390fd5b61058281610603565b50565b61058d6106c4565b73ffffffffffffffffffffffffffffffffffffffff166105ab610494565b73ffffffffffffffffffffffffffffffffffffffff1614610601576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f890610c2e565b60405180910390fd5b565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f5ffd5b5f8115159050919050565b6106e3816106cf565b81146106ed575f5ffd5b50565b5f815190506106fe816106da565b92915050565b5f60208284031215610719576107186106cb565b5b5f610726848285016106f0565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f81519050919050565b5f81905092915050565b8281835e5f83830152505050565b5f6107888261075c565b6107928185610766565b93506107a2818560208601610770565b80840191505092915050565b5f819050919050565b5f819050919050565b6107d16107cc826107ae565b6107b7565b82525050565b5f6107e2828561077e565b91506107ee82846107c0565b6020820191508190509392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f819050919050565b5f61083e8261082b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036108705761086f6107fe565b5b600182019050919050565b610884816107ae565b82525050565b5f60208201905061089d5f83018461087b565b92915050565b5f82825260208201905092915050565b7f496e76616c696420626c6f6220626174636800000000000000000000000000005f82015250565b5f6108e76012836108a3565b91506108f2826108b3565b602082019050919050565b5f6020820190508181035f830152610914816108db565b9050919050565b828183375f83830152505050565b5f6109348385610766565b935061094183858461091b565b82840190509392505050565b5f610959828486610929565b91508190509392505050565b7f496e76616c69642063616c6c64617461206261746368000000000000000000005f82015250565b5f6109996016836108a3565b91506109a482610965565b602082019050919050565b5f6020820190508181035f8301526109c68161098d565b9050919050565b7f4261746368496e626f783a20756e617574686f72697a656420626174636865725f82015250565b5f610a016020836108a3565b9150610a0c826109cd565b602082019050919050565b5f6020820190508181035f830152610a2e816109f5565b9050919050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610a5e82610a35565b9050919050565b610a6e81610a54565b82525050565b5f602082019050610a875f830184610a65565b92915050565b5f819050919050565b5f610ab0610aab610aa684610a35565b610a8d565b610a35565b9050919050565b5f610ac182610a96565b9050919050565b5f610ad282610ab7565b9050919050565b610ae281610ac8565b82525050565b5f602082019050610afb5f830184610ad9565b92915050565b610b0a81610a54565b8114610b14575f5ffd5b50565b5f81359050610b2581610b01565b92915050565b5f60208284031215610b4057610b3f6106cb565b5b5f610b4d84828501610b17565b91505092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f610bb06026836108a3565b9150610bbb82610b56565b604082019050919050565b5f6020820190508181035f830152610bdd81610ba4565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f610c186020836108a3565b9150610c2382610be4565b602082019050919050565b5f6020820190508181035f830152610c4581610c0c565b905091905056fea164736f6c634300081c000a", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_batchAuthenticator\",\"type\":\"address\",\"internalType\":\"contractIBatchAuthenticator\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"nonpayable\"}]", + Bin: "0x60a0604052348015600e575f5ffd5b506040516101a33803806101a3833981016040819052602b91603b565b6001600160a01b03166080526066565b5f60208284031215604a575f5ffd5b81516001600160a01b0381168114605f575f5ffd5b9392505050565b60805161012661007d5f395f604d01526101265ff3fe608060405234801561000f575f5ffd5b506040517f91a1a35d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906391a1a35d906100869033905f9036906004016100b0565b5f6040518083038186803b15801561009c575f5ffd5b505afa1580156100ae573d5f5f3e3d5ffd5b005b73ffffffffffffffffffffffffffffffffffffffff8416815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019291505056fea164736f6c634300081d000a", } // BatchInboxABI is the input ABI used to generate the binding from. @@ -44,7 +44,7 @@ var BatchInboxABI = BatchInboxMetaData.ABI var BatchInboxBin = BatchInboxMetaData.Bin // DeployBatchInbox deploys a new Ethereum contract, binding an instance of BatchInbox to it. -func DeployBatchInbox(auth *bind.TransactOpts, backend bind.ContractBackend, _batchAuthenticator common.Address, _owner common.Address) (common.Address, *types.Transaction, *BatchInbox, error) { +func DeployBatchInbox(auth *bind.TransactOpts, backend bind.ContractBackend, _batchAuthenticator common.Address) (common.Address, *types.Transaction, *BatchInbox, error) { parsed, err := BatchInboxMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -53,7 +53,7 @@ func DeployBatchInbox(auth *bind.TransactOpts, backend bind.ContractBackend, _ba return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BatchInboxBin), backend, _batchAuthenticator, _owner) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BatchInboxBin), backend, _batchAuthenticator) if err != nil { return common.Address{}, nil, nil, err } @@ -202,141 +202,6 @@ func (_BatchInbox *BatchInboxTransactorRaw) Transact(opts *bind.TransactOpts, me return _BatchInbox.Contract.contract.Transact(opts, method, params...) } -// BatchAuthenticator is a free data retrieval call binding the contract method 0xe7584573. -// -// Solidity: function batchAuthenticator() view returns(address) -func (_BatchInbox *BatchInboxCaller) BatchAuthenticator(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BatchInbox.contract.Call(opts, &out, "batchAuthenticator") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// BatchAuthenticator is a free data retrieval call binding the contract method 0xe7584573. -// -// Solidity: function batchAuthenticator() view returns(address) -func (_BatchInbox *BatchInboxSession) BatchAuthenticator() (common.Address, error) { - return _BatchInbox.Contract.BatchAuthenticator(&_BatchInbox.CallOpts) -} - -// BatchAuthenticator is a free data retrieval call binding the contract method 0xe7584573. -// -// Solidity: function batchAuthenticator() view returns(address) -func (_BatchInbox *BatchInboxCallerSession) BatchAuthenticator() (common.Address, error) { - return _BatchInbox.Contract.BatchAuthenticator(&_BatchInbox.CallOpts) -} - -// NonTeeBatcher is a free data retrieval call binding the contract method 0xb1bd4285. -// -// Solidity: function nonTeeBatcher() view returns(address) -func (_BatchInbox *BatchInboxCaller) NonTeeBatcher(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BatchInbox.contract.Call(opts, &out, "nonTeeBatcher") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// NonTeeBatcher is a free data retrieval call binding the contract method 0xb1bd4285. -// -// Solidity: function nonTeeBatcher() view returns(address) -func (_BatchInbox *BatchInboxSession) NonTeeBatcher() (common.Address, error) { - return _BatchInbox.Contract.NonTeeBatcher(&_BatchInbox.CallOpts) -} - -// NonTeeBatcher is a free data retrieval call binding the contract method 0xb1bd4285. -// -// Solidity: function nonTeeBatcher() view returns(address) -func (_BatchInbox *BatchInboxCallerSession) NonTeeBatcher() (common.Address, error) { - return _BatchInbox.Contract.NonTeeBatcher(&_BatchInbox.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_BatchInbox *BatchInboxCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BatchInbox.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_BatchInbox *BatchInboxSession) Owner() (common.Address, error) { - return _BatchInbox.Contract.Owner(&_BatchInbox.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_BatchInbox *BatchInboxCallerSession) Owner() (common.Address, error) { - return _BatchInbox.Contract.Owner(&_BatchInbox.CallOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_BatchInbox *BatchInboxTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BatchInbox.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_BatchInbox *BatchInboxSession) RenounceOwnership() (*types.Transaction, error) { - return _BatchInbox.Contract.RenounceOwnership(&_BatchInbox.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_BatchInbox *BatchInboxTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _BatchInbox.Contract.RenounceOwnership(&_BatchInbox.TransactOpts) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_BatchInbox *BatchInboxTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _BatchInbox.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_BatchInbox *BatchInboxSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _BatchInbox.Contract.TransferOwnership(&_BatchInbox.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_BatchInbox *BatchInboxTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _BatchInbox.Contract.TransferOwnership(&_BatchInbox.TransactOpts, newOwner) -} - // Fallback is a paid mutator transaction binding the contract fallback function. // // Solidity: fallback() returns() @@ -357,156 +222,3 @@ func (_BatchInbox *BatchInboxSession) Fallback(calldata []byte) (*types.Transact func (_BatchInbox *BatchInboxTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { return _BatchInbox.Contract.Fallback(&_BatchInbox.TransactOpts, calldata) } - -// BatchInboxOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the BatchInbox contract. -type BatchInboxOwnershipTransferredIterator struct { - Event *BatchInboxOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BatchInboxOwnershipTransferredIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BatchInboxOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BatchInboxOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BatchInboxOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BatchInboxOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BatchInboxOwnershipTransferred represents a OwnershipTransferred event raised by the BatchInbox contract. -type BatchInboxOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_BatchInbox *BatchInboxFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BatchInboxOwnershipTransferredIterator, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _BatchInbox.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &BatchInboxOwnershipTransferredIterator{contract: _BatchInbox.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_BatchInbox *BatchInboxFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BatchInboxOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _BatchInbox.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BatchInboxOwnershipTransferred) - if err := _BatchInbox.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_BatchInbox *BatchInboxFilterer) ParseOwnershipTransferred(log types.Log) (*BatchInboxOwnershipTransferred, error) { - event := new(BatchInboxOwnershipTransferred) - if err := _BatchInbox.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/op-batcher/bindings/espresso_tee_verifier.go b/op-batcher/bindings/espresso_tee_verifier.go index 447501bc3dc..68c2b5f07fb 100644 --- a/op-batcher/bindings/espresso_tee_verifier.go +++ b/op-batcher/bindings/espresso_tee_verifier.go @@ -31,8 +31,8 @@ var ( // EspressoTEEVerifierMetaData contains all meta data concerning the EspressoTEEVerifier contract. var EspressoTEEVerifierMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_espressoSGXTEEVerifier\",\"type\":\"address\",\"internalType\":\"contractIEspressoSGXTEEVerifier\"},{\"name\":\"_espressoNitroTEEVerifier\",\"type\":\"address\",\"internalType\":\"contractIEspressoNitroTEEVerifier\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"espressoNitroTEEVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEspressoNitroTEEVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"espressoSGXTEEVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEspressoSGXTEEVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerSigner\",\"inputs\":[{\"name\":\"attestation\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"teeType\",\"type\":\"uint8\",\"internalType\":\"enumIEspressoTEEVerifier.TeeType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registeredEnclaveHashes\",\"inputs\":[{\"name\":\"enclaveHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"teeType\",\"type\":\"uint8\",\"internalType\":\"enumIEspressoTEEVerifier.TeeType\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registeredSigners\",\"inputs\":[{\"name\":\"signer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"teeType\",\"type\":\"uint8\",\"internalType\":\"enumIEspressoTEEVerifier.TeeType\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setEspressoNitroTEEVerifier\",\"inputs\":[{\"name\":\"_espressoNitroTEEVerifier\",\"type\":\"address\",\"internalType\":\"contractIEspressoNitroTEEVerifier\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setEspressoSGXTEEVerifier\",\"inputs\":[{\"name\":\"_espressoSGXTEEVerifier\",\"type\":\"address\",\"internalType\":\"contractIEspressoSGXTEEVerifier\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verify\",\"inputs\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"userDataHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UnsupportedTeeType\",\"inputs\":[]}]", - Bin: "0x6080346100aa57601f61115d38819003918201601f19168301916001600160401b038311848410176100ae5780849260409485528339810103126100aa5780516001600160a01b03811691908290036100aa57602001516001600160a01b03811691908290036100aa57610072336100c2565b60018060a01b0319600254161760025560018060a01b0319600354161760035561009b336100c2565b60405161104690816101178239f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b600180546001600160a01b03199081169091555f80546001600160a01b03938416928116831782559192909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a356fe60806040526004361015610011575f80fd5b5f3560e01c8063330282f5146108c457806335ecb4c11461083c5780633cbe6803146107f35780636b406341146105ad578063715018a6146104eb57806379ba50971461038b57806380710c801461033a5780638da5cb5b146102ea578063bc3a091114610265578063d80a4c2814610214578063e30c3978146101c3578063e9b1a7be146101695763f2fde38b146100a8575f80fd5b346101655760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101655773ffffffffffffffffffffffffffffffffffffffff6100f46109b8565b6100fc610d94565b16807fffffffffffffffffffffffff0000000000000000000000000000000000000000600154161760015573ffffffffffffffffffffffffffffffffffffffff5f54167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227005f80a3005b5f80fd5b346101655760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610165576101a06109b8565b602435906002821015610165576020916101b991610c8e565b6040519015158152f35b34610165575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016557602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b34610165575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016557602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b346101655760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101655760043573ffffffffffffffffffffffffffffffffffffffff8116809103610165576102bd610d94565b7fffffffffffffffffffffffff000000000000000000000000000000000000000060025416176002555f80f35b34610165575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016557602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b34610165575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016557602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b34610165575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610165573373ffffffffffffffffffffffffffffffffffffffff6001541603610467577fffffffffffffffffffffffff0000000000000000000000000000000000000000600154166001555f54337fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f5573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e657200000000000000000000000000000000000000000000006064820152fd5b34610165575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261016557610521610d94565b7fffffffffffffffffffffffff0000000000000000000000000000000000000000600154166001555f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101655760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101655760043567ffffffffffffffff811161016557366023820112156101655780600401359067ffffffffffffffff82116107c65760405161064360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601160182610977565b8281523660248484010111610165575f60208461067995602461067196018386013783010152602435610e12565b919091610e47565b73ffffffffffffffffffffffffffffffffffffffff60208160025416926024604051809481937f0123d0c100000000000000000000000000000000000000000000000000000000835216958660048301525afa90811561079c575f916107a7575b501561074557602073ffffffffffffffffffffffffffffffffffffffff60035416916024604051809481937f0123d0c100000000000000000000000000000000000000000000000000000000835260048301525afa90811561079c575f9161076d575b501561074557005b7f8baa579f000000000000000000000000000000000000000000000000000000005f5260045ffd5b61078f915060203d602011610795575b6107878183610977565b810190610bc6565b8161073d565b503d61077d565b6040513d5f823e3d90fd5b6107c0915060203d602011610795576107878183610977565b826106da565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b346101655760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610165576024356002811015610165576101b9602091600435610bde565b346101655760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101655760043567ffffffffffffffff81116101655761088b903690600401610949565b60243567ffffffffffffffff8111610165576108ab903690600401610949565b90604435926002841015610165576108c294610a43565b005b346101655760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101655760043573ffffffffffffffffffffffffffffffffffffffff81168091036101655761091c610d94565b7fffffffffffffffffffffffff000000000000000000000000000000000000000060035416176003555f80f35b9181601f840112156101655782359167ffffffffffffffff8311610165576020838186019501011161016557565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176107c657604052565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361016557565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9290610a3290610a4095936040865260408601916109db565b9260208185039101526109db565b90565b905f946002811015610b99578015610b1a57600114610a84576004857fd0cb35a1000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff6003541691823b15610b1657908580949392610ae4604051978896879586947fba58e82a00000000000000000000000000000000000000000000000000000000865260048601610a19565b03925af18015610b0b57610af6575050565b610b01828092610977565b610b085750565b80fd5b6040513d84823e3d90fd5b8580fd5b509092935073ffffffffffffffffffffffffffffffffffffffff6002541690813b15610165575f8094610b7c604051978896879586947fba58e82a00000000000000000000000000000000000000000000000000000000865260048601610a19565b03925af1801561079c57610b8d5750565b5f610b9791610977565b565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b90816020910312610165575180151581036101655790565b906002811015610b995715610c15577fd0cb35a1000000000000000000000000000000000000000000000000000000005f5260045ffd5b602073ffffffffffffffffffffffffffffffffffffffff60025416916024604051809481937f966989ee00000000000000000000000000000000000000000000000000000000835260048301525afa90811561079c575f91610c75575090565b610a40915060203d602011610795576107878183610977565b906002811015610b99578015610d3057600114610ccd577fd0cb35a1000000000000000000000000000000000000000000000000000000005f5260045ffd5b602073ffffffffffffffffffffffffffffffffffffffff602481600354169360405194859384927f0123d0c10000000000000000000000000000000000000000000000000000000084521660048301525afa90811561079c575f91610c75575090565b50602073ffffffffffffffffffffffffffffffffffffffff602481600254169360405194859384927f0123d0c10000000000000000000000000000000000000000000000000000000084521660048301525afa90811561079c575f91610c75575090565b73ffffffffffffffffffffffffffffffffffffffff5f54163303610db457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b9060418151145f14610e3e57610e3a91602082015190606060408401519301515f1a90610fb1565b9091565b50505f90600290565b6005811015610b995780610e585750565b60018103610ebe5760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b60028103610f245760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b600314610f2d57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152fd5b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841161102e576020935f9360ff60809460405194855216868401526040830152606082015282805260015afa1561079c575f5173ffffffffffffffffffffffffffffffffffffffff81161561102657905f90565b505f90600190565b505050505f9060039056fea164736f6c634300081c000a", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEFAULT_ADMIN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"GUARDIAN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addGuardian\",\"inputs\":[{\"name\":\"guardian\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"deleteEnclaveHashes\",\"inputs\":[{\"name\":\"enclaveHashes\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"},{\"name\":\"teeType\",\"type\":\"uint8\",\"internalType\":\"enumIEspressoTEEVerifier.TeeType\"},{\"name\":\"service\",\"type\":\"uint8\",\"internalType\":\"enumServiceType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"espressoNitroTEEVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEspressoNitroTEEVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"espressoSGXTEEVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIEspressoSGXTEEVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getGuardians\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleAdmin\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleMember\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleMemberCount\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleMembers\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"grantRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"guardianCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hasRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_espressoSGXTEEVerifier\",\"type\":\"address\",\"internalType\":\"contractIEspressoSGXTEEVerifier\"},{\"name\":\"_espressoNitroTEEVerifier\",\"type\":\"address\",\"internalType\":\"contractIEspressoNitroTEEVerifier\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isGuardian\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerService\",\"inputs\":[{\"name\":\"verificationData\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"teeType\",\"type\":\"uint8\",\"internalType\":\"enumIEspressoTEEVerifier.TeeType\"},{\"name\":\"service\",\"type\":\"uint8\",\"internalType\":\"enumServiceType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"registeredEnclaveHashes\",\"inputs\":[{\"name\":\"enclaveHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"teeType\",\"type\":\"uint8\",\"internalType\":\"enumIEspressoTEEVerifier.TeeType\"},{\"name\":\"service\",\"type\":\"uint8\",\"internalType\":\"enumServiceType\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeGuardian\",\"inputs\":[{\"name\":\"guardian\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"callerConfirmation\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"revokeRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setEnclaveHash\",\"inputs\":[{\"name\":\"enclaveHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"valid\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"teeType\",\"type\":\"uint8\",\"internalType\":\"enumIEspressoTEEVerifier.TeeType\"},{\"name\":\"service\",\"type\":\"uint8\",\"internalType\":\"enumServiceType\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setEspressoNitroTEEVerifier\",\"inputs\":[{\"name\":\"_espressoNitroTEEVerifier\",\"type\":\"address\",\"internalType\":\"contractIEspressoNitroTEEVerifier\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setEspressoSGXTEEVerifier\",\"inputs\":[{\"name\":\"_espressoSGXTEEVerifier\",\"type\":\"address\",\"internalType\":\"contractIEspressoSGXTEEVerifier\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNitroEnclaveVerifier\",\"inputs\":[{\"name\":\"nitroVerifier\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setQuoteVerifier\",\"inputs\":[{\"name\":\"quoteVerifier\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verify\",\"inputs\":[{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"userDataHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"teeType\",\"type\":\"uint8\",\"internalType\":\"enumIEspressoTEEVerifier.TeeType\"},{\"name\":\"service\",\"type\":\"uint8\",\"internalType\":\"enumServiceType\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"GuardianAdded\",\"inputs\":[{\"name\":\"guardian\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GuardianRemoved\",\"inputs\":[{\"name\":\"guardian\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleAdminChanged\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"previousAdminRole\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newAdminRole\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleGranted\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleRevoked\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AccessControlBadConfirmation\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AccessControlUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"neededRole\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ECDSAInvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ECDSAInvalidSignatureLength\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ECDSAInvalidSignatureS\",\"inputs\":[{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"InvalidGuardianAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSignature\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidVerifierAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotGuardian\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"NotGuardianOrOwner\",\"inputs\":[{\"name\":\"caller\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]}]", + Bin: "0x608060405234801561000f575f80fd5b5061001e61002360201b60201c565b61019e565b5f61003261012160201b60201c565b9050805f0160089054906101000a900460ff161561007c576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8016815f015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff161461011e5767ffffffffffffffff815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d267ffffffffffffffff6040516101159190610185565b60405180910390a15b50565b5f8061013161013a60201b60201c565b90508091505090565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b5f67ffffffffffffffff82169050919050565b61017f81610163565b82525050565b5f6020820190506101985f830184610176565b92915050565b6138bf806101ab5f395ff3fe608060405234801561000f575f80fd5b50600436106101f9575f3560e01c80638da5cb5b11610118578063bc3a0911116100ab578063d522f60a1161007a578063d522f60a146105a9578063d547741f146105c5578063d80a4c28146105e1578063e30c3978146105ff578063f2fde38b1461061d576101f9565b8063bc3a091114610525578063c0c53b8b14610541578063ca15c8731461055d578063ce3fe7ee1461058d576101f9565b8063a217fddf116100e7578063a217fddf1461049f578063a3246ad3146104bd578063a526d83b146104ed578063a628a19e14610509576101f9565b80638da5cb5b146104055780639010d07c146104235780639143e7641461045357806391d148541461046f576101f9565b806354387ad71161019057806379ba50971161015f57806379ba5097146103915780637e41f57c1461039b5780637f82ea6c146103cb57806380710c80146103e7576101f9565b806354387ad71461031d57806355ddfa061461033b578063714041561461036b578063715018a614610387576101f9565b806324ea54f4116101cc57806324ea54f4146102ab5780632f2ff15d146102c9578063330282f5146102e557806336568abe14610301576101f9565b806301ffc9a7146101fd5780630665f04b1461022d5780630c68ba211461024b578063248a9ca31461027b575b5f80fd5b61021760048036038101906102129190612a5d565b610639565b6040516102249190612aa2565b60405180910390f35b6102356106b2565b6040516102429190612ba2565b60405180910390f35b61026560048036038101906102609190612bec565b6107c3565b6040516102729190612aa2565b60405180910390f35b61029560048036038101906102909190612c4a565b6107f5565b6040516102a29190612c84565b60405180910390f35b6102b361081f565b6040516102c09190612c84565b60405180910390f35b6102e360048036038101906102de9190612c9d565b610843565b005b6102ff60048036038101906102fa9190612d16565b610865565b005b61031b60048036038101906103169190612c9d565b61091e565b005b610325610999565b6040516103329190612d59565b60405180910390f35b61035560048036038101906103509190612ef4565b6109c8565b6040516103629190612aa2565b60405180910390f35b61038560048036038101906103809190612bec565b610bc5565b005b61038f610c6d565b005b610399610c80565b005b6103b560048036038101906103b09190612f74565b610d0e565b6040516103c29190612aa2565b60405180910390f35b6103e560048036038101906103e09190613021565b610e91565b005b6103ef610ff8565b6040516103fc919061311f565b60405180910390f35b61040d611028565b60405161041a9190613147565b60405180910390f35b61043d6004803603810190610438919061318a565b61105d565b60405161044a9190613147565b60405180910390f35b61046d600480360381019061046891906131f2565b611096565b005b61048960048036038101906104849190612c9d565b61129e565b6040516104969190612aa2565b60405180910390f35b6104a761130f565b6040516104b49190612c84565b60405180910390f35b6104d760048036038101906104d29190612c4a565b611315565b6040516104e49190612ba2565b60405180910390f35b61050760048036038101906105029190612bec565b611344565b005b610523600480360381019061051e9190612bec565b611450565b005b61053f600480360381019061053a9190613291565b6114eb565b005b61055b600480360381019061055691906132bc565b6115a3565b005b61057760048036038101906105729190612c4a565b6117b5565b6040516105849190612d59565b60405180910390f35b6105a760048036038101906105a29190612bec565b6117e3565b005b6105c360048036038101906105be91906133cc565b61187d565b005b6105df60048036038101906105da9190612c9d565b611a80565b005b6105e9611aa2565b6040516105f69190613458565b60405180910390f35b610607611ad3565b6040516106149190613147565b60405180910390f35b61063760048036038101906106329190612bec565b611b08565b005b5f7f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806106ab57506106aa82611bc1565b5b9050919050565b60605f6106de7f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50416117b5565b90505f8167ffffffffffffffff8111156106fb576106fa612d8a565b5b6040519080825280602002602001820160405280156107295781602001602082028036833780820191505090505b5090505f5b828110156107ba576107607f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50418261105d565b82828151811061077357610772613471565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808060010191505061072e565b50809250505090565b5f6107ee7f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50418361129e565b9050919050565b5f806107ff611c3a565b9050805f015f8481526020019081526020015f2060010154915050919050565b7f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a504181565b61084c826107f5565b61085581611c61565b61085f8383611c75565b50505050565b61086d611cc5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036108d2576040517f10c40e8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806108db611d4c565b6001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610926611d73565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461098a576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109948282611d7a565b505050565b5f6109c37f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50416117b5565b905090565b5f806109d2611d4c565b90505f6109df8688611dca565b90505f60018111156109f4576109f361349e565b5b856001811115610a0757610a0661349e565b5b03610ae357815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636d8f5aa982866040518363ffffffff1660e01b8152600401610a69929190613511565b602060405180830381865afa158015610a84573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610aa8919061354c565b610ade576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bb7565b816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636d8f5aa982866040518363ffffffff1660e01b8152600401610b41929190613511565b602060405180830381865afa158015610b5c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b80919061354c565b610bb6576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600192505050949350505050565b610bcd611cc5565b610bf77f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50418261129e565b15610c6a57610c267f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a504182611a80565b8073ffffffffffffffffffffffffffffffffffffffff167fb8107d0c6b40be480ce3172ee66ba6d64b71f6b1685a851340036e6e2e3e3c5260405160405180910390a25b50565b610c75611cc5565b610c7e5f611df4565b565b5f610c89611d73565b90508073ffffffffffffffffffffffffffffffffffffffff16610caa611ad3565b73ffffffffffffffffffffffffffffffffffffffff1614610d0257806040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610cf99190613147565b60405180910390fd5b610d0b81611df4565b50565b5f80610d18611d4c565b90505f6001811115610d2d57610d2c61349e565b5b846001811115610d4057610d3f61349e565b5b03610de957805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639f3eb67286856040518363ffffffff1660e01b8152600401610da2929190613577565b602060405180830381865afa158015610dbd573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610de1919061354c565b915050610e8a565b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639f3eb67286856040518363ffffffff1660e01b8152600401610e47929190613577565b602060405180830381865afa158015610e62573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e86919061354c565b9150505b9392505050565b5f610e9a611d4c565b90505f6001811115610eaf57610eae61349e565b5b836001811115610ec257610ec161349e565b5b03610f5d57805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dac79fc888888888876040518663ffffffff1660e01b8152600401610f2a9594939291906135da565b5f604051808303815f87803b158015610f41575f80fd5b505af1158015610f53573d5f803e3d5ffd5b5050505050610ff0565b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dac79fc888888888876040518663ffffffff1660e01b8152600401610fc19594939291906135da565b5f604051808303815f87803b158015610fd8575f80fd5b505af1158015610fea573d5f803e3d5ffd5b50505050505b505050505050565b5f611001611d4c565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f80611032611e5a565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b5f80611067611e81565b905061108d83825f015f8781526020019081526020015f20611ea890919063ffffffff16565b91505092915050565b6110c07f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50413361129e565b15801561110057506110d0611028565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561114257336040517fd53780c40000000000000000000000000000000000000000000000000000000081526004016111399190613147565b60405180910390fd5b5f61114b611d4c565b90505f60018111156111605761115f61349e565b5b8360018111156111735761117261349e565b5b0361120957805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630f1f0f868686856040518463ffffffff1660e01b81526004016111d793929190613621565b5f604051808303815f87803b1580156111ee575f80fd5b505af1158015611200573d5f803e3d5ffd5b50505050611297565b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630f1f0f868686856040518463ffffffff1660e01b815260040161126993929190613621565b5f604051808303815f87803b158015611280575f80fd5b505af1158015611292573d5f803e3d5ffd5b505050505b5050505050565b5f806112a8611c3a565b9050805f015f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1691505092915050565b5f801b81565b60605f611320611e81565b905061133c815f015f8581526020019081526020015f20611ebf565b915050919050565b61134c611cc5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036113b1576040517f1b08105400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113db7f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50418261129e565b61144d576114097f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a504182610843565b8073ffffffffffffffffffffffffffffffffffffffff167f038596bb31e2e7d3d9f184d4c98b310103f6d7f5830e5eec32bffe6f1728f96960405160405180910390a25b50565b611458611cc5565b611460611d4c565b6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a628a19e826040518263ffffffff1660e01b81526004016114bb9190613147565b5f604051808303815f87803b1580156114d2575f80fd5b505af11580156114e4573d5f803e3d5ffd5b5050505050565b6114f3611cc5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611558576040517f10c40e8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80611561611d4c565b5f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f6115ac611ede565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f808267ffffffffffffffff161480156115f45750825b90505f60018367ffffffffffffffff1614801561162757505f3073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015611635575080155b1561166c576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555083156116b9576001855f0160086101000a81548160ff0219169083151502179055505b5f6116c2611d4c565b905087815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555086816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061175089611ef1565b5083156117ab575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516117a291906136a2565b60405180910390a15b5050505050505050565b5f806117bf611e81565b90506117db815f015f8581526020019081526020015f20611f1e565b915050919050565b6117eb611cc5565b6117f3611d4c565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ce3fe7ee826040518263ffffffff1660e01b815260040161184d9190613147565b5f604051808303815f87803b158015611864575f80fd5b505af1158015611876573d5f803e3d5ffd5b5050505050565b6118a77f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50413361129e565b1580156118e757506118b7611028565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b1561192957336040517fd53780c40000000000000000000000000000000000000000000000000000000081526004016119209190613147565b60405180910390fd5b5f611932611d4c565b90505f60018111156119475761194661349e565b5b83600181111561195a5761195961349e565b5b036119ee57805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cd8f699785846040518363ffffffff1660e01b81526004016119bc929190613772565b5f604051808303815f87803b1580156119d3575f80fd5b505af11580156119e5573d5f803e3d5ffd5b50505050611a7a565b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cd8f699785846040518363ffffffff1660e01b8152600401611a4c929190613772565b5f604051808303815f87803b158015611a63575f80fd5b505af1158015611a75573d5f803e3d5ffd5b505050505b50505050565b611a89826107f5565b611a9281611c61565b611a9c8383611d7a565b50505050565b5f611aab611d4c565b6001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f80611add611f31565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b611b10611cc5565b5f611b19611f31565b905081815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff16611b7b611028565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b5f7f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611c335750611c3282611f58565b5b9050919050565b5f7f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800905090565b611c7281611c6d611d73565b611fc1565b50565b5f80611c7f611e81565b90505f611c8c8585612012565b90508015611cba57611cb884835f015f8881526020019081526020015f2061210a90919063ffffffff16565b505b809250505092915050565b611ccd611d73565b73ffffffffffffffffffffffffffffffffffffffff16611ceb611028565b73ffffffffffffffffffffffffffffffffffffffff1614611d4a57611d0e611d73565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401611d419190613147565b60405180910390fd5b565b5f7f89639f446056f5d7661bbd94e8ab0617a80058ed7b072845818d4b93332e4800905090565b5f33905090565b5f80611d84611e81565b90505f611d918585612137565b90508015611dbf57611dbd84835f015f8881526020019081526020015f2061222f90919063ffffffff16565b505b809250505092915050565b5f805f80611dd8868661225c565b925092509250611de882826122b1565b82935050505092915050565b5f611dfd611028565b9050611e0882612413565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611e4957611e475f801b82611d7a565b505b611e555f801b83611c75565b505050565b5f7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000905090565b5f611eb5835f0183612450565b5f1c905092915050565b60605f611ecd835f01612477565b905060608190508092505050919050565b5f80611ee86124d0565b90508091505090565b611ef96124f9565b611f0281612539565b611f0a61254d565b611f12612557565b611f1b81612561565b50565b5f611f2a825f016125a5565b9050919050565b5f7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00905090565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611fcb828261129e565b61200e5780826040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526004016120059291906137a0565b60405180910390fd5b5050565b5f8061201c611c3a565b9050612028848461129e565b6120ff576001815f015f8681526020019081526020015f205f015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555061209b611d73565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050612104565b5f9150505b92915050565b5f61212f835f018373ffffffffffffffffffffffffffffffffffffffff165f1b6125b4565b905092915050565b5f80612141611c3a565b905061214d848461129e565b15612224575f815f015f8681526020019081526020015f205f015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506121c0611d73565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16857ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a46001915050612229565b5f9150505b92915050565b5f612254835f018373ffffffffffffffffffffffffffffffffffffffff165f1b61261b565b905092915050565b5f805f604184510361229c575f805f602087015192506040870151915060608701515f1a905061228e88828585612717565b9550955095505050506122aa565b5f600285515f1b9250925092505b9250925092565b5f60038111156122c4576122c361349e565b5b8260038111156122d7576122d661349e565b5b031561240f57600160038111156122f1576122f061349e565b5b8260038111156123045761230361349e565b5b0361233b576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600381111561234f5761234e61349e565b5b8260038111156123625761236161349e565b5b036123a657805f1c6040517ffce698f700000000000000000000000000000000000000000000000000000000815260040161239d9190612d59565b60405180910390fd5b6003808111156123b9576123b861349e565b5b8260038111156123cc576123cb61349e565b5b0361240e57806040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004016124059190612c84565b60405180910390fd5b5b5050565b5f61241c611f31565b9050805f015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905561244c826127fe565b5050565b5f825f01828154811061246657612465613471565b5b905f5260205f200154905092915050565b6060815f018054806020026020016040519081016040528092919081815260200182805480156124c457602002820191905f5260205f20905b8154815260200190600101908083116124b0575b50505050509050919050565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b6125016128cf565b612537576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6125416124f9565b61254a816128ed565b50565b6125556124f9565b565b61255f6124f9565b565b6125696124f9565b6125755f801b82611c75565b506125a27f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50415f801b612971565b50565b5f815f01805490509050919050565b5f6125bf83836129d7565b61261157825f0182908060018154018082558091505060019003905f5260205f20015f9091909190915055825f0180549050836001015f8481526020019081526020015f208190555060019050612615565b5f90505b92915050565b5f80836001015f8481526020019081526020015f205490505f811461270c575f60018261264891906137f4565b90505f6001865f018054905061265e91906137f4565b90508082146126c4575f865f01828154811061267d5761267c613471565b5b905f5260205f200154905080875f01848154811061269e5761269d613471565b5b905f5260205f20018190555083876001015f8381526020019081526020015f2081905550505b855f018054806126d7576126d6613827565b5b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050612711565b5f9150505b92915050565b5f805f7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0845f1c1115612753575f6003859250925092506127f4565b5f6001888888886040515f8152602001604052604051612776949392919061386f565b6020604051602081039080840390855afa158015612796573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036127e7575f60015f801b935093509350506127f4565b805f805f1b935093509350505b9450945094915050565b5f612807611e5a565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b5f6128d8611ede565b5f0160089054906101000a900460ff16905090565b6128f56124f9565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612965575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161295c9190613147565b60405180910390fd5b61296e81611df4565b50565b5f61297a611c3a565b90505f612986846107f5565b905082825f015f8681526020019081526020015f20600101819055508281857fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff60405160405180910390a450505050565b5f80836001015f8481526020019081526020015f20541415905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612a3c81612a08565b8114612a46575f80fd5b50565b5f81359050612a5781612a33565b92915050565b5f60208284031215612a7257612a71612a00565b5b5f612a7f84828501612a49565b91505092915050565b5f8115159050919050565b612a9c81612a88565b82525050565b5f602082019050612ab55f830184612a93565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612b0d82612ae4565b9050919050565b612b1d81612b03565b82525050565b5f612b2e8383612b14565b60208301905092915050565b5f602082019050919050565b5f612b5082612abb565b612b5a8185612ac5565b9350612b6583612ad5565b805f5b83811015612b95578151612b7c8882612b23565b9750612b8783612b3a565b925050600181019050612b68565b5085935050505092915050565b5f6020820190508181035f830152612bba8184612b46565b905092915050565b612bcb81612b03565b8114612bd5575f80fd5b50565b5f81359050612be681612bc2565b92915050565b5f60208284031215612c0157612c00612a00565b5b5f612c0e84828501612bd8565b91505092915050565b5f819050919050565b612c2981612c17565b8114612c33575f80fd5b50565b5f81359050612c4481612c20565b92915050565b5f60208284031215612c5f57612c5e612a00565b5b5f612c6c84828501612c36565b91505092915050565b612c7e81612c17565b82525050565b5f602082019050612c975f830184612c75565b92915050565b5f8060408385031215612cb357612cb2612a00565b5b5f612cc085828601612c36565b9250506020612cd185828601612bd8565b9150509250929050565b5f612ce582612b03565b9050919050565b612cf581612cdb565b8114612cff575f80fd5b50565b5f81359050612d1081612cec565b92915050565b5f60208284031215612d2b57612d2a612a00565b5b5f612d3884828501612d02565b91505092915050565b5f819050919050565b612d5381612d41565b82525050565b5f602082019050612d6c5f830184612d4a565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612dc082612d7a565b810181811067ffffffffffffffff82111715612ddf57612dde612d8a565b5b80604052505050565b5f612df16129f7565b9050612dfd8282612db7565b919050565b5f67ffffffffffffffff821115612e1c57612e1b612d8a565b5b612e2582612d7a565b9050602081019050919050565b828183375f83830152505050565b5f612e52612e4d84612e02565b612de8565b905082815260208101848484011115612e6e57612e6d612d76565b5b612e79848285612e32565b509392505050565b5f82601f830112612e9557612e94612d72565b5b8135612ea5848260208601612e40565b91505092915050565b60028110612eba575f80fd5b50565b5f81359050612ecb81612eae565b92915050565b60028110612edd575f80fd5b50565b5f81359050612eee81612ed1565b92915050565b5f805f8060808587031215612f0c57612f0b612a00565b5b5f85013567ffffffffffffffff811115612f2957612f28612a04565b5b612f3587828801612e81565b9450506020612f4687828801612c36565b9350506040612f5787828801612ebd565b9250506060612f6887828801612ee0565b91505092959194509250565b5f805f60608486031215612f8b57612f8a612a00565b5b5f612f9886828701612c36565b9350506020612fa986828701612ebd565b9250506040612fba86828701612ee0565b9150509250925092565b5f80fd5b5f80fd5b5f8083601f840112612fe157612fe0612d72565b5b8235905067ffffffffffffffff811115612ffe57612ffd612fc4565b5b60208301915083600182028301111561301a57613019612fc8565b5b9250929050565b5f805f805f806080878903121561303b5761303a612a00565b5b5f87013567ffffffffffffffff81111561305857613057612a04565b5b61306489828a01612fcc565b9650965050602087013567ffffffffffffffff81111561308757613086612a04565b5b61309389828a01612fcc565b945094505060406130a689828a01612ebd565b92505060606130b789828a01612ee0565b9150509295509295509295565b5f819050919050565b5f6130e76130e26130dd84612ae4565b6130c4565b612ae4565b9050919050565b5f6130f8826130cd565b9050919050565b5f613109826130ee565b9050919050565b613119816130ff565b82525050565b5f6020820190506131325f830184613110565b92915050565b61314181612b03565b82525050565b5f60208201905061315a5f830184613138565b92915050565b61316981612d41565b8114613173575f80fd5b50565b5f8135905061318481613160565b92915050565b5f80604083850312156131a05761319f612a00565b5b5f6131ad85828601612c36565b92505060206131be85828601613176565b9150509250929050565b6131d181612a88565b81146131db575f80fd5b50565b5f813590506131ec816131c8565b92915050565b5f805f806080858703121561320a57613209612a00565b5b5f61321787828801612c36565b9450506020613228878288016131de565b935050604061323987828801612ebd565b925050606061324a87828801612ee0565b91505092959194509250565b5f61326082612b03565b9050919050565b61327081613256565b811461327a575f80fd5b50565b5f8135905061328b81613267565b92915050565b5f602082840312156132a6576132a5612a00565b5b5f6132b38482850161327d565b91505092915050565b5f805f606084860312156132d3576132d2612a00565b5b5f6132e086828701612bd8565b93505060206132f18682870161327d565b925050604061330286828701612d02565b9150509250925092565b5f67ffffffffffffffff82111561332657613325612d8a565b5b602082029050602081019050919050565b5f6133496133448461330c565b612de8565b9050808382526020820190506020840283018581111561336c5761336b612fc8565b5b835b8181101561339557806133818882612c36565b84526020840193505060208101905061336e565b5050509392505050565b5f82601f8301126133b3576133b2612d72565b5b81356133c3848260208601613337565b91505092915050565b5f805f606084860312156133e3576133e2612a00565b5b5f84013567ffffffffffffffff811115613400576133ff612a04565b5b61340c8682870161339f565b935050602061341d86828701612ebd565b925050604061342e86828701612ee0565b9150509250925092565b5f613442826130ee565b9050919050565b61345281613438565b82525050565b5f60208201905061346b5f830184613449565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106134dc576134db61349e565b5b50565b5f8190506134ec826134cb565b919050565b5f6134fb826134df565b9050919050565b61350b816134f1565b82525050565b5f6040820190506135245f830185613138565b6135316020830184613502565b9392505050565b5f81519050613546816131c8565b92915050565b5f6020828403121561356157613560612a00565b5b5f61356e84828501613538565b91505092915050565b5f60408201905061358a5f830185612c75565b6135976020830184613502565b9392505050565b5f82825260208201905092915050565b5f6135b9838561359e565b93506135c6838584612e32565b6135cf83612d7a565b840190509392505050565b5f6060820190508181035f8301526135f38187896135ae565b905081810360208301526136088185876135ae565b90506136176040830184613502565b9695505050505050565b5f6060820190506136345f830186612c75565b6136416020830185612a93565b61364e6040830184613502565b949350505050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f61368c61368761368284613656565b6130c4565b61365f565b9050919050565b61369c81613672565b82525050565b5f6020820190506136b55f830184613693565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6136ed81612c17565b82525050565b5f6136fe83836136e4565b60208301905092915050565b5f602082019050919050565b5f613720826136bb565b61372a81856136c5565b9350613735836136d5565b805f5b8381101561376557815161374c88826136f3565b97506137578361370a565b925050600181019050613738565b5085935050505092915050565b5f6040820190508181035f83015261378a8185613716565b90506137996020830184613502565b9392505050565b5f6040820190506137b35f830185613138565b6137c06020830184612c75565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6137fe82612d41565b915061380983612d41565b9250828203905081811115613821576138206137c7565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b5f60ff82169050919050565b61386981613854565b82525050565b5f6080820190506138825f830187612c75565b61388f6020830186613860565b61389c6040830185612c75565b6138a96060830184612c75565b9594505050505056fea164736f6c6343000819000a", } // EspressoTEEVerifierABI is the input ABI used to generate the binding from. @@ -44,7 +44,7 @@ var EspressoTEEVerifierABI = EspressoTEEVerifierMetaData.ABI var EspressoTEEVerifierBin = EspressoTEEVerifierMetaData.Bin // DeployEspressoTEEVerifier deploys a new Ethereum contract, binding an instance of EspressoTEEVerifier to it. -func DeployEspressoTEEVerifier(auth *bind.TransactOpts, backend bind.ContractBackend, _espressoSGXTEEVerifier common.Address, _espressoNitroTEEVerifier common.Address) (common.Address, *types.Transaction, *EspressoTEEVerifier, error) { +func DeployEspressoTEEVerifier(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *EspressoTEEVerifier, error) { parsed, err := EspressoTEEVerifierMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -53,7 +53,7 @@ func DeployEspressoTEEVerifier(auth *bind.TransactOpts, backend bind.ContractBac return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(EspressoTEEVerifierBin), backend, _espressoSGXTEEVerifier, _espressoNitroTEEVerifier) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(EspressoTEEVerifierBin), backend) if err != nil { return common.Address{}, nil, nil, err } @@ -202,6 +202,68 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorRaw) Transact(opts *bin return _EspressoTEEVerifier.Contract.contract.Transact(opts, method, params...) } +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _EspressoTEEVerifier.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) DEFAULTADMINROLE() ([32]byte, error) { + return _EspressoTEEVerifier.Contract.DEFAULTADMINROLE(&_EspressoTEEVerifier.CallOpts) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) DEFAULTADMINROLE() ([32]byte, error) { + return _EspressoTEEVerifier.Contract.DEFAULTADMINROLE(&_EspressoTEEVerifier.CallOpts) +} + +// GUARDIANROLE is a free data retrieval call binding the contract method 0x24ea54f4. +// +// Solidity: function GUARDIAN_ROLE() view returns(bytes32) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) GUARDIANROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _EspressoTEEVerifier.contract.Call(opts, &out, "GUARDIAN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GUARDIANROLE is a free data retrieval call binding the contract method 0x24ea54f4. +// +// Solidity: function GUARDIAN_ROLE() view returns(bytes32) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) GUARDIANROLE() ([32]byte, error) { + return _EspressoTEEVerifier.Contract.GUARDIANROLE(&_EspressoTEEVerifier.CallOpts) +} + +// GUARDIANROLE is a free data retrieval call binding the contract method 0x24ea54f4. +// +// Solidity: function GUARDIAN_ROLE() view returns(bytes32) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) GUARDIANROLE() ([32]byte, error) { + return _EspressoTEEVerifier.Contract.GUARDIANROLE(&_EspressoTEEVerifier.CallOpts) +} + // EspressoNitroTEEVerifier is a free data retrieval call binding the contract method 0xd80a4c28. // // Solidity: function espressoNitroTEEVerifier() view returns(address) @@ -264,6 +326,254 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) EspressoSGXTEEVeri return _EspressoTEEVerifier.Contract.EspressoSGXTEEVerifier(&_EspressoTEEVerifier.CallOpts) } +// GetGuardians is a free data retrieval call binding the contract method 0x0665f04b. +// +// Solidity: function getGuardians() view returns(address[]) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) GetGuardians(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _EspressoTEEVerifier.contract.Call(opts, &out, "getGuardians") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetGuardians is a free data retrieval call binding the contract method 0x0665f04b. +// +// Solidity: function getGuardians() view returns(address[]) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) GetGuardians() ([]common.Address, error) { + return _EspressoTEEVerifier.Contract.GetGuardians(&_EspressoTEEVerifier.CallOpts) +} + +// GetGuardians is a free data retrieval call binding the contract method 0x0665f04b. +// +// Solidity: function getGuardians() view returns(address[]) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) GetGuardians() ([]common.Address, error) { + return _EspressoTEEVerifier.Contract.GetGuardians(&_EspressoTEEVerifier.CallOpts) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { + var out []interface{} + err := _EspressoTEEVerifier.contract.Call(opts, &out, "getRoleAdmin", role) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _EspressoTEEVerifier.Contract.GetRoleAdmin(&_EspressoTEEVerifier.CallOpts, role) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _EspressoTEEVerifier.Contract.GetRoleAdmin(&_EspressoTEEVerifier.CallOpts, role) +} + +// GetRoleMember is a free data retrieval call binding the contract method 0x9010d07c. +// +// Solidity: function getRoleMember(bytes32 role, uint256 index) view returns(address) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) GetRoleMember(opts *bind.CallOpts, role [32]byte, index *big.Int) (common.Address, error) { + var out []interface{} + err := _EspressoTEEVerifier.contract.Call(opts, &out, "getRoleMember", role, index) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetRoleMember is a free data retrieval call binding the contract method 0x9010d07c. +// +// Solidity: function getRoleMember(bytes32 role, uint256 index) view returns(address) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) GetRoleMember(role [32]byte, index *big.Int) (common.Address, error) { + return _EspressoTEEVerifier.Contract.GetRoleMember(&_EspressoTEEVerifier.CallOpts, role, index) +} + +// GetRoleMember is a free data retrieval call binding the contract method 0x9010d07c. +// +// Solidity: function getRoleMember(bytes32 role, uint256 index) view returns(address) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) GetRoleMember(role [32]byte, index *big.Int) (common.Address, error) { + return _EspressoTEEVerifier.Contract.GetRoleMember(&_EspressoTEEVerifier.CallOpts, role, index) +} + +// GetRoleMemberCount is a free data retrieval call binding the contract method 0xca15c873. +// +// Solidity: function getRoleMemberCount(bytes32 role) view returns(uint256) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) GetRoleMemberCount(opts *bind.CallOpts, role [32]byte) (*big.Int, error) { + var out []interface{} + err := _EspressoTEEVerifier.contract.Call(opts, &out, "getRoleMemberCount", role) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetRoleMemberCount is a free data retrieval call binding the contract method 0xca15c873. +// +// Solidity: function getRoleMemberCount(bytes32 role) view returns(uint256) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) GetRoleMemberCount(role [32]byte) (*big.Int, error) { + return _EspressoTEEVerifier.Contract.GetRoleMemberCount(&_EspressoTEEVerifier.CallOpts, role) +} + +// GetRoleMemberCount is a free data retrieval call binding the contract method 0xca15c873. +// +// Solidity: function getRoleMemberCount(bytes32 role) view returns(uint256) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) GetRoleMemberCount(role [32]byte) (*big.Int, error) { + return _EspressoTEEVerifier.Contract.GetRoleMemberCount(&_EspressoTEEVerifier.CallOpts, role) +} + +// GetRoleMembers is a free data retrieval call binding the contract method 0xa3246ad3. +// +// Solidity: function getRoleMembers(bytes32 role) view returns(address[]) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) GetRoleMembers(opts *bind.CallOpts, role [32]byte) ([]common.Address, error) { + var out []interface{} + err := _EspressoTEEVerifier.contract.Call(opts, &out, "getRoleMembers", role) + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetRoleMembers is a free data retrieval call binding the contract method 0xa3246ad3. +// +// Solidity: function getRoleMembers(bytes32 role) view returns(address[]) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) GetRoleMembers(role [32]byte) ([]common.Address, error) { + return _EspressoTEEVerifier.Contract.GetRoleMembers(&_EspressoTEEVerifier.CallOpts, role) +} + +// GetRoleMembers is a free data retrieval call binding the contract method 0xa3246ad3. +// +// Solidity: function getRoleMembers(bytes32 role) view returns(address[]) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) GetRoleMembers(role [32]byte) ([]common.Address, error) { + return _EspressoTEEVerifier.Contract.GetRoleMembers(&_EspressoTEEVerifier.CallOpts, role) +} + +// GuardianCount is a free data retrieval call binding the contract method 0x54387ad7. +// +// Solidity: function guardianCount() view returns(uint256) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) GuardianCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _EspressoTEEVerifier.contract.Call(opts, &out, "guardianCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GuardianCount is a free data retrieval call binding the contract method 0x54387ad7. +// +// Solidity: function guardianCount() view returns(uint256) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) GuardianCount() (*big.Int, error) { + return _EspressoTEEVerifier.Contract.GuardianCount(&_EspressoTEEVerifier.CallOpts) +} + +// GuardianCount is a free data retrieval call binding the contract method 0x54387ad7. +// +// Solidity: function guardianCount() view returns(uint256) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) GuardianCount() (*big.Int, error) { + return _EspressoTEEVerifier.Contract.GuardianCount(&_EspressoTEEVerifier.CallOpts) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { + var out []interface{} + err := _EspressoTEEVerifier.contract.Call(opts, &out, "hasRole", role, account) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _EspressoTEEVerifier.Contract.HasRole(&_EspressoTEEVerifier.CallOpts, role, account) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _EspressoTEEVerifier.Contract.HasRole(&_EspressoTEEVerifier.CallOpts, role, account) +} + +// IsGuardian is a free data retrieval call binding the contract method 0x0c68ba21. +// +// Solidity: function isGuardian(address account) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) IsGuardian(opts *bind.CallOpts, account common.Address) (bool, error) { + var out []interface{} + err := _EspressoTEEVerifier.contract.Call(opts, &out, "isGuardian", account) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsGuardian is a free data retrieval call binding the contract method 0x0c68ba21. +// +// Solidity: function isGuardian(address account) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) IsGuardian(account common.Address) (bool, error) { + return _EspressoTEEVerifier.Contract.IsGuardian(&_EspressoTEEVerifier.CallOpts, account) +} + +// IsGuardian is a free data retrieval call binding the contract method 0x0c68ba21. +// +// Solidity: function isGuardian(address account) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) IsGuardian(account common.Address) (bool, error) { + return _EspressoTEEVerifier.Contract.IsGuardian(&_EspressoTEEVerifier.CallOpts, account) +} + // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // // Solidity: function owner() view returns(address) @@ -326,12 +636,12 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) PendingOwner() (co return _EspressoTEEVerifier.Contract.PendingOwner(&_EspressoTEEVerifier.CallOpts) } -// RegisteredEnclaveHashes is a free data retrieval call binding the contract method 0x3cbe6803. +// RegisteredEnclaveHashes is a free data retrieval call binding the contract method 0x7e41f57c. // -// Solidity: function registeredEnclaveHashes(bytes32 enclaveHash, uint8 teeType) view returns(bool) -func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) RegisteredEnclaveHashes(opts *bind.CallOpts, enclaveHash [32]byte, teeType uint8) (bool, error) { +// Solidity: function registeredEnclaveHashes(bytes32 enclaveHash, uint8 teeType, uint8 service) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) RegisteredEnclaveHashes(opts *bind.CallOpts, enclaveHash [32]byte, teeType uint8, service uint8) (bool, error) { var out []interface{} - err := _EspressoTEEVerifier.contract.Call(opts, &out, "registeredEnclaveHashes", enclaveHash, teeType) + err := _EspressoTEEVerifier.contract.Call(opts, &out, "registeredEnclaveHashes", enclaveHash, teeType, service) if err != nil { return *new(bool), err @@ -343,26 +653,26 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) RegisteredEnclaveHashes(o } -// RegisteredEnclaveHashes is a free data retrieval call binding the contract method 0x3cbe6803. +// RegisteredEnclaveHashes is a free data retrieval call binding the contract method 0x7e41f57c. // -// Solidity: function registeredEnclaveHashes(bytes32 enclaveHash, uint8 teeType) view returns(bool) -func (_EspressoTEEVerifier *EspressoTEEVerifierSession) RegisteredEnclaveHashes(enclaveHash [32]byte, teeType uint8) (bool, error) { - return _EspressoTEEVerifier.Contract.RegisteredEnclaveHashes(&_EspressoTEEVerifier.CallOpts, enclaveHash, teeType) +// Solidity: function registeredEnclaveHashes(bytes32 enclaveHash, uint8 teeType, uint8 service) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) RegisteredEnclaveHashes(enclaveHash [32]byte, teeType uint8, service uint8) (bool, error) { + return _EspressoTEEVerifier.Contract.RegisteredEnclaveHashes(&_EspressoTEEVerifier.CallOpts, enclaveHash, teeType, service) } -// RegisteredEnclaveHashes is a free data retrieval call binding the contract method 0x3cbe6803. +// RegisteredEnclaveHashes is a free data retrieval call binding the contract method 0x7e41f57c. // -// Solidity: function registeredEnclaveHashes(bytes32 enclaveHash, uint8 teeType) view returns(bool) -func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) RegisteredEnclaveHashes(enclaveHash [32]byte, teeType uint8) (bool, error) { - return _EspressoTEEVerifier.Contract.RegisteredEnclaveHashes(&_EspressoTEEVerifier.CallOpts, enclaveHash, teeType) +// Solidity: function registeredEnclaveHashes(bytes32 enclaveHash, uint8 teeType, uint8 service) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) RegisteredEnclaveHashes(enclaveHash [32]byte, teeType uint8, service uint8) (bool, error) { + return _EspressoTEEVerifier.Contract.RegisteredEnclaveHashes(&_EspressoTEEVerifier.CallOpts, enclaveHash, teeType, service) } -// RegisteredSigners is a free data retrieval call binding the contract method 0xe9b1a7be. +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. // -// Solidity: function registeredSigners(address signer, uint8 teeType) view returns(bool) -func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) RegisteredSigners(opts *bind.CallOpts, signer common.Address, teeType uint8) (bool, error) { +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { var out []interface{} - err := _EspressoTEEVerifier.contract.Call(opts, &out, "registeredSigners", signer, teeType) + err := _EspressoTEEVerifier.contract.Call(opts, &out, "supportsInterface", interfaceId) if err != nil { return *new(bool), err @@ -374,47 +684,49 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) RegisteredSigners(opts *b } -// RegisteredSigners is a free data retrieval call binding the contract method 0xe9b1a7be. +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. // -// Solidity: function registeredSigners(address signer, uint8 teeType) view returns(bool) -func (_EspressoTEEVerifier *EspressoTEEVerifierSession) RegisteredSigners(signer common.Address, teeType uint8) (bool, error) { - return _EspressoTEEVerifier.Contract.RegisteredSigners(&_EspressoTEEVerifier.CallOpts, signer, teeType) +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _EspressoTEEVerifier.Contract.SupportsInterface(&_EspressoTEEVerifier.CallOpts, interfaceId) } -// RegisteredSigners is a free data retrieval call binding the contract method 0xe9b1a7be. +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. // -// Solidity: function registeredSigners(address signer, uint8 teeType) view returns(bool) -func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) RegisteredSigners(signer common.Address, teeType uint8) (bool, error) { - return _EspressoTEEVerifier.Contract.RegisteredSigners(&_EspressoTEEVerifier.CallOpts, signer, teeType) +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _EspressoTEEVerifier.Contract.SupportsInterface(&_EspressoTEEVerifier.CallOpts, interfaceId) } -// Verify is a free data retrieval call binding the contract method 0x6b406341. +// Verify is a free data retrieval call binding the contract method 0x55ddfa06. // -// Solidity: function verify(bytes signature, bytes32 userDataHash) view returns() -func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) Verify(opts *bind.CallOpts, signature []byte, userDataHash [32]byte) error { +// Solidity: function verify(bytes signature, bytes32 userDataHash, uint8 teeType, uint8 service) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierCaller) Verify(opts *bind.CallOpts, signature []byte, userDataHash [32]byte, teeType uint8, service uint8) (bool, error) { var out []interface{} - err := _EspressoTEEVerifier.contract.Call(opts, &out, "verify", signature, userDataHash) + err := _EspressoTEEVerifier.contract.Call(opts, &out, "verify", signature, userDataHash, teeType, service) if err != nil { - return err + return *new(bool), err } - return err + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err } -// Verify is a free data retrieval call binding the contract method 0x6b406341. +// Verify is a free data retrieval call binding the contract method 0x55ddfa06. // -// Solidity: function verify(bytes signature, bytes32 userDataHash) view returns() -func (_EspressoTEEVerifier *EspressoTEEVerifierSession) Verify(signature []byte, userDataHash [32]byte) error { - return _EspressoTEEVerifier.Contract.Verify(&_EspressoTEEVerifier.CallOpts, signature, userDataHash) +// Solidity: function verify(bytes signature, bytes32 userDataHash, uint8 teeType, uint8 service) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) Verify(signature []byte, userDataHash [32]byte, teeType uint8, service uint8) (bool, error) { + return _EspressoTEEVerifier.Contract.Verify(&_EspressoTEEVerifier.CallOpts, signature, userDataHash, teeType, service) } -// Verify is a free data retrieval call binding the contract method 0x6b406341. +// Verify is a free data retrieval call binding the contract method 0x55ddfa06. // -// Solidity: function verify(bytes signature, bytes32 userDataHash) view returns() -func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) Verify(signature []byte, userDataHash [32]byte) error { - return _EspressoTEEVerifier.Contract.Verify(&_EspressoTEEVerifier.CallOpts, signature, userDataHash) +// Solidity: function verify(bytes signature, bytes32 userDataHash, uint8 teeType, uint8 service) view returns(bool) +func (_EspressoTEEVerifier *EspressoTEEVerifierCallerSession) Verify(signature []byte, userDataHash [32]byte, teeType uint8, service uint8) (bool, error) { + return _EspressoTEEVerifier.Contract.Verify(&_EspressoTEEVerifier.CallOpts, signature, userDataHash, teeType, service) } // AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. @@ -438,25 +750,130 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) AcceptOwnershi return _EspressoTEEVerifier.Contract.AcceptOwnership(&_EspressoTEEVerifier.TransactOpts) } -// RegisterSigner is a paid mutator transaction binding the contract method 0x35ecb4c1. +// AddGuardian is a paid mutator transaction binding the contract method 0xa526d83b. +// +// Solidity: function addGuardian(address guardian) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) AddGuardian(opts *bind.TransactOpts, guardian common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "addGuardian", guardian) +} + +// AddGuardian is a paid mutator transaction binding the contract method 0xa526d83b. +// +// Solidity: function addGuardian(address guardian) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) AddGuardian(guardian common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.AddGuardian(&_EspressoTEEVerifier.TransactOpts, guardian) +} + +// AddGuardian is a paid mutator transaction binding the contract method 0xa526d83b. +// +// Solidity: function addGuardian(address guardian) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) AddGuardian(guardian common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.AddGuardian(&_EspressoTEEVerifier.TransactOpts, guardian) +} + +// DeleteEnclaveHashes is a paid mutator transaction binding the contract method 0xd522f60a. +// +// Solidity: function deleteEnclaveHashes(bytes32[] enclaveHashes, uint8 teeType, uint8 service) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) DeleteEnclaveHashes(opts *bind.TransactOpts, enclaveHashes [][32]byte, teeType uint8, service uint8) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "deleteEnclaveHashes", enclaveHashes, teeType, service) +} + +// DeleteEnclaveHashes is a paid mutator transaction binding the contract method 0xd522f60a. // -// Solidity: function registerSigner(bytes attestation, bytes data, uint8 teeType) returns() -func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) RegisterSigner(opts *bind.TransactOpts, attestation []byte, data []byte, teeType uint8) (*types.Transaction, error) { - return _EspressoTEEVerifier.contract.Transact(opts, "registerSigner", attestation, data, teeType) +// Solidity: function deleteEnclaveHashes(bytes32[] enclaveHashes, uint8 teeType, uint8 service) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) DeleteEnclaveHashes(enclaveHashes [][32]byte, teeType uint8, service uint8) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.DeleteEnclaveHashes(&_EspressoTEEVerifier.TransactOpts, enclaveHashes, teeType, service) } -// RegisterSigner is a paid mutator transaction binding the contract method 0x35ecb4c1. +// DeleteEnclaveHashes is a paid mutator transaction binding the contract method 0xd522f60a. // -// Solidity: function registerSigner(bytes attestation, bytes data, uint8 teeType) returns() -func (_EspressoTEEVerifier *EspressoTEEVerifierSession) RegisterSigner(attestation []byte, data []byte, teeType uint8) (*types.Transaction, error) { - return _EspressoTEEVerifier.Contract.RegisterSigner(&_EspressoTEEVerifier.TransactOpts, attestation, data, teeType) +// Solidity: function deleteEnclaveHashes(bytes32[] enclaveHashes, uint8 teeType, uint8 service) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) DeleteEnclaveHashes(enclaveHashes [][32]byte, teeType uint8, service uint8) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.DeleteEnclaveHashes(&_EspressoTEEVerifier.TransactOpts, enclaveHashes, teeType, service) } -// RegisterSigner is a paid mutator transaction binding the contract method 0x35ecb4c1. +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. // -// Solidity: function registerSigner(bytes attestation, bytes data, uint8 teeType) returns() -func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) RegisterSigner(attestation []byte, data []byte, teeType uint8) (*types.Transaction, error) { - return _EspressoTEEVerifier.Contract.RegisterSigner(&_EspressoTEEVerifier.TransactOpts, attestation, data, teeType) +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "grantRole", role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.GrantRole(&_EspressoTEEVerifier.TransactOpts, role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.GrantRole(&_EspressoTEEVerifier.TransactOpts, role, account) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _owner, address _espressoSGXTEEVerifier, address _espressoNitroTEEVerifier) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) Initialize(opts *bind.TransactOpts, _owner common.Address, _espressoSGXTEEVerifier common.Address, _espressoNitroTEEVerifier common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "initialize", _owner, _espressoSGXTEEVerifier, _espressoNitroTEEVerifier) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _owner, address _espressoSGXTEEVerifier, address _espressoNitroTEEVerifier) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) Initialize(_owner common.Address, _espressoSGXTEEVerifier common.Address, _espressoNitroTEEVerifier common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.Initialize(&_EspressoTEEVerifier.TransactOpts, _owner, _espressoSGXTEEVerifier, _espressoNitroTEEVerifier) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc0c53b8b. +// +// Solidity: function initialize(address _owner, address _espressoSGXTEEVerifier, address _espressoNitroTEEVerifier) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) Initialize(_owner common.Address, _espressoSGXTEEVerifier common.Address, _espressoNitroTEEVerifier common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.Initialize(&_EspressoTEEVerifier.TransactOpts, _owner, _espressoSGXTEEVerifier, _espressoNitroTEEVerifier) +} + +// RegisterService is a paid mutator transaction binding the contract method 0x7f82ea6c. +// +// Solidity: function registerService(bytes verificationData, bytes data, uint8 teeType, uint8 service) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) RegisterService(opts *bind.TransactOpts, verificationData []byte, data []byte, teeType uint8, service uint8) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "registerService", verificationData, data, teeType, service) +} + +// RegisterService is a paid mutator transaction binding the contract method 0x7f82ea6c. +// +// Solidity: function registerService(bytes verificationData, bytes data, uint8 teeType, uint8 service) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) RegisterService(verificationData []byte, data []byte, teeType uint8, service uint8) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.RegisterService(&_EspressoTEEVerifier.TransactOpts, verificationData, data, teeType, service) +} + +// RegisterService is a paid mutator transaction binding the contract method 0x7f82ea6c. +// +// Solidity: function registerService(bytes verificationData, bytes data, uint8 teeType, uint8 service) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) RegisterService(verificationData []byte, data []byte, teeType uint8, service uint8) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.RegisterService(&_EspressoTEEVerifier.TransactOpts, verificationData, data, teeType, service) +} + +// RemoveGuardian is a paid mutator transaction binding the contract method 0x71404156. +// +// Solidity: function removeGuardian(address guardian) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) RemoveGuardian(opts *bind.TransactOpts, guardian common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "removeGuardian", guardian) +} + +// RemoveGuardian is a paid mutator transaction binding the contract method 0x71404156. +// +// Solidity: function removeGuardian(address guardian) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) RemoveGuardian(guardian common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.RemoveGuardian(&_EspressoTEEVerifier.TransactOpts, guardian) +} + +// RemoveGuardian is a paid mutator transaction binding the contract method 0x71404156. +// +// Solidity: function removeGuardian(address guardian) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) RemoveGuardian(guardian common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.RemoveGuardian(&_EspressoTEEVerifier.TransactOpts, guardian) } // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. @@ -480,6 +897,69 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) RenounceOwners return _EspressoTEEVerifier.Contract.RenounceOwnership(&_EspressoTEEVerifier.TransactOpts) } +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address callerConfirmation) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, callerConfirmation common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "renounceRole", role, callerConfirmation) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address callerConfirmation) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) RenounceRole(role [32]byte, callerConfirmation common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.RenounceRole(&_EspressoTEEVerifier.TransactOpts, role, callerConfirmation) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address callerConfirmation) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) RenounceRole(role [32]byte, callerConfirmation common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.RenounceRole(&_EspressoTEEVerifier.TransactOpts, role, callerConfirmation) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "revokeRole", role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.RevokeRole(&_EspressoTEEVerifier.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.RevokeRole(&_EspressoTEEVerifier.TransactOpts, role, account) +} + +// SetEnclaveHash is a paid mutator transaction binding the contract method 0x9143e764. +// +// Solidity: function setEnclaveHash(bytes32 enclaveHash, bool valid, uint8 teeType, uint8 service) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) SetEnclaveHash(opts *bind.TransactOpts, enclaveHash [32]byte, valid bool, teeType uint8, service uint8) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "setEnclaveHash", enclaveHash, valid, teeType, service) +} + +// SetEnclaveHash is a paid mutator transaction binding the contract method 0x9143e764. +// +// Solidity: function setEnclaveHash(bytes32 enclaveHash, bool valid, uint8 teeType, uint8 service) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) SetEnclaveHash(enclaveHash [32]byte, valid bool, teeType uint8, service uint8) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.SetEnclaveHash(&_EspressoTEEVerifier.TransactOpts, enclaveHash, valid, teeType, service) +} + +// SetEnclaveHash is a paid mutator transaction binding the contract method 0x9143e764. +// +// Solidity: function setEnclaveHash(bytes32 enclaveHash, bool valid, uint8 teeType, uint8 service) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) SetEnclaveHash(enclaveHash [32]byte, valid bool, teeType uint8, service uint8) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.SetEnclaveHash(&_EspressoTEEVerifier.TransactOpts, enclaveHash, valid, teeType, service) +} + // SetEspressoNitroTEEVerifier is a paid mutator transaction binding the contract method 0x330282f5. // // Solidity: function setEspressoNitroTEEVerifier(address _espressoNitroTEEVerifier) returns() @@ -522,11 +1002,53 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) SetEspressoSGX return _EspressoTEEVerifier.Contract.SetEspressoSGXTEEVerifier(&_EspressoTEEVerifier.TransactOpts, _espressoSGXTEEVerifier) } -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// SetNitroEnclaveVerifier is a paid mutator transaction binding the contract method 0xa628a19e. // -// Solidity: function transferOwnership(address newOwner) returns() -func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _EspressoTEEVerifier.contract.Transact(opts, "transferOwnership", newOwner) +// Solidity: function setNitroEnclaveVerifier(address nitroVerifier) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) SetNitroEnclaveVerifier(opts *bind.TransactOpts, nitroVerifier common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "setNitroEnclaveVerifier", nitroVerifier) +} + +// SetNitroEnclaveVerifier is a paid mutator transaction binding the contract method 0xa628a19e. +// +// Solidity: function setNitroEnclaveVerifier(address nitroVerifier) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) SetNitroEnclaveVerifier(nitroVerifier common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.SetNitroEnclaveVerifier(&_EspressoTEEVerifier.TransactOpts, nitroVerifier) +} + +// SetNitroEnclaveVerifier is a paid mutator transaction binding the contract method 0xa628a19e. +// +// Solidity: function setNitroEnclaveVerifier(address nitroVerifier) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) SetNitroEnclaveVerifier(nitroVerifier common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.SetNitroEnclaveVerifier(&_EspressoTEEVerifier.TransactOpts, nitroVerifier) +} + +// SetQuoteVerifier is a paid mutator transaction binding the contract method 0xce3fe7ee. +// +// Solidity: function setQuoteVerifier(address quoteVerifier) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) SetQuoteVerifier(opts *bind.TransactOpts, quoteVerifier common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "setQuoteVerifier", quoteVerifier) +} + +// SetQuoteVerifier is a paid mutator transaction binding the contract method 0xce3fe7ee. +// +// Solidity: function setQuoteVerifier(address quoteVerifier) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierSession) SetQuoteVerifier(quoteVerifier common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.SetQuoteVerifier(&_EspressoTEEVerifier.TransactOpts, quoteVerifier) +} + +// SetQuoteVerifier is a paid mutator transaction binding the contract method 0xce3fe7ee. +// +// Solidity: function setQuoteVerifier(address quoteVerifier) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) SetQuoteVerifier(quoteVerifier common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.Contract.SetQuoteVerifier(&_EspressoTEEVerifier.TransactOpts, quoteVerifier) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EspressoTEEVerifier *EspressoTEEVerifierTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _EspressoTEEVerifier.contract.Transact(opts, "transferOwnership", newOwner) } // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. @@ -543,9 +1065,9 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierTransactorSession) TransferOwners return _EspressoTEEVerifier.Contract.TransferOwnership(&_EspressoTEEVerifier.TransactOpts, newOwner) } -// EspressoTEEVerifierOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the EspressoTEEVerifier contract. -type EspressoTEEVerifierOwnershipTransferStartedIterator struct { - Event *EspressoTEEVerifierOwnershipTransferStarted // Event containing the contract specifics and raw log +// EspressoTEEVerifierGuardianAddedIterator is returned from FilterGuardianAdded and is used to iterate over the raw logs and unpacked data for GuardianAdded events raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierGuardianAddedIterator struct { + Event *EspressoTEEVerifierGuardianAdded // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -559,7 +1081,7 @@ type EspressoTEEVerifierOwnershipTransferStartedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *EspressoTEEVerifierOwnershipTransferStartedIterator) Next() bool { +func (it *EspressoTEEVerifierGuardianAddedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -568,7 +1090,7 @@ func (it *EspressoTEEVerifierOwnershipTransferStartedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(EspressoTEEVerifierOwnershipTransferStarted) + it.Event = new(EspressoTEEVerifierGuardianAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -583,7 +1105,7 @@ func (it *EspressoTEEVerifierOwnershipTransferStartedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(EspressoTEEVerifierOwnershipTransferStarted) + it.Event = new(EspressoTEEVerifierGuardianAdded) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -599,60 +1121,51 @@ func (it *EspressoTEEVerifierOwnershipTransferStartedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *EspressoTEEVerifierOwnershipTransferStartedIterator) Error() error { +func (it *EspressoTEEVerifierGuardianAddedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *EspressoTEEVerifierOwnershipTransferStartedIterator) Close() error { +func (it *EspressoTEEVerifierGuardianAddedIterator) Close() error { it.sub.Unsubscribe() return nil } -// EspressoTEEVerifierOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the EspressoTEEVerifier contract. -type EspressoTEEVerifierOwnershipTransferStarted struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos +// EspressoTEEVerifierGuardianAdded represents a GuardianAdded event raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierGuardianAdded struct { + Guardian common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// FilterGuardianAdded is a free log retrieval operation binding the contract event 0x038596bb31e2e7d3d9f184d4c98b310103f6d7f5830e5eec32bffe6f1728f969. // -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EspressoTEEVerifierOwnershipTransferStartedIterator, error) { +// Solidity: event GuardianAdded(address indexed guardian) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) FilterGuardianAdded(opts *bind.FilterOpts, guardian []common.Address) (*EspressoTEEVerifierGuardianAddedIterator, error) { - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + var guardianRule []interface{} + for _, guardianItem := range guardian { + guardianRule = append(guardianRule, guardianItem) } - logs, sub, err := _EspressoTEEVerifier.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + logs, sub, err := _EspressoTEEVerifier.contract.FilterLogs(opts, "GuardianAdded", guardianRule) if err != nil { return nil, err } - return &EspressoTEEVerifierOwnershipTransferStartedIterator{contract: _EspressoTEEVerifier.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil + return &EspressoTEEVerifierGuardianAddedIterator{contract: _EspressoTEEVerifier.contract, event: "GuardianAdded", logs: logs, sub: sub}, nil } -// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// WatchGuardianAdded is a free log subscription operation binding the contract event 0x038596bb31e2e7d3d9f184d4c98b310103f6d7f5830e5eec32bffe6f1728f969. // -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *EspressoTEEVerifierOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { +// Solidity: event GuardianAdded(address indexed guardian) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchGuardianAdded(opts *bind.WatchOpts, sink chan<- *EspressoTEEVerifierGuardianAdded, guardian []common.Address) (event.Subscription, error) { - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + var guardianRule []interface{} + for _, guardianItem := range guardian { + guardianRule = append(guardianRule, guardianItem) } - logs, sub, err := _EspressoTEEVerifier.contract.WatchLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + logs, sub, err := _EspressoTEEVerifier.contract.WatchLogs(opts, "GuardianAdded", guardianRule) if err != nil { return nil, err } @@ -662,8 +1175,8 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchOwnershipTransferS select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(EspressoTEEVerifierOwnershipTransferStarted) - if err := _EspressoTEEVerifier.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + event := new(EspressoTEEVerifierGuardianAdded) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "GuardianAdded", log); err != nil { return err } event.Raw = log @@ -684,21 +1197,21 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchOwnershipTransferS }), nil } -// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// ParseGuardianAdded is a log parse operation binding the contract event 0x038596bb31e2e7d3d9f184d4c98b310103f6d7f5830e5eec32bffe6f1728f969. // -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) ParseOwnershipTransferStarted(log types.Log) (*EspressoTEEVerifierOwnershipTransferStarted, error) { - event := new(EspressoTEEVerifierOwnershipTransferStarted) - if err := _EspressoTEEVerifier.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { +// Solidity: event GuardianAdded(address indexed guardian) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) ParseGuardianAdded(log types.Log) (*EspressoTEEVerifierGuardianAdded, error) { + event := new(EspressoTEEVerifierGuardianAdded) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "GuardianAdded", log); err != nil { return nil, err } event.Raw = log return event, nil } -// EspressoTEEVerifierOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the EspressoTEEVerifier contract. -type EspressoTEEVerifierOwnershipTransferredIterator struct { - Event *EspressoTEEVerifierOwnershipTransferred // Event containing the contract specifics and raw log +// EspressoTEEVerifierGuardianRemovedIterator is returned from FilterGuardianRemoved and is used to iterate over the raw logs and unpacked data for GuardianRemoved events raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierGuardianRemovedIterator struct { + Event *EspressoTEEVerifierGuardianRemoved // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -712,7 +1225,7 @@ type EspressoTEEVerifierOwnershipTransferredIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *EspressoTEEVerifierOwnershipTransferredIterator) Next() bool { +func (it *EspressoTEEVerifierGuardianRemovedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -721,7 +1234,7 @@ func (it *EspressoTEEVerifierOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(EspressoTEEVerifierOwnershipTransferred) + it.Event = new(EspressoTEEVerifierGuardianRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -736,7 +1249,7 @@ func (it *EspressoTEEVerifierOwnershipTransferredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(EspressoTEEVerifierOwnershipTransferred) + it.Event = new(EspressoTEEVerifierGuardianRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -752,60 +1265,185 @@ func (it *EspressoTEEVerifierOwnershipTransferredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *EspressoTEEVerifierOwnershipTransferredIterator) Error() error { +func (it *EspressoTEEVerifierGuardianRemovedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *EspressoTEEVerifierOwnershipTransferredIterator) Close() error { +func (it *EspressoTEEVerifierGuardianRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -// EspressoTEEVerifierOwnershipTransferred represents a OwnershipTransferred event raised by the EspressoTEEVerifier contract. -type EspressoTEEVerifierOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos +// EspressoTEEVerifierGuardianRemoved represents a GuardianRemoved event raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierGuardianRemoved struct { + Guardian common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// FilterGuardianRemoved is a free log retrieval operation binding the contract event 0xb8107d0c6b40be480ce3172ee66ba6d64b71f6b1685a851340036e6e2e3e3c52. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EspressoTEEVerifierOwnershipTransferredIterator, error) { +// Solidity: event GuardianRemoved(address indexed guardian) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) FilterGuardianRemoved(opts *bind.FilterOpts, guardian []common.Address) (*EspressoTEEVerifierGuardianRemovedIterator, error) { - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + var guardianRule []interface{} + for _, guardianItem := range guardian { + guardianRule = append(guardianRule, guardianItem) } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + + logs, sub, err := _EspressoTEEVerifier.contract.FilterLogs(opts, "GuardianRemoved", guardianRule) + if err != nil { + return nil, err } + return &EspressoTEEVerifierGuardianRemovedIterator{contract: _EspressoTEEVerifier.contract, event: "GuardianRemoved", logs: logs, sub: sub}, nil +} - logs, sub, err := _EspressoTEEVerifier.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) +// WatchGuardianRemoved is a free log subscription operation binding the contract event 0xb8107d0c6b40be480ce3172ee66ba6d64b71f6b1685a851340036e6e2e3e3c52. +// +// Solidity: event GuardianRemoved(address indexed guardian) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchGuardianRemoved(opts *bind.WatchOpts, sink chan<- *EspressoTEEVerifierGuardianRemoved, guardian []common.Address) (event.Subscription, error) { + + var guardianRule []interface{} + for _, guardianItem := range guardian { + guardianRule = append(guardianRule, guardianItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.WatchLogs(opts, "GuardianRemoved", guardianRule) if err != nil { return nil, err } - return &EspressoTEEVerifierOwnershipTransferredIterator{contract: _EspressoTEEVerifier.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EspressoTEEVerifierGuardianRemoved) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "GuardianRemoved", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil } -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// ParseGuardianRemoved is a log parse operation binding the contract event 0xb8107d0c6b40be480ce3172ee66ba6d64b71f6b1685a851340036e6e2e3e3c52. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *EspressoTEEVerifierOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { +// Solidity: event GuardianRemoved(address indexed guardian) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) ParseGuardianRemoved(log types.Log) (*EspressoTEEVerifierGuardianRemoved, error) { + event := new(EspressoTEEVerifierGuardianRemoved) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "GuardianRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) +// EspressoTEEVerifierInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierInitializedIterator struct { + Event *EspressoTEEVerifierInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EspressoTEEVerifierInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true - logs, sub, err := _EspressoTEEVerifier.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EspressoTEEVerifierInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EspressoTEEVerifierInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EspressoTEEVerifierInitialized represents a Initialized event raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) FilterInitialized(opts *bind.FilterOpts) (*EspressoTEEVerifierInitializedIterator, error) { + + logs, sub, err := _EspressoTEEVerifier.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &EspressoTEEVerifierInitializedIterator{contract: _EspressoTEEVerifier.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *EspressoTEEVerifierInitialized) (event.Subscription, error) { + + logs, sub, err := _EspressoTEEVerifier.contract.WatchLogs(opts, "Initialized") if err != nil { return nil, err } @@ -815,8 +1453,8 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchOwnershipTransferr select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(EspressoTEEVerifierOwnershipTransferred) - if err := _EspressoTEEVerifier.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(EspressoTEEVerifierInitialized) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "Initialized", log); err != nil { return err } event.Raw = log @@ -837,12 +1475,804 @@ func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchOwnershipTransferr }), nil } -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) ParseOwnershipTransferred(log types.Log) (*EspressoTEEVerifierOwnershipTransferred, error) { - event := new(EspressoTEEVerifierOwnershipTransferred) - if err := _EspressoTEEVerifier.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +// Solidity: event Initialized(uint64 version) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) ParseInitialized(log types.Log) (*EspressoTEEVerifierInitialized, error) { + event := new(EspressoTEEVerifierInitialized) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EspressoTEEVerifierOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierOwnershipTransferStartedIterator struct { + Event *EspressoTEEVerifierOwnershipTransferStarted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EspressoTEEVerifierOwnershipTransferStartedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierOwnershipTransferStarted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierOwnershipTransferStarted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EspressoTEEVerifierOwnershipTransferStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EspressoTEEVerifierOwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EspressoTEEVerifierOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierOwnershipTransferStarted struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EspressoTEEVerifierOwnershipTransferStartedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &EspressoTEEVerifierOwnershipTransferStartedIterator{contract: _EspressoTEEVerifier.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *EspressoTEEVerifierOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.WatchLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EspressoTEEVerifierOwnershipTransferStarted) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) ParseOwnershipTransferStarted(log types.Log) (*EspressoTEEVerifierOwnershipTransferStarted, error) { + event := new(EspressoTEEVerifierOwnershipTransferStarted) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EspressoTEEVerifierOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierOwnershipTransferredIterator struct { + Event *EspressoTEEVerifierOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EspressoTEEVerifierOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EspressoTEEVerifierOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EspressoTEEVerifierOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EspressoTEEVerifierOwnershipTransferred represents a OwnershipTransferred event raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EspressoTEEVerifierOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &EspressoTEEVerifierOwnershipTransferredIterator{contract: _EspressoTEEVerifier.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *EspressoTEEVerifierOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EspressoTEEVerifierOwnershipTransferred) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) ParseOwnershipTransferred(log types.Log) (*EspressoTEEVerifierOwnershipTransferred, error) { + event := new(EspressoTEEVerifierOwnershipTransferred) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EspressoTEEVerifierRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierRoleAdminChangedIterator struct { + Event *EspressoTEEVerifierRoleAdminChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EspressoTEEVerifierRoleAdminChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierRoleAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierRoleAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EspressoTEEVerifierRoleAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EspressoTEEVerifierRoleAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EspressoTEEVerifierRoleAdminChanged represents a RoleAdminChanged event raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*EspressoTEEVerifierRoleAdminChangedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return &EspressoTEEVerifierRoleAdminChangedIterator{contract: _EspressoTEEVerifier.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil +} + +// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *EspressoTEEVerifierRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EspressoTEEVerifierRoleAdminChanged) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) ParseRoleAdminChanged(log types.Log) (*EspressoTEEVerifierRoleAdminChanged, error) { + event := new(EspressoTEEVerifierRoleAdminChanged) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EspressoTEEVerifierRoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierRoleGrantedIterator struct { + Event *EspressoTEEVerifierRoleGranted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EspressoTEEVerifierRoleGrantedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierRoleGranted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierRoleGranted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EspressoTEEVerifierRoleGrantedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EspressoTEEVerifierRoleGrantedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EspressoTEEVerifierRoleGranted represents a RoleGranted event raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*EspressoTEEVerifierRoleGrantedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &EspressoTEEVerifierRoleGrantedIterator{contract: _EspressoTEEVerifier.contract, event: "RoleGranted", logs: logs, sub: sub}, nil +} + +// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *EspressoTEEVerifierRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EspressoTEEVerifierRoleGranted) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "RoleGranted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) ParseRoleGranted(log types.Log) (*EspressoTEEVerifierRoleGranted, error) { + event := new(EspressoTEEVerifierRoleGranted) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "RoleGranted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EspressoTEEVerifierRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierRoleRevokedIterator struct { + Event *EspressoTEEVerifierRoleRevoked // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EspressoTEEVerifierRoleRevokedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierRoleRevoked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EspressoTEEVerifierRoleRevoked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EspressoTEEVerifierRoleRevokedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EspressoTEEVerifierRoleRevokedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EspressoTEEVerifierRoleRevoked represents a RoleRevoked event raised by the EspressoTEEVerifier contract. +type EspressoTEEVerifierRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*EspressoTEEVerifierRoleRevokedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &EspressoTEEVerifierRoleRevokedIterator{contract: _EspressoTEEVerifier.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil +} + +// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *EspressoTEEVerifierRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _EspressoTEEVerifier.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(EspressoTEEVerifierRoleRevoked) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_EspressoTEEVerifier *EspressoTEEVerifierFilterer) ParseRoleRevoked(log types.Log) (*EspressoTEEVerifierRoleRevoked, error) { + event := new(EspressoTEEVerifierRoleRevoked) + if err := _EspressoTEEVerifier.contract.UnpackLog(event, "RoleRevoked", log); err != nil { return nil, err } event.Raw = log diff --git a/op-batcher/bindings/opsuccinct_fault_dispute_game.go b/op-batcher/bindings/opsuccinct_fault_dispute_game.go index 110b40f362f..8bdabe1a80d 100644 --- a/op-batcher/bindings/opsuccinct_fault_dispute_game.go +++ b/op-batcher/bindings/opsuccinct_fault_dispute_game.go @@ -32,7 +32,7 @@ var ( // OPSuccinctFaultDisputeGameMetaData contains all meta data concerning the OPSuccinctFaultDisputeGame contract. var OPSuccinctFaultDisputeGameMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_maxChallengeDuration\",\"type\":\"uint64\",\"internalType\":\"Duration\"},{\"name\":\"_maxProveDuration\",\"type\":\"uint64\",\"internalType\":\"Duration\"},{\"name\":\"_disputeGameFactory\",\"type\":\"address\",\"internalType\":\"contractIDisputeGameFactory\"},{\"name\":\"_sp1Verifier\",\"type\":\"address\",\"internalType\":\"contractISP1Verifier\"},{\"name\":\"_rollupConfigHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_aggregationVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_rangeVkeyCommitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_challengerBond\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_anchorStateRegistry\",\"type\":\"address\",\"internalType\":\"contractIAnchorStateRegistry\"},{\"name\":\"_accessManager\",\"type\":\"address\",\"internalType\":\"contractAccessManager\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"accessManager\",\"inputs\":[],\"outputs\":[{\"name\":\"accessManager_\",\"type\":\"address\",\"internalType\":\"contractAccessManager\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"anchorStateRegistry\",\"inputs\":[],\"outputs\":[{\"name\":\"registry_\",\"type\":\"address\",\"internalType\":\"contractIAnchorStateRegistry\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"bondDistributionMode\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumBondDistributionMode\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"challenge\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumOPSuccinctFaultDisputeGame.ProposalStatus\"}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"challengerBond\",\"inputs\":[],\"outputs\":[{\"name\":\"challengerBond_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"claimCredit\",\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"claimData\",\"inputs\":[],\"outputs\":[{\"name\":\"parentIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"counteredBy\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"prover\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"claim\",\"type\":\"bytes32\",\"internalType\":\"Claim\"},{\"name\":\"status\",\"type\":\"uint8\",\"internalType\":\"enumOPSuccinctFaultDisputeGame.ProposalStatus\"},{\"name\":\"deadline\",\"type\":\"uint64\",\"internalType\":\"Timestamp\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"closeGame\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createdAt\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"Timestamp\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"credit\",\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"credit_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"disputeGameFactory\",\"inputs\":[],\"outputs\":[{\"name\":\"disputeGameFactory_\",\"type\":\"address\",\"internalType\":\"contractIDisputeGameFactory\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"extraData\",\"inputs\":[],\"outputs\":[{\"name\":\"extraData_\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"gameCreator\",\"inputs\":[],\"outputs\":[{\"name\":\"creator_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"gameData\",\"inputs\":[],\"outputs\":[{\"name\":\"gameType_\",\"type\":\"uint32\",\"internalType\":\"GameType\"},{\"name\":\"rootClaim_\",\"type\":\"bytes32\",\"internalType\":\"Claim\"},{\"name\":\"extraData_\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"gameOver\",\"inputs\":[],\"outputs\":[{\"name\":\"gameOver_\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"gameType\",\"inputs\":[],\"outputs\":[{\"name\":\"gameType_\",\"type\":\"uint32\",\"internalType\":\"GameType\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"l1Head\",\"inputs\":[],\"outputs\":[{\"name\":\"l1Head_\",\"type\":\"bytes32\",\"internalType\":\"Hash\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"l2BlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"l2BlockNumber_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"l2SequenceNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"l2SequenceNumber_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"maxChallengeDuration\",\"inputs\":[],\"outputs\":[{\"name\":\"maxChallengeDuration_\",\"type\":\"uint64\",\"internalType\":\"Duration\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxProveDuration\",\"inputs\":[],\"outputs\":[{\"name\":\"maxProveDuration_\",\"type\":\"uint64\",\"internalType\":\"Duration\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"normalModeCredit\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"parentIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"parentIndex_\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"prove\",\"inputs\":[{\"name\":\"proofBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumOPSuccinctFaultDisputeGame.ProposalStatus\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"refundModeCredit\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"resolve\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumGameStatus\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resolvedAt\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"Timestamp\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"rootClaim\",\"inputs\":[],\"outputs\":[{\"name\":\"rootClaim_\",\"type\":\"bytes32\",\"internalType\":\"Claim\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"startingBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"startingBlockNumber_\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingOutputRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"Hash\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingRootHash\",\"inputs\":[],\"outputs\":[{\"name\":\"startingRootHash_\",\"type\":\"bytes32\",\"internalType\":\"Hash\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"status\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumGameStatus\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"wasRespectedGameTypeWhenCreated\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Challenged\",\"inputs\":[{\"name\":\"challenger\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"GameClosed\",\"inputs\":[{\"name\":\"bondDistributionMode\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"enumBondDistributionMode\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Proved\",\"inputs\":[{\"name\":\"prover\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Resolved\",\"inputs\":[{\"name\":\"status\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enumGameStatus\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyInitialized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BadAuth\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BondTransferFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ClaimAlreadyChallenged\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ClaimAlreadyResolved\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GameNotFinalized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GameNotOver\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"GameOver\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IncorrectBondAmount\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IncorrectDisputeGameFactory\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidBondDistributionMode\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidParentGame\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProposalStatus\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoCreditToClaim\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ParentGameNotResolved\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UnexpectedRootClaim\",\"inputs\":[{\"name\":\"rootClaim\",\"type\":\"bytes32\",\"internalType\":\"Claim\"}]}]", - Bin: "0x6101e0604052348015610010575f5ffd5b50604051613f1d380380613f1d83398181016040528101906100329190610348565b602a63ffffffff1660c08163ffffffff16815250508967ffffffffffffffff1660808167ffffffffffffffff16815250508867ffffffffffffffff1660a08167ffffffffffffffff16815250508773ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff16815250508673ffffffffffffffffffffffffffffffffffffffff166101008173ffffffffffffffffffffffffffffffffffffffff16815250508561012081815250508461014081815250508361016081815250508261018081815250508173ffffffffffffffffffffffffffffffffffffffff166101a08173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff166101c08173ffffffffffffffffffffffffffffffffffffffff168152505050505050505050505050610421565b5f5ffd5b5f67ffffffffffffffff82169050919050565b6101a581610189565b81146101af575f5ffd5b50565b5f815190506101c08161019c565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101ef826101c6565b9050919050565b5f610200826101e5565b9050919050565b610210816101f6565b811461021a575f5ffd5b50565b5f8151905061022b81610207565b92915050565b5f61023b826101e5565b9050919050565b61024b81610231565b8114610255575f5ffd5b50565b5f8151905061026681610242565b92915050565b5f819050919050565b61027e8161026c565b8114610288575f5ffd5b50565b5f8151905061029981610275565b92915050565b5f819050919050565b6102b18161029f565b81146102bb575f5ffd5b50565b5f815190506102cc816102a8565b92915050565b5f6102dc826101e5565b9050919050565b6102ec816102d2565b81146102f6575f5ffd5b50565b5f81519050610307816102e3565b92915050565b5f610317826101e5565b9050919050565b6103278161030d565b8114610331575f5ffd5b50565b5f815190506103428161031e565b92915050565b5f5f5f5f5f5f5f5f5f5f6101408b8d03121561036757610366610185565b5b5f6103748d828e016101b2565b9a505060206103858d828e016101b2565b99505060406103968d828e0161021d565b98505060606103a78d828e01610258565b97505060806103b88d828e0161028b565b96505060a06103c98d828e0161028b565b95505060c06103da8d828e0161028b565b94505060e06103eb8d828e016102be565b9350506101006103fd8d828e016102f9565b92505061012061040f8d828e01610334565b9150509295989b9194979a5092959850565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516139f76105265f395f8181611b01015281816126f90152612b2701525f818161138e0152818161178b0152818161185c015281816118df01528181611ca901528181611d4801528181611de701528181612093015261246801525f8181610d5901528181610dde01528181611674015261280601525f610ff001525f61106e01525f610fca01525f61103201525f8181611a9301528181611c0601528181612ad90152612b6901525f81816120cf01528181612441015261253701525f818161255e01526128d101525f8181612237015261266401526139f75ff3fe608060405260043610610203575f3560e01c806370872aa511610117578063bdb337d11161009f578063d2ef73981161006e578063d2ef7398146106f9578063d5d44d8014610717578063f2b4e61714610753578063fa24f7431461077d578063fdcb6068146107a957610203565b8063bdb337d11461063f578063c0d8bb7414610669578063cf09e0d0146106a5578063d2177bdd146106cf57610203565b80638b85902b116100e65780638b85902b1461056d57806399735e3214610597578063bbdc02db146105c1578063bcbe5094146105eb578063bcef3b551461061557610203565b806370872aa5146104f9578063786b844b146105235780637948690a146105395780638129fc1c1461056357610203565b80633ec4d4d61161019a5780635c0cba33116101695780635c0cba3314610429578063609d33341461045357806360e274641461047d5780636361506d146104a557806368ccdc86146104cf57610203565b80633ec4d4d614610369578063529d6a8c1461039857806354fd4d50146103d457806357da950e146103fe57610203565b80632810e1d6116101d65780632810e1d6146102af578063375bfa5d146102d9578063378dd48c1461031557806337b1b2291461033f57610203565b806319effeb414610207578063200d2ed214610231578063250e69bd1461025b57806325fc2ace14610285575b5f5ffd5b348015610212575f5ffd5b5061021b6107d3565b6040516102289190612d9a565b60405180910390f35b34801561023c575f5ffd5b506102456107ec565b6040516102529190612e26565b60405180910390f35b348015610266575f5ffd5b5061026f6107fe565b60405161027c9190612e59565b60405180910390f35b348015610290575f5ffd5b50610299610810565b6040516102a69190612e9b565b60405180910390f35b3480156102ba575f5ffd5b506102c361081b565b6040516102d09190612e26565b60405180910390f35b3480156102e4575f5ffd5b506102ff60048036038101906102fa9190612f1d565b610f43565b60405161030c9190612fae565b60405180910390f35b348015610320575f5ffd5b50610329611274565b604051610336919061300d565b60405180910390f35b34801561034a575f5ffd5b50610353611287565b6040516103609190613065565b60405180910390f35b348015610374575f5ffd5b5061037d611296565b60405161038f969594939291906130ab565b60405180910390f35b3480156103a3575f5ffd5b506103be60048036038101906103b99190613134565b61132c565b6040516103cb9190613177565b60405180910390f35b3480156103df575f5ffd5b506103e8611341565b6040516103f59190613200565b60405180910390f35b348015610409575f5ffd5b5061041261137a565b604051610420929190613220565b60405180910390f35b348015610434575f5ffd5b5061043d61138b565b60405161044a9190613299565b60405180910390f35b34801561045e575f5ffd5b506104676113b2565b6040516104749190613304565b60405180910390f35b348015610488575f5ffd5b506104a3600480360381019061049e9190613134565b6113c5565b005b3480156104b0575f5ffd5b506104b9611661565b6040516104c69190612e9b565b60405180910390f35b3480156104da575f5ffd5b506104e3611671565b6040516104f09190613177565b60405180910390f35b348015610504575f5ffd5b5061050d611698565b60405161051a9190613177565b60405180910390f35b34801561052e575f5ffd5b506105376116a4565b005b348015610544575f5ffd5b5061054d611a24565b60405161055a9190613324565b60405180910390f35b61056b611a34565b005b348015610578575f5ffd5b50610581612514565b60405161058e9190613177565b60405180910390f35b3480156105a2575f5ffd5b506105ab612524565b6040516105b89190613177565b60405180910390f35b3480156105cc575f5ffd5b506105d5612534565b6040516105e2919061336d565b60405180910390f35b3480156105f6575f5ffd5b506105ff61255b565b60405161060c9190613395565b60405180910390f35b348015610620575f5ffd5b50610629612582565b60405161063691906133ae565b60405180910390f35b34801561064a575f5ffd5b50610653612592565b6040516106609190612e59565b60405180910390f35b348015610674575f5ffd5b5061068f600480360381019061068a9190613134565b612634565b60405161069c9190613177565b60405180910390f35b3480156106b0575f5ffd5b506106b9612649565b6040516106c69190612d9a565b60405180910390f35b3480156106da575f5ffd5b506106e3612661565b6040516106f09190613395565b60405180910390f35b610701612688565b60405161070e9190612fae565b60405180910390f35b348015610722575f5ffd5b5061073d60048036038101906107389190613134565b612a10565b60405161074a9190613177565b60405180910390f35b34801561075e575f5ffd5b50610767612ad6565b60405161077491906133e7565b60405180910390f35b348015610788575f5ffd5b50610791612afd565b6040516107a093929190613400565b60405180910390f35b3480156107b4575f5ffd5b506107bd612b24565b6040516107ca919061345c565b60405180910390f35b5f60089054906101000a900467ffffffffffffffff1681565b5f60109054906101000a900460ff1681565b60095f9054906101000a900460ff1681565b5f60075f0154905090565b5f5f600281111561082f5761082e612db3565b5b5f60109054906101000a900460ff1660028111156108505761084f612db3565b5b14610887576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610890612b4b565b90505f60028111156108a5576108a4612db3565b5b8160028111156108b8576108b7612db3565b5b036108ef576040517f92c506ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600281111561090357610902612db3565b5b81600281111561091657610915612db3565b5b036109b05760015f60106101000a81548160ff021916908360028111156109405761093f612db3565b5b02179055504760055f60015f0160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550610e8c565b6109b8612592565b6109ee576040517f04643c3900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6004811115610a0157610a00612db3565b5b60016003015f9054906101000a900460ff166004811115610a2557610a24612db3565b5b03610aa25760025f60106101000a81548160ff02191690836002811115610a4f57610a4e612db3565b5b02179055504760055f610a60611287565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550610e8b565b60016004811115610ab657610ab5612db3565b5b60016003015f9054906101000a900460ff166004811115610ada57610ad9612db3565b5b03610b745760015f60106101000a81548160ff02191690836002811115610b0457610b03612db3565b5b02179055504760055f60015f0160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550610e8a565b60026004811115610b8857610b87612db3565b5b60016003015f9054906101000a900460ff166004811115610bac57610bab612db3565b5b03610c295760025f60106101000a81548160ff02191690836002811115610bd657610bd5612db3565b5b02179055504760055f610be7611287565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550610e89565b60036004811115610c3d57610c3c612db3565b5b60016003015f9054906101000a900460ff166004811115610c6157610c60612db3565b5b03610e565760025f60106101000a81548160ff02191690836002811115610c8b57610c8a612db3565b5b0217905550610c98611287565b73ffffffffffffffffffffffffffffffffffffffff16600180015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610d57574760055f600180015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550610e51565b7f000000000000000000000000000000000000000000000000000000000000000060055f600180015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055507f000000000000000000000000000000000000000000000000000000000000000047610e0891906134a2565b60055f610e13611287565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b610e88565b6040517f7492a26900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b5b5b600460016003015f6101000a81548160ff02191690836004811115610eb457610eb3612db3565b5b0217905550425f60086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505f60109054906101000a900460ff166002811115610f0257610f01612db3565b5b7f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6060405160405180910390a25f60109054906101000a900460ff1691505090565b5f610f4c612592565b15610f83576040517fdf469ccb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040518060e00160405280610f97611661565b815260200160075f01548152602001610fb6610fb1612582565b612c87565b8152602001610fc3612514565b81526020017f000000000000000000000000000000000000000000000000000000000000000081526020017f000000000000000000000000000000000000000000000000000000000000000081526020013373ffffffffffffffffffffffffffffffffffffffff1681525090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166341493c607f00000000000000000000000000000000000000000000000000000000000000008360405160200161109e919061358e565b60405160208183030381529060405287876040518563ffffffff1660e01b81526004016110ce94939291906135f0565b5f6040518083038186803b1580156110e4575f5ffd5b505afa1580156110f6573d5f5f3e3d5ffd5b5050505033600180015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f73ffffffffffffffffffffffffffffffffffffffff1660015f0160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036111c557600260016003015f6101000a81548160ff021916908360048111156111bb576111ba612db3565b5b02179055506111f3565b600360016003015f6101000a81548160ff021916908360048111156111ed576111ec612db3565b5b02179055505b600180015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f5e6565d9ca2f5c8501d6418bf563322a7243ba7ace266d75eac99f4adbb30ba760405160405180910390a260016003015f9054906101000a900460ff1691505092915050565b600960019054906101000a900460ff1681565b5f6112915f612c90565b905090565b6001805f015f9054906101000a900463ffffffff1690805f0160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806002015490806003015f9054906101000a900460ff16908060030160019054906101000a900467ffffffffffffffff16905086565b6005602052805f5260405f205f915090505481565b6040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6007805f0154908060010154905082565b5f7f0000000000000000000000000000000000000000000000000000000000000000905090565b60606113c060546024612cab565b905090565b6113cd6116a4565b5f6002808111156113e1576113e0612db3565b5b600960019054906101000a900460ff16600281111561140357611402612db3565b5b0361144d5760065f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050611500565b6001600281111561146157611460612db3565b5b600960019054906101000a900460ff16600281111561148357611482612db3565b5b036114cd5760055f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490506114ff565b6040517f078a3df400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5f8103611539576040517f17bfe5f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60065f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505f8273ffffffffffffffffffffffffffffffffffffffff16826040516115e290613662565b5f6040518083038185875af1925050503d805f811461161c576040519150601f19603f3d011682016040523d82523d5f602084013e611621565b606091505b505090508061165c576040517f83e6cc6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b5f61166c6034612ce1565b905090565b5f7f0000000000000000000000000000000000000000000000000000000000000000905090565b5f600760010154905090565b6002808111156116b7576116b6612db3565b5b600960019054906101000a900460ff1660028111156116d9576116d8612db3565b5b14806117185750600160028111156116f4576116f3612db3565b5b600960019054906101000a900460ff16600281111561171657611715612db3565b5b145b611a22575f600281111561172f5761172e612db3565b5b600960019054906101000a900460ff16600281111561175157611750612db3565b5b14611788576040517f078a3df400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16630314d2b3306040518263ffffffff1660e01b81526004016117e29190613696565b602060405180830381865afa1580156117fd573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061182191906136d9565b90508061185a576040517f4851bd9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166317cf21a9306040518263ffffffff1660e01b81526004016118b39190613696565b5f604051808303815f87803b1580156118ca575f5ffd5b505af19250505080156118db575060015b505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663496b9c16306040518263ffffffff1660e01b81526004016119369190613696565b602060405180830381865afa158015611951573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061197591906136d9565b905080156119ad576001600960016101000a81548160ff021916908360028111156119a3576119a2612db3565b5b02179055506119d9565b6002600960016101000a81548160ff021916908360028111156119d3576119d2612db3565b5b02179055505b7f9908eaac0645df9d0704d06adc9e07337c951de2f06b5f2836151d48d5e4722f600960019054906101000a900460ff16604051611a17919061300d565b60405180910390a150505b565b5f611a2f6074612cf9565b905090565b5f60119054906101000a900460ff1615611a7a576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614611aff576040517f940d38c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631d3225e3611b43611287565b6040518263ffffffff1660e01b8152600401611b5f9190613065565b602060405180830381865afa158015611b7a573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b9e91906136d9565b611bd4576040517fd386ef3e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607e3614611be957639824bdab5f526004601cfd5b63ffffffff8016611bf8611a24565b63ffffffff1614612091575f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663bb8aa1fc611c48611a24565b6040518263ffffffff1660e01b8152600401611c649190613734565b606060405180830381865afa158015611c7f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ca391906137dc565b925050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166304e50fed826040518263ffffffff1660e01b8152600401611d009190613696565b602060405180830381865afa158015611d1b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d3f91906136d9565b1580611ddf57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166334a346ea826040518263ffffffff1660e01b8152600401611d9f9190613696565b602060405180830381865afa158015611dba573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dde91906136d9565b5b80611e7e57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635958a193826040518263ffffffff1660e01b8152600401611e3e9190613696565b602060405180830381865afa158015611e59573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e7d91906136d9565b5b15611eb5576040517f346119f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060400160405280611f358373ffffffffffffffffffffffffffffffffffffffff1663bcef3b556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f0c573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f309190613856565b612c87565b81526020018273ffffffffffffffffffffffffffffffffffffffff16638b85902b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f83573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fa791906138ab565b81525060075f820151815f01556020820151816001015590505060016002811115611fd557611fd4612db3565b5b8173ffffffffffffffffffffffffffffffffffffffff1663200d2ed26040518163ffffffff1660e01b8152600401602060405180830381865afa15801561201e573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061204291906138f9565b600281111561205457612053612db3565b5b0361208b576040517f346119f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50612160565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637258a8077f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040161210a919061336d565b6040805180830381865afa158015612124573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612148919061394e565b60075f015f60076001015f8491905055839190505550505b60076001015461216e612514565b116121b75761217b612582565b6040517ff40239db0000000000000000000000000000000000000000000000000000000081526004016121ae91906133ae565b60405180910390fd5b6040518060c001604052806121ca611a24565b63ffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001612215612582565b81526020015f600481111561222d5761222c612db3565b5b81526020016122657f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff16612d14565b67ffffffffffffffff164261227a919061398c565b67ffffffffffffffff1681525060015f820151815f015f6101000a81548163ffffffff021916908363ffffffff1602179055506020820151815f0160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600201556080820151816003015f6101000a81548160ff0219169083600481111561236d5761236c612db3565b5b021790555060a08201518160030160016101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555090505060015f60116101000a81548160ff0219169083151502179055503460065f6123ca611287565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254612411919061398c565b92505081905550425f5f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507f000000000000000000000000000000000000000000000000000000000000000063ffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633c9f397c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124cf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124f391906139bf565b63ffffffff161460095f6101000a81548160ff021916908315150217905550565b5f61251f6054612d1d565b905090565b5f61252f6054612d1d565b905090565b5f7f0000000000000000000000000000000000000000000000000000000000000000905090565b5f7f0000000000000000000000000000000000000000000000000000000000000000905090565b5f61258d6014612ce1565b905090565b5f4267ffffffffffffffff166125ca600160030160019054906101000a900467ffffffffffffffff1667ffffffffffffffff16612d35565b67ffffffffffffffff16108061262f57505f73ffffffffffffffffffffffffffffffffffffffff16600180015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b905090565b6006602052805f5260405f205f915090505481565b5f5f9054906101000a900467ffffffffffffffff1681565b5f7f0000000000000000000000000000000000000000000000000000000000000000905090565b5f5f600481111561269c5761269b612db3565b5b60016003015f9054906101000a900460ff1660048111156126c0576126bf612db3565b5b146126f7576040517f85c345b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ff59ae7d336040518263ffffffff1660e01b81526004016127509190613065565b602060405180830381865afa15801561276b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061278f91906136d9565b6127c5576040517fd386ef3e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127cd612592565b15612804576040517fdf469ccb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000341461285d576040517f8620aa1900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360015f0160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001806003015f6101000a81548160ff021916908360048111156128c7576128c6612db3565b5b02179055506128ff7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff16612d14565b67ffffffffffffffff1642612914919061398c565b600160030160016101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055503460065f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461298b919061398c565b9250508190555060015f0160049054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f98027b38153f995c4b802a5c7e6365bee3addb25af6b29818c0c304684d8052c60405160405180910390a260016003015f9054906101000a900460ff16905090565b5f600280811115612a2457612a23612db3565b5b600960019054906101000a900460ff166002811115612a4657612a45612db3565b5b03612a905760065f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050612ad1565b60055f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490505b919050565b5f7f0000000000000000000000000000000000000000000000000000000000000000905090565b5f5f6060612b09612534565b9250612b13612582565b9150612b1d6113b2565b9050909192565b5f7f0000000000000000000000000000000000000000000000000000000000000000905090565b5f63ffffffff8016612b5b611a24565b63ffffffff1614612c7f575f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663bb8aa1fc612bab611a24565b6040518263ffffffff1660e01b8152600401612bc79190613734565b606060405180830381865afa158015612be2573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c0691906137dc565b925050508073ffffffffffffffffffffffffffffffffffffffff1663200d2ed26040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c53573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c7791906138f9565b915050612c84565b600290505b90565b5f819050919050565b5f5f612c9a612d3e565b90508281013560601c915050919050565b60605f612cb6612d3e565b905060405191508282528284820160208401378260208301015f815260208101604052505092915050565b5f5f612ceb612d3e565b905082810135915050919050565b5f5f612d03612d3e565b90508281013560e01c915050919050565b5f819050919050565b5f5f612d27612d3e565b905082810135915050919050565b5f819050919050565b5f600236033560f01c3603905090565b5f67ffffffffffffffff82169050919050565b5f819050919050565b5f612d84612d7f612d7a84612d4e565b612d61565b612d4e565b9050919050565b612d9481612d6a565b82525050565b5f602082019050612dad5f830184612d8b565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60038110612df157612df0612db3565b5b50565b5f819050612e0182612de0565b919050565b5f612e1082612df4565b9050919050565b612e2081612e06565b82525050565b5f602082019050612e395f830184612e17565b92915050565b5f8115159050919050565b612e5381612e3f565b82525050565b5f602082019050612e6c5f830184612e4a565b92915050565b5f819050919050565b5f612e8582612e72565b9050919050565b612e9581612e7b565b82525050565b5f602082019050612eae5f830184612e8c565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f840112612edd57612edc612ebc565b5b8235905067ffffffffffffffff811115612efa57612ef9612ec0565b5b602083019150836001820283011115612f1657612f15612ec4565b5b9250929050565b5f5f60208385031215612f3357612f32612eb4565b5b5f83013567ffffffffffffffff811115612f5057612f4f612eb8565b5b612f5c85828601612ec8565b92509250509250929050565b60058110612f7957612f78612db3565b5b50565b5f819050612f8982612f68565b919050565b5f612f9882612f7c565b9050919050565b612fa881612f8e565b82525050565b5f602082019050612fc15f830184612f9f565b92915050565b60038110612fd857612fd7612db3565b5b50565b5f819050612fe882612fc7565b919050565b5f612ff782612fdb565b9050919050565b61300781612fed565b82525050565b5f6020820190506130205f830184612ffe565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61304f82613026565b9050919050565b61305f81613045565b82525050565b5f6020820190506130785f830184613056565b92915050565b5f63ffffffff82169050919050565b6130968161307e565b82525050565b6130a581612e7b565b82525050565b5f60c0820190506130be5f83018961308d565b6130cb6020830188613056565b6130d86040830187613056565b6130e5606083018661309c565b6130f26080830185612f9f565b6130ff60a0830184612d8b565b979650505050505050565b61311381613045565b811461311d575f5ffd5b50565b5f8135905061312e8161310a565b92915050565b5f6020828403121561314957613148612eb4565b5b5f61315684828501613120565b91505092915050565b5f819050919050565b6131718161315f565b82525050565b5f60208201905061318a5f830184613168565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6131d282613190565b6131dc818561319a565b93506131ec8185602086016131aa565b6131f5816131b8565b840191505092915050565b5f6020820190508181035f83015261321881846131c8565b905092915050565b5f6040820190506132335f830185612e8c565b6132406020830184613168565b9392505050565b5f61326161325c61325784613026565b612d61565b613026565b9050919050565b5f61327282613247565b9050919050565b5f61328382613268565b9050919050565b61329381613279565b82525050565b5f6020820190506132ac5f83018461328a565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f6132d6826132b2565b6132e081856132bc565b93506132f08185602086016131aa565b6132f9816131b8565b840191505092915050565b5f6020820190508181035f83015261331c81846132cc565b905092915050565b5f6020820190506133375f83018461308d565b92915050565b5f61335761335261334d8461307e565b612d61565b61307e565b9050919050565b6133678161333d565b82525050565b5f6020820190506133805f83018461335e565b92915050565b61338f81612d6a565b82525050565b5f6020820190506133a85f830184613386565b92915050565b5f6020820190506133c15f83018461309c565b92915050565b5f6133d182613268565b9050919050565b6133e1816133c7565b82525050565b5f6020820190506133fa5f8301846133d8565b92915050565b5f6060820190506134135f83018661335e565b613420602083018561309c565b818103604083015261343281846132cc565b9050949350505050565b5f61344682613268565b9050919050565b6134568161343c565b82525050565b5f60208201905061346f5f83018461344d565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6134ac8261315f565b91506134b78361315f565b92508282039050818111156134cf576134ce613475565b5b92915050565b6134de81612e72565b82525050565b6134ed8161315f565b82525050565b6134fc81613045565b82525050565b60e082015f8201516135165f8501826134d5565b50602082015161352960208501826134d5565b50604082015161353c60408501826134d5565b50606082015161354f60608501826134e4565b50608082015161356260808501826134d5565b5060a082015161357560a08501826134d5565b5060c082015161358860c08501826134f3565b50505050565b5f60e0820190506135a15f830184613502565b92915050565b6135b081612e72565b82525050565b828183375f83830152505050565b5f6135cf83856132bc565b93506135dc8385846135b6565b6135e5836131b8565b840190509392505050565b5f6060820190506136035f8301876135a7565b818103602083015261361581866132cc565b9050818103604083015261362a8184866135c4565b905095945050505050565b5f81905092915050565b50565b5f61364d5f83613635565b91506136588261363f565b5f82019050919050565b5f61366c82613642565b9150819050919050565b5f61368082613268565b9050919050565b61369081613676565b82525050565b5f6020820190506136a95f830184613687565b92915050565b6136b881612e3f565b81146136c2575f5ffd5b50565b5f815190506136d3816136af565b92915050565b5f602082840312156136ee576136ed612eb4565b5b5f6136fb848285016136c5565b91505092915050565b5f61371e6137196137148461307e565b612d61565b61315f565b9050919050565b61372e81613704565b82525050565b5f6020820190506137475f830184613725565b92915050565b6137568161307e565b8114613760575f5ffd5b50565b5f815190506137718161374d565b92915050565b61378081612d4e565b811461378a575f5ffd5b50565b5f8151905061379b81613777565b92915050565b5f6137ab82613045565b9050919050565b6137bb816137a1565b81146137c5575f5ffd5b50565b5f815190506137d6816137b2565b92915050565b5f5f5f606084860312156137f3576137f2612eb4565b5b5f61380086828701613763565b93505060206138118682870161378d565b9250506040613822868287016137c8565b9150509250925092565b61383581612e72565b811461383f575f5ffd5b50565b5f815190506138508161382c565b92915050565b5f6020828403121561386b5761386a612eb4565b5b5f61387884828501613842565b91505092915050565b61388a8161315f565b8114613894575f5ffd5b50565b5f815190506138a581613881565b92915050565b5f602082840312156138c0576138bf612eb4565b5b5f6138cd84828501613897565b91505092915050565b600381106138e2575f5ffd5b50565b5f815190506138f3816138d6565b92915050565b5f6020828403121561390e5761390d612eb4565b5b5f61391b848285016138e5565b91505092915050565b61392d81612e72565b8114613937575f5ffd5b50565b5f8151905061394881613924565b92915050565b5f5f6040838503121561396457613963612eb4565b5b5f6139718582860161393a565b925050602061398285828601613897565b9150509250929050565b5f6139968261315f565b91506139a18361315f565b92508282019050808211156139b9576139b8613475565b5b92915050565b5f602082840312156139d4576139d3612eb4565b5b5f6139e184828501613763565b9150509291505056fea164736f6c634300081c000a", + Bin: "0x6101e0604052348015610010575f5ffd5b50604051612f95380380612f9583398101604081905261002f916100b4565b602a60c0526001600160401b03998a166080529790981660a0526001600160a01b0395861660e05293851661010052610120929092526101405261016052610180529182166101a052166101c052610169565b80516001600160401b0381168114610098575f5ffd5b919050565b6001600160a01b03811681146100b1575f5ffd5b50565b5f5f5f5f5f5f5f5f5f5f6101408b8d0312156100ce575f5ffd5b6100d78b610082565b99506100e560208c01610082565b985060408b01516100f58161009d565b60608c01519098506101068161009d565b809750505f60808c01519050809650505f60a08c01519050809550505f60c08c015190508094505060e08b015192506101008b01516101448161009d565b6101208c01519092506101568161009d565b809150509295989b9194979a5092959850565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c051612d2761026e5f395f818161082c0152818161177a01526123f901525f81816104e3015281816113f8015281816114dd0152818161157501528181611a1001528181611ac901528181611b7d01528181611e29015261228201525f818161058901528181610c5701526124ee01525f610ee901525f610f6701525f610ec301525f610f2b01525f81816107d7015281816116f6015281816118f601526127b801525f818161067d01528181611e020152818161225a015261270601525f81816106af01526125af01525f818161077e0152611fe10152612d275ff3fe608060405260043610610229575f3560e01c806370872aa511610131578063bdb337d1116100ac578063d2ef73981161007c578063f2b4e61711610062578063f2b4e617146107c9578063fa24f743146107fb578063fdcb60681461081e575f5ffd5b8063d2ef7398146107a2578063d5d44d80146107aa575f5ffd5b8063bdb337d114610712578063c0d8bb7414610726578063cf09e0d014610751578063d2177bdd14610770575f5ffd5b80638b85902b11610101578063bbdc02db116100e7578063bbdc02db1461066f578063bcbe5094146106a1578063bcef3b55146106d3575f5ffd5b80638b85902b1461063057806399735e3214610630575f5ffd5b806370872aa5146105ad578063786b844b146105c15780637948690a146105d55780638129fc1c14610628575f5ffd5b80633ec4d4d6116101c15780635c0cba331161019157806360e274641161017757806360e274641461051b5780636361506d1461053c57806368ccdc861461057b575f5ffd5b80635c0cba33146104d5578063609d333414610507575f5ffd5b80633ec4d4d6146103b4578063529d6a8c1461042657806354fd4d501461045157806357da950e146104a6575f5ffd5b80632810e1d6116101fc5780632810e1d6146102f6578063375bfa5d1461030a578063378dd48c1461033657806337b1b22914610354575f5ffd5b806319effeb41461022d578063200d2ed214610276578063250e69bd146102af57806325fc2ace146102d8575b5f5ffd5b348015610238575f5ffd5b505f546102589068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b348015610281575f5ffd5b505f546102a290700100000000000000000000000000000000900460ff1681565b60405161026d9190612998565b3480156102ba575f5ffd5b506009546102c89060ff1681565b604051901515815260200161026d565b3480156102e3575f5ffd5b506007545b60405190815260200161026d565b348015610301575f5ffd5b506102a2610850565b348015610315575f5ffd5b506103296103243660046129ab565b610dc4565b60405161026d9190612a2d565b348015610341575f5ffd5b506009546102a290610100900460ff1681565b34801561035f575f5ffd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033560601c5b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161026d565b3480156103bf575f5ffd5b506001546002546003546004546104149363ffffffff81169373ffffffffffffffffffffffffffffffffffffffff64010000000090920482169391169160ff81169067ffffffffffffffff6101009091041686565b60405161026d96959493929190612a3b565b348015610431575f5ffd5b506102e8610440366004612abc565b60056020525f908152604090205481565b34801561045c575f5ffd5b506104996040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b60405161026d9190612b2a565b3480156104b1575f5ffd5b506007546008546104c0919082565b6040805192835260208301919091520161026d565b3480156104e0575f5ffd5b507f000000000000000000000000000000000000000000000000000000000000000061038f565b348015610512575f5ffd5b50610499611154565b348015610526575f5ffd5b5061053a610535366004612abc565b611162565b005b348015610547575f5ffd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003603401356102e8565b348015610586575f5ffd5b507f00000000000000000000000000000000000000000000000000000000000000006102e8565b3480156105b8575f5ffd5b506008546102e8565b3480156105cc575f5ffd5b5061053a611328565b3480156105e0575f5ffd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036074013560e01c5b60405163ffffffff909116815260200161026d565b61053a6116a3565b34801561063b575f5ffd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003605401356102e8565b34801561067a575f5ffd5b507f0000000000000000000000000000000000000000000000000000000000000000610613565b3480156106ac575f5ffd5b507f0000000000000000000000000000000000000000000000000000000000000000610258565b3480156106de575f5ffd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003601401356102e8565b34801561071d575f5ffd5b506102c861233d565b348015610731575f5ffd5b506102e8610740366004612abc565b60066020525f908152604090205481565b34801561075c575f5ffd5b505f546102589067ffffffffffffffff1681565b34801561077b575f5ffd5b507f0000000000000000000000000000000000000000000000000000000000000000610258565b61032961237b565b3480156107b5575f5ffd5b506102e86107c4366004612abc565b61268c565b3480156107d4575f5ffd5b507f000000000000000000000000000000000000000000000000000000000000000061038f565b348015610806575f5ffd5b5061080f612704565b60405161026d93929190612b3c565b348015610829575f5ffd5b507f000000000000000000000000000000000000000000000000000000000000000061038f565b5f805f54700100000000000000000000000000000000900460ff16600281111561087c5761087c612958565b146108b3576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6108bc612764565b90505f8160028111156108d1576108d1612958565b03610908576040517f92c506ae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181600281111561091c5761091c612958565b03610999575f8054600191907fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff16700100000000000000000000000000000000835b0217905550600154640100000000900473ffffffffffffffffffffffffffffffffffffffff165f908152600560205260409020479055610cec565b6109a161233d565b6109d7576040517f04643c3900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6004805460ff16908111156109ef576109ef612958565b03610a94575f8054600291907fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff16700100000000000000000000000000000000835b02179055504760055f367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033560601c5b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2055610cec565b60016004805460ff1690811115610aad57610aad612958565b03610af3575f8054600191907fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167001000000000000000000000000000000008361095e565b60026004805460ff1690811115610b0c57610b0c612958565b03610b52575f8054600291907fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000083610a31565b60036004805460ff1690811115610b6b57610b6b612958565b03610cba575f80547fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff16700200000000000000000000000000000000179055610bdf7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033560601c90565b60025473ffffffffffffffffffffffffffffffffffffffff918216911603610c2f5760025473ffffffffffffffffffffffffffffffffffffffff165f908152600560205260409020479055610cec565b60025473ffffffffffffffffffffffffffffffffffffffff165f9081526005602052604090207f000000000000000000000000000000000000000000000000000000000000000090819055610c849047612b96565b60055f367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033560601c610a69565b6040517f7492a26900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016811790555f80547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff16680100000000000000004267ffffffffffffffff16021790819055700100000000000000000000000000000000900460ff166002811115610d7e57610d7e612958565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da60905f90a250505f54700100000000000000000000000000000000900460ff1690565b5f610dcd61233d565b15610e04576040517fdf469ccb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040518060e00160405280610e4560347ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c9003013590565b81526007546020820152604001610e89367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036014013590565b90565b8152602001367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036054013581526020017f000000000000000000000000000000000000000000000000000000000000000081526020017f000000000000000000000000000000000000000000000000000000000000000081526020013373ffffffffffffffffffffffffffffffffffffffff1681525090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166341493c607f000000000000000000000000000000000000000000000000000000000000000083604051602001610ff591905f60e082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015273ffffffffffffffffffffffffffffffffffffffff60c08401511660c083015292915050565b60405160208183030381529060405287876040518563ffffffff1660e01b81526004016110259493929190612ba9565b5f6040518083038186803b15801561103b575f5ffd5b505afa15801561104d573d5f5f3e3d5ffd5b5050600280547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790555050600154640100000000900473ffffffffffffffffffffffffffffffffffffffff166110d057600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660021790556110fc565b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660031790555b60025460405173ffffffffffffffffffffffffffffffffffffffff909116907f5e6565d9ca2f5c8501d6418bf563322a7243ba7ace266d75eac99f4adbb30ba7905f90a2505060045460ff165b92915050565b905090565b606061114f60546024612907565b61116a611328565b5f6002600954610100900460ff16600281111561118957611189612958565b036111b9575073ffffffffffffffffffffffffffffffffffffffff81165f90815260066020526040902054611239565b6001600954610100900460ff1660028111156111d7576111d7612958565b03611207575073ffffffffffffffffffffffffffffffffffffffff81165f90815260056020526040902054611239565b6040517f078a3df400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611272576040517f17bfe5f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f81815260066020908152604080832083905560059091528082208290555190919083908381818185875af1925050503d805f81146112e3576040519150601f19603f3d011682016040523d82523d5f602084013e6112e8565b606091505b5050905080611323576040517f83e6cc6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6002600954610100900460ff16600281111561134657611346612958565b148061136d57506001600954610100900460ff16600281111561136b5761136b612958565b145b1561137457565b5f600954610100900460ff16600281111561139157611391612958565b146113c8576040517f078a3df400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f0314d2b30000000000000000000000000000000000000000000000000000000081523060048201525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690630314d2b390602401602060405180830381865afa158015611452573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114769190612c12565b9050806114af576040517f4851bd9b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f17cf21a90000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906317cf21a9906024015f604051808303815f87803b158015611533575f5ffd5b505af1925050508015611544575060015b506040517f496b9c160000000000000000000000000000000000000000000000000000000081523060048201525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063496b9c1690602401602060405180830381865afa1580156115cf573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115f39190612c12565b9050801561162c57600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055611659565b600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166102001790555b7f9908eaac0645df9d0704d06adc9e07337c951de2f06b5f2836151d48d5e4722f600960019054906101000a900460ff166040516116979190612998565b60405180910390a15050565b5f5471010000000000000000000000000000000000900460ff16156116f4576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163314611763576040517f940d38c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016631d3225e3367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033560601c6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401602060405180830381865afa158015611834573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118589190612c12565b61188e576040517fd386ef3e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607e36146118a357639824bdab5f526004601cfd5b63ffffffff367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036074013560e01c14611dd5575f73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663bb8aa1fc367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036074013560e01c6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815263ffffffff919091166004820152602401606060405180830381865afa1580156119a4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119c89190612c44565b6040517f04e50fed00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301529194507f000000000000000000000000000000000000000000000000000000000000000090911692506304e50fed9150602401602060405180830381865afa158015611a59573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a7d9190612c12565b1580611b3257506040517f34a346ea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f000000000000000000000000000000000000000000000000000000000000000016906334a346ea90602401602060405180830381865afa158015611b0e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b329190612c12565b80611be657506040517f5958a19300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f00000000000000000000000000000000000000000000000000000000000000001690635958a19390602401602060405180830381865afa158015611bc2573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611be69190612c12565b15611c1d576040517f346119f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060400160405280611c988373ffffffffffffffffffffffffffffffffffffffff1663bcef3b556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c74573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e869190612c97565b81526020018273ffffffffffffffffffffffffffffffffffffffff16638b85902b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ce6573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d0a9190612c97565b905280516007556020015160085560018173ffffffffffffffffffffffffffffffffffffffff1663200d2ed26040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d63573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d879190612cae565b6002811115611d9857611d98612958565b03611dcf576040517f346119f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611ead565b6040517f7258a80700000000000000000000000000000000000000000000000000000000815263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690637258a807906024016040805180830381865afa158015611e82573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea69190612ccc565b6008556007555b600854367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036054013511611f48576040517ff40239db000000000000000000000000000000000000000000000000000000008152367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360140135600482015260240160405180910390fd5b6040518060c00160405280611f8b60747ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c9003013560e01c90565b63ffffffff1681525f602082018190526040820152606001367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036014013581525f60208201526040016120107f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1642612cee565b67ffffffffffffffff169052805160018054602084015163ffffffff9093167fffffffffffffffff0000000000000000000000000000000000000000000000009091161764010000000073ffffffffffffffffffffffffffffffffffffffff938416021781556040830151600280547fffffffffffffffffffffffff000000000000000000000000000000000000000016919093161790915560608201516003556080820151600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168383838111156120ee576120ee612958565b021790555060a091909101516003909101805467ffffffffffffffff909216610100027fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff9092169190911790555f80547fffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffff167101000000000000000000000000000000000017815534906006906121b07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033560601c90565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546121f79190612cee565b90915550505f80547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff16179055604080517f3c9f397c00000000000000000000000000000000000000000000000000000000815290517f000000000000000000000000000000000000000000000000000000000000000063ffffffff16917f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1691633c9f397c916004808201926020929091908290030181865afa1580156122e1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123059190612d01565b600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001663ffffffff9290921692909214179055565b6004545f9067ffffffffffffffff42811661010090920416108061114f57505060025473ffffffffffffffffffffffffffffffffffffffff16151590565b5f806004805460ff169081111561239457612394612958565b146123cb576040517f85c345b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fff59ae7d0000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063ff59ae7d90602401602060405180830381865afa158015612453573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124779190612c12565b6124ad576040517fd386ef3e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6124b561233d565b156124ec576040517fdf469ccb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003414612545576040517f8620aa1900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffff0000000000000000000000000000000000000000ffffffff163364010000000002178155600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790556125d567ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001642612cee565b6004805467ffffffffffffffff92909216610100027fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff909216919091179055335f9081526006602052604081208054349290612632908490612cee565b909155505060015460405164010000000090910473ffffffffffffffffffffffffffffffffffffffff16907f98027b38153f995c4b802a5c7e6365bee3addb25af6b29818c0c304684d8052c905f90a25060045460ff1690565b5f6002600954610100900460ff1660028111156126ab576126ab612958565b036126d8575073ffffffffffffffffffffffffffffffffffffffff165f9081526006602052604090205490565b5073ffffffffffffffffffffffffffffffffffffffff81165f908152600560205260409020545b919050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360140135606061275d611154565b9050909192565b5f63ffffffff367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036074013560e01c14612901575f73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663bb8aa1fc367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036074013560e01c6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815263ffffffff919091166004820152602401606060405180830381865afa158015612866573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061288a9190612c44565b925050508073ffffffffffffffffffffffffffffffffffffffff1663200d2ed26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156128d7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128fb9190612cae565b91505090565b50600290565b604051818152367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90038284820160208401378260208301015f815260208101604052505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6003811061299557612995612958565b50565b602081016129a583612985565b91905290565b5f5f602083850312156129bc575f5ffd5b823567ffffffffffffffff8111156129d2575f5ffd5b8301601f810185136129e2575f5ffd5b803567ffffffffffffffff8111156129f8575f5ffd5b856020828401011115612a09575f5ffd5b6020919091019590945092505050565b60058110612a2957612a29612958565b9052565b602081016111498284612a19565b63ffffffff8716815273ffffffffffffffffffffffffffffffffffffffff8681166020830152851660408201526060810184905260c08101612a806080830185612a19565b67ffffffffffffffff831660a0830152979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114612995575f5ffd5b5f60208284031215612acc575f5ffd5b8135612ad781612a9b565b9392505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f612ad76020830184612ade565b63ffffffff84168152826020820152606060408201525f612b606060830184612ade565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8181038181111561114957611149612b69565b848152606060208201525f612bc16060830186612ade565b8281036040840152838152838560208301375f6020858301015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011682010191505095945050505050565b5f60208284031215612c22575f5ffd5b81518015158114612ad7575f5ffd5b805163ffffffff811681146126ff575f5ffd5b5f5f5f60608486031215612c56575f5ffd5b612c5f84612c31565b9250602084015167ffffffffffffffff81168114612c7b575f5ffd5b6040850151909250612c8c81612a9b565b809150509250925092565b5f60208284031215612ca7575f5ffd5b5051919050565b5f60208284031215612cbe575f5ffd5b815160038110612ad7575f5ffd5b5f5f60408385031215612cdd575f5ffd5b505080516020909101519092909150565b8082018082111561114957611149612b69565b5f60208284031215612d11575f5ffd5b612ad782612c3156fea164736f6c634300081d000a", } // OPSuccinctFaultDisputeGameABI is the input ABI used to generate the binding from. diff --git a/op-deployer/pkg/deployer/opcm/espresso.go b/op-deployer/pkg/deployer/opcm/espresso.go index e0d0fe54b25..28a835e7df8 100644 --- a/op-deployer/pkg/deployer/opcm/espresso.go +++ b/op-deployer/pkg/deployer/opcm/espresso.go @@ -8,24 +8,32 @@ import ( ) type DeployAWSNitroVerifierInput struct { - EnclaveHash [32]byte NitroEnclaveVerifier common.Address + TeeVerifierAddress common.Address + ProxyAdminOwner common.Address } type DeployAWSNitroVerifierOutput struct { - NitroTEEVerifierAddress common.Address + NitroTEEVerifierProxy common.Address + NitroTEEVerifierImpl common.Address + ProxyAdmin common.Address } type DeployEspressoInput struct { - Salt common.Hash - NitroTEEVerifier common.Address - NonTeeBatcher common.Address - TeeBatcher common.Address + Salt common.Hash + NitroTEEVerifier common.Address + NonTeeBatcher common.Address + TeeBatcher common.Address + ProxyAdminOwner common.Address + UseMockTEEVerifier bool } type DeployEspressoOutput struct { - BatchAuthenticatorAddress common.Address BatchInboxAddress common.Address + BatchAuthenticatorAddress common.Address + TeeVerifierProxy common.Address + TeeVerifierImpl common.Address + TeeVerifierProxyAdmin common.Address } type DeployEspressoScript struct { diff --git a/op-deployer/pkg/deployer/pipeline/espresso.go b/op-deployer/pkg/deployer/pipeline/espresso.go index 99c91663d85..373f7012770 100644 --- a/op-deployer/pkg/deployer/pipeline/espresso.go +++ b/op-deployer/pkg/deployer/pipeline/espresso.go @@ -39,19 +39,11 @@ func DeployEspresso(env *Env, intent *state.Intent, st *state.State, chainID com nitroEnclaveVerifierAddress = common.Address{} } - // get enclave hash from environment variable, fallback to zeroed hash - var enclaveHash [32]byte - if envVar := os.Getenv("ENCLAVE_HASH"); envVar != "" { - copy(enclaveHash[:], common.FromHex(envVar)) - lgr.Info("Using enclave hash from ENCLAVE_HASH env var", "hash", common.Bytes2Hex(enclaveHash[:])) - } else { - lgr.Info("ENCLAVE_HASH env var not set, using zeroed hash") - } - var nvo opcm.DeployAWSNitroVerifierOutput nvo, err = opcm.DeployAWSNitroVerifier(env.L1ScriptHost, opcm.DeployAWSNitroVerifierInput{ - EnclaveHash: enclaveHash, NitroEnclaveVerifier: nitroEnclaveVerifierAddress, + TeeVerifierAddress: common.Address{}, // Will be set after TEEVerifier deployment if needed + ProxyAdminOwner: env.Deployer, }) if err != nil { return fmt.Errorf("failed to deploy nitro verifier contracts: %w", err) @@ -69,10 +61,12 @@ func DeployEspresso(env *Env, intent *state.Intent, st *state.State, chainID com } eo, err = opcm.DeployEspresso(env.L1ScriptHost, opcm.DeployEspressoInput{ - Salt: st.Create2Salt, - NitroTEEVerifier: nvo.NitroTEEVerifierAddress, - NonTeeBatcher: chainIntent.NonTeeBatcher, - TeeBatcher: chainIntent.TeeBatcher, + Salt: st.Create2Salt, + NitroTEEVerifier: nvo.NitroTEEVerifierProxy, + NonTeeBatcher: chainIntent.NonTeeBatcher, + TeeBatcher: chainIntent.TeeBatcher, + ProxyAdminOwner: batchAuthenticatorOwnwerAddress, + UseMockTEEVerifier: nitroEnclaveVerifierAddress == common.Address{}, }, batchAuthenticatorOwnwerAddress) if err != nil { return fmt.Errorf("failed to deploy espresso contracts: %w", err) diff --git a/packages/contracts-bedrock/foundry.toml b/packages/contracts-bedrock/foundry.toml index f70f5566783..c760db283aa 100644 --- a/packages/contracts-bedrock/foundry.toml +++ b/packages/contracts-bedrock/foundry.toml @@ -35,12 +35,15 @@ ast = true evm_version = 'cancun' remappings = [ + # Espresso-tee-contracts context-specific remappings (must come before general @openzeppelin remappings) + 'lib/espresso-tee-contracts/:@openzeppelin/contracts/=lib/espresso-tee-contracts/lib/openzeppelin-contracts/contracts', + 'lib/espresso-tee-contracts/:@openzeppelin/contracts-upgradeable/=lib/espresso-tee-contracts/lib/openzeppelin-contracts-upgradeable/contracts', + 'lib/espresso-tee-contracts/:solady/=lib/solady/src', + # General remappings '@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts', '@espresso-tee-contracts/=lib/espresso-tee-contracts/src', '@nitro-validator/=lib/espresso-tee-contracts/lib/nitro-validator/src', 'aws-nitro-enclave-attestation/=lib/espresso-tee-contracts/lib/aws-nitro-enclave-attestation/contracts/src', - 'lib/espresso-tee-contracts/:@openzeppelin/contracts/=lib/espresso-tee-contracts/lib/openzeppelin-contracts/contracts', - 'lib/espresso-tee-contracts/:solady/=lib/solady/src', '@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts', '@openzeppelin/contracts-v5/=lib/openzeppelin-contracts-v5/contracts', '@rari-capital/solmate/=lib/solmate', diff --git a/packages/contracts-bedrock/interfaces/L1/IBatchAuthenticator.sol b/packages/contracts-bedrock/interfaces/L1/IBatchAuthenticator.sol index 190c5f81a69..7d1be395b9c 100644 --- a/packages/contracts-bedrock/interfaces/L1/IBatchAuthenticator.sol +++ b/packages/contracts-bedrock/interfaces/L1/IBatchAuthenticator.sol @@ -19,6 +19,9 @@ interface IBatchAuthenticator { /// @notice Emitted when the non-TEE batcher address is updated. event NonTeeBatcherUpdated(address indexed oldNonTeeBatcher, address indexed newNonTeeBatcher); + /// @notice Emitted when the active batcher is switched. + event BatcherSwitched(bool indexed activeIsTee); + function authenticateBatchInfo( bytes32 commitment, bytes memory _signature @@ -48,4 +51,6 @@ interface IBatchAuthenticator { function setTeeBatcher(address _newTeeBatcher) external; function setNonTeeBatcher(address _newNonTeeBatcher) external; + + function validateBatch(address sender, bytes calldata data) external view; } diff --git a/packages/contracts-bedrock/interfaces/L1/IBatchInbox.sol b/packages/contracts-bedrock/interfaces/L1/IBatchInbox.sol index 4dc60a997e7..4f3a13cc370 100644 --- a/packages/contracts-bedrock/interfaces/L1/IBatchInbox.sol +++ b/packages/contracts-bedrock/interfaces/L1/IBatchInbox.sol @@ -4,7 +4,5 @@ pragma solidity ^0.8.0; interface IBatchInbox { fallback() external; - function version() external view returns (string memory); - - function __constructor__(address _batchAuthenticator, address _owner) external; + function __constructor__(address _batchAuthenticator) external; } diff --git a/packages/contracts-bedrock/justfile b/packages/contracts-bedrock/justfile index d6757c10e64..c82e46f4a93 100644 --- a/packages/contracts-bedrock/justfile +++ b/packages/contracts-bedrock/justfile @@ -37,7 +37,7 @@ build *ARGS: lint-fix-no-fail # Builds the contracts (developer mode). build-dev *ARGS: lint-fix-no-fail - just forge-build-dev {{ARGS}} + just forge-build-dev {{ARGS}} && just fix-proxy-artifact # Builds the go-ffi tool for contract tests. build-go-ffi: diff --git a/packages/contracts-bedrock/lib/espresso-tee-contracts b/packages/contracts-bedrock/lib/espresso-tee-contracts index 0d73791be5d..b262920e2c5 160000 --- a/packages/contracts-bedrock/lib/espresso-tee-contracts +++ b/packages/contracts-bedrock/lib/espresso-tee-contracts @@ -1 +1 @@ -Subproject commit 0d73791be5d5fc3549e7771a1aeee9939c56762e +Subproject commit b262920e2c5e2bc35ab9c8b05aa6c7eef8221a5e diff --git a/packages/contracts-bedrock/scripts/deploy/DeployAWSNitroVerifier.s.sol b/packages/contracts-bedrock/scripts/deploy/DeployAWSNitroVerifier.s.sol index f396dbd6c19..34373d45ea6 100644 --- a/packages/contracts-bedrock/scripts/deploy/DeployAWSNitroVerifier.s.sol +++ b/packages/contracts-bedrock/scripts/deploy/DeployAWSNitroVerifier.s.sol @@ -8,45 +8,24 @@ import { Script } from "forge-std/Script.sol"; import { Solarray } from "scripts/libraries/Solarray.sol"; import { DeployUtils } from "scripts/libraries/DeployUtils.sol"; import { INitroEnclaveVerifier } from "aws-nitro-enclave-attestation/interfaces/INitroEnclaveVerifier.sol"; - -contract MockEspressoNitroTEEVerifier is IEspressoNitroTEEVerifier { - constructor() { } - - function registeredSigners(address signer) external pure override returns (bool) { - // Added this special condition for test TestE2eDevnetWithUnattestedBatcherKey - if (signer == address(0xe16d5c4080C0faD6D2Ef4eb07C657674a217271C)) { - return false; - } - return true; - } - - function registeredEnclaveHash(bytes32) external pure override returns (bool) { - return true; - } - - function registerSigner(bytes calldata, bytes calldata) external override { } - - function setEnclaveHash(bytes32, bool) external override { } - - function deleteRegisteredSigners(address[] memory) external override { } -} +import { IProxyAdmin } from "interfaces/universal/IProxyAdmin.sol"; +import { IProxy } from "interfaces/universal/IProxy.sol"; +import { ProxyAdmin } from "src/universal/ProxyAdmin.sol"; +import { Proxy } from "src/universal/Proxy.sol"; +import { MockEspressoNitroTEEVerifier } from "test/mocks/MockEspressoTEEVerifiers.sol"; contract DeployAWSNitroVerifierInput is BaseDeployIO { - bytes32 internal _enclaveHash; address internal _nitroEnclaveVerifier; - - function set(bytes4 _sel, bytes32 _val) public { - if (_sel == this.enclaveHash.selector) _enclaveHash = _val; - else revert("DeployAWSNitroVerifierInput: unknown selector"); - } - - function enclaveHash() public view returns (bytes32) { - return _enclaveHash; - } + address internal _teeVerifierAddress; + address internal _proxyAdminOwner; function set(bytes4 _sel, address _val) public { if (_sel == this.nitroEnclaveVerifier.selector) { _nitroEnclaveVerifier = _val; + } else if (_sel == this.teeVerifierAddress.selector) { + _teeVerifierAddress = _val; + } else if (_sel == this.proxyAdminOwner.selector) { + _proxyAdminOwner = _val; } else { revert("DeployAWSNitroVerifierInput: unknown selector"); } @@ -55,32 +34,104 @@ contract DeployAWSNitroVerifierInput is BaseDeployIO { function nitroEnclaveVerifier() public view returns (address) { return _nitroEnclaveVerifier; } + + /// @notice The address of the main EspressoTEEVerifier contract that controls admin functions. + /// Can be address(0) during initial deployment if TEEVerifier doesn't exist yet. + function teeVerifierAddress() public view returns (address) { + return _teeVerifierAddress; + } + + /// @notice The address that will own the ProxyAdmin. Defaults to msg.sender if not set. + function proxyAdminOwner() public view returns (address) { + return _proxyAdminOwner; + } } contract DeployAWSNitroVerifierOutput is BaseDeployIO { - address internal _nitroTEEVerifierAddress; + address internal _nitroTEEVerifierProxy; + address internal _nitroTEEVerifierImpl; + address internal _proxyAdmin; function set(bytes4 _sel, address _addr) public { require(_addr != address(0), "DeployAWSNitroVerifierOutput: cannot set zero address"); - if (_sel == this.nitroTEEVerifierAddress.selector) { - _nitroTEEVerifierAddress = _addr; + if (_sel == this.nitroTEEVerifierProxy.selector) { + _nitroTEEVerifierProxy = _addr; + } else if (_sel == this.nitroTEEVerifierImpl.selector) { + _nitroTEEVerifierImpl = _addr; + } else if (_sel == this.proxyAdmin.selector) { + _proxyAdmin = _addr; } else { revert("DeployAWSNitroVerifierOutput: unknown selector"); } } + function nitroTEEVerifierProxy() public view returns (address) { + require(_nitroTEEVerifierProxy != address(0), "nitro TEE verifier proxy not set"); + return _nitroTEEVerifierProxy; + } + + function nitroTEEVerifierImpl() public view returns (address) { + require(_nitroTEEVerifierImpl != address(0), "nitro TEE verifier impl not set"); + return _nitroTEEVerifierImpl; + } + + function proxyAdmin() public view returns (address) { + require(_proxyAdmin != address(0), "proxy admin not set"); + return _proxyAdmin; + } + + /// @notice Alias for nitroTEEVerifierProxy for backward compatibility function nitroTEEVerifierAddress() public view returns (address) { - require(_nitroTEEVerifierAddress != address(0), "nitro TEE verifier address not set"); - return _nitroTEEVerifierAddress; + return nitroTEEVerifierProxy(); } } contract DeployAWSNitroVerifier is Script { + struct ProxyDeployment { + ProxyAdmin proxyAdmin; + Proxy proxy; + } + function run(DeployAWSNitroVerifierInput input, DeployAWSNitroVerifierOutput output) public { deployNitroTEEVerifier(input, output); checkOutput(output); } + /// @notice Deploys ProxyAdmin and Proxy contracts + /// @param labelPrefix Prefix for vm.label (e.g., "Mock" or "") + /// @return deployment Struct containing the deployed ProxyAdmin and Proxy + function deployProxyInfrastructure(string memory labelPrefix) + internal + returns (ProxyDeployment memory deployment) + { + vm.broadcast(msg.sender); + deployment.proxyAdmin = ProxyAdmin( + payable( + DeployUtils.create1({ + _name: "ProxyAdmin", + _args: DeployUtils.encodeConstructor(abi.encodeCall(IProxyAdmin.__constructor__, (msg.sender))) + }) + ) + ); + vm.label(address(deployment.proxyAdmin), string.concat(labelPrefix, "NitroTEEVerifierProxyAdmin")); + + vm.broadcast(msg.sender); + deployment.proxy = Proxy( + payable( + DeployUtils.create1({ + _name: "Proxy", + _args: DeployUtils.encodeConstructor( + abi.encodeCall(IProxy.__constructor__, (address(deployment.proxyAdmin))) + ) + }) + ) + ); + vm.label(address(deployment.proxy), string.concat(labelPrefix, "NitroTEEVerifierProxy")); + + vm.broadcast(msg.sender); + deployment.proxyAdmin.setProxyType(address(deployment.proxy), ProxyAdmin.ProxyType.ERC1967); + } + function deployNitroTEEVerifier( DeployAWSNitroVerifierInput input, DeployAWSNitroVerifierOutput output @@ -88,23 +139,61 @@ contract DeployAWSNitroVerifier is Script { public returns (IEspressoNitroTEEVerifier) { - vm.broadcast(msg.sender); - bytes32 enclaveHash = input.enclaveHash(); address nitroEnclaveVerifier = input.nitroEnclaveVerifier(); + address proxyAdminOwner = input.proxyAdminOwner(); + if (proxyAdminOwner == address(0)) { + proxyAdminOwner = msg.sender; + } + + // Deploy proxy infrastructure + ProxyDeployment memory deployment = deployProxyInfrastructure(nitroEnclaveVerifier == address(0) ? "Mock" : ""); + + address implAddress; - IEspressoNitroTEEVerifier impl; if (nitroEnclaveVerifier == address(0)) { - impl = new MockEspressoNitroTEEVerifier(); + // Deploy mock implementation + vm.broadcast(msg.sender); + MockEspressoNitroTEEVerifier mockImpl = new MockEspressoNitroTEEVerifier(); + vm.label(address(mockImpl), "MockNitroTEEVerifierImpl"); + implAddress = address(mockImpl); + + // Upgrade proxy to point to mock implementation + vm.broadcast(msg.sender); + deployment.proxyAdmin.upgrade(payable(address(deployment.proxy)), implAddress); } else { - impl = new EspressoNitroTEEVerifier(enclaveHash, INitroEnclaveVerifier(nitroEnclaveVerifier)); + // Deploy production implementation + address teeVerifierAddress = input.teeVerifierAddress(); + + vm.broadcast(msg.sender); + EspressoNitroTEEVerifier impl = new EspressoNitroTEEVerifier(); + vm.label(address(impl), "NitroTEEVerifierImpl"); + implAddress = address(impl); + + // Initialize the proxy + bytes memory initData = abi.encodeCall( + EspressoNitroTEEVerifier.initialize, (teeVerifierAddress, INitroEnclaveVerifier(nitroEnclaveVerifier)) + ); + vm.broadcast(msg.sender); + deployment.proxyAdmin.upgradeAndCall(payable(address(deployment.proxy)), implAddress, initData); + } + + // Transfer ownership if needed + if (proxyAdminOwner != msg.sender) { + vm.broadcast(msg.sender); + deployment.proxyAdmin.transferOwnership(proxyAdminOwner); } - vm.label(address(impl), "NitroTEEVerifierImpl"); - output.set(output.nitroTEEVerifierAddress.selector, address(impl)); - return impl; + + // Set outputs + output.set(output.nitroTEEVerifierProxy.selector, address(deployment.proxy)); + output.set(output.nitroTEEVerifierImpl.selector, implAddress); + output.set(output.proxyAdmin.selector, address(deployment.proxyAdmin)); + + return IEspressoNitroTEEVerifier(address(deployment.proxy)); } function checkOutput(DeployAWSNitroVerifierOutput output) public view { - address[] memory addresses = Solarray.addresses(address(output.nitroTEEVerifierAddress())); + address[] memory addresses = + Solarray.addresses(output.nitroTEEVerifierProxy(), output.nitroTEEVerifierImpl(), output.proxyAdmin()); DeployUtils.assertValidContractAddresses(addresses); } } diff --git a/packages/contracts-bedrock/scripts/deploy/DeployEspresso.s.sol b/packages/contracts-bedrock/scripts/deploy/DeployEspresso.s.sol index 225eed0ce53..f31654ab71e 100644 --- a/packages/contracts-bedrock/scripts/deploy/DeployEspresso.s.sol +++ b/packages/contracts-bedrock/scripts/deploy/DeployEspresso.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.22; +pragma solidity 0.8.25; import { BaseDeployIO } from "scripts/deploy/BaseDeployIO.sol"; import { IBatchInbox } from "interfaces/L1/IBatchInbox.sol"; @@ -16,19 +16,26 @@ import { IProxy } from "interfaces/universal/IProxy.sol"; import { ProxyAdmin } from "src/universal/ProxyAdmin.sol"; import { Proxy } from "src/universal/Proxy.sol"; import { BatchAuthenticator } from "src/L1/BatchAuthenticator.sol"; -import { console2 as console } from "forge-std/console2.sol"; +import { MockEspressoTEEVerifier } from "test/mocks/MockEspressoTEEVerifiers.sol"; contract DeployEspressoInput is BaseDeployIO { bytes32 internal _salt; address internal _nitroTEEVerifier; address internal _nonTeeBatcher; address internal _teeBatcher; + address internal _proxyAdminOwner; + bool internal _useMockTEEVerifier; function set(bytes4 _sel, bytes32 _val) public { if (_sel == this.salt.selector) _salt = _val; else revert("DeployEspressoInput: unknown selector"); } + function set(bytes4 _sel, bool _val) public { + if (_sel == this.useMockTEEVerifier.selector) _useMockTEEVerifier = _val; + else revert("DeployEspressoInput: unknown selector"); + } + function set(bytes4 _sel, address _val) public { if (_sel == this.nitroTEEVerifier.selector) { _nitroTEEVerifier = _val; @@ -36,6 +43,8 @@ contract DeployEspressoInput is BaseDeployIO { _nonTeeBatcher = _val; } else if (_sel == this.teeBatcher.selector) { _teeBatcher = _val; + } else if (_sel == this.proxyAdminOwner.selector) { + _proxyAdminOwner = _val; } else { revert("DeployEspressoInput: unknown selector"); } @@ -46,6 +55,7 @@ contract DeployEspressoInput is BaseDeployIO { return _salt; } + /// @notice Address of the EspressoNitroTEEVerifier proxy (deployed via DeployAWSNitroVerifier) function nitroTEEVerifier() public view returns (address) { return _nitroTEEVerifier; } @@ -57,11 +67,25 @@ contract DeployEspressoInput is BaseDeployIO { function teeBatcher() public view returns (address) { return _teeBatcher; } + + /// @notice If true, deploy MockEspressoTEEVerifier instead of production EspressoTEEVerifier. + /// Defaults to false. Also uses mock if nitroTEEVerifier is address(0). + function useMockTEEVerifier() public view returns (bool) { + return _useMockTEEVerifier; + } + + /// @notice The address that will own the ProxyAdmin contracts. Defaults to msg.sender if not set. + function proxyAdminOwner() public view returns (address) { + return _proxyAdminOwner; + } } contract DeployEspressoOutput is BaseDeployIO { address internal _batchInboxAddress; address internal _batchAuthenticatorAddress; + address internal _teeVerifierProxy; + address internal _teeVerifierImpl; + address internal _teeVerifierProxyAdmin; function set(bytes4 _sel, address _addr) public { require(_addr != address(0), "DeployEspressoOutput: cannot set zero address"); @@ -69,6 +93,12 @@ contract DeployEspressoOutput is BaseDeployIO { _batchInboxAddress = _addr; } else if (_sel == this.batchAuthenticatorAddress.selector) { _batchAuthenticatorAddress = _addr; + } else if (_sel == this.teeVerifierProxy.selector) { + _teeVerifierProxy = _addr; + } else if (_sel == this.teeVerifierImpl.selector) { + _teeVerifierImpl = _addr; + } else if (_sel == this.teeVerifierProxyAdmin.selector) { + _teeVerifierProxyAdmin = _addr; } else { revert("DeployEspressoOutput: unknown selector"); } @@ -83,28 +113,47 @@ contract DeployEspressoOutput is BaseDeployIO { require(_batchInboxAddress != address(0), "DeployEspressoOutput: batcher inbox address not set"); return _batchInboxAddress; } + + function teeVerifierProxy() public view returns (address) { + require(_teeVerifierProxy != address(0), "DeployEspressoOutput: tee verifier proxy not set"); + return _teeVerifierProxy; + } + + function teeVerifierImpl() public view returns (address) { + require(_teeVerifierImpl != address(0), "DeployEspressoOutput: tee verifier impl not set"); + return _teeVerifierImpl; + } + + function teeVerifierProxyAdmin() public view returns (address) { + require(_teeVerifierProxyAdmin != address(0), "DeployEspressoOutput: tee verifier proxy admin not set"); + return _teeVerifierProxyAdmin; + } + + /// @notice Alias for teeVerifierProxy for convenience + function teeVerifierAddress() public view returns (address) { + return teeVerifierProxy(); + } } contract DeployEspresso is Script { function run(DeployEspressoInput input, DeployEspressoOutput output, address deployerAddress) public { - IEspressoTEEVerifier teeVerifier = deployTEEVerifier(input, deployerAddress); - IBatchAuthenticator batchAuthenticator = deployBatchAuthenticator(input, output, teeVerifier, deployerAddress); - deployBatchInbox(input, output, batchAuthenticator, deployerAddress); - checkOutput(output); + IEspressoTEEVerifier teeVerifier = deployTEEVerifier(input, output, deployerAddress); + IBatchAuthenticator batchAuthenticator = deployBatchAuthenticator(input, output, teeVerifier); + deployBatchInbox(input, output, batchAuthenticator); + checkOutput(input, output); } function deployBatchAuthenticator( DeployEspressoInput input, DeployEspressoOutput output, - IEspressoTEEVerifier teeVerifier, - address deployerAddress + IEspressoTEEVerifier teeVerifier ) public returns (IBatchAuthenticator) { // Deploy the proxy admin, the proxy, and the batch authenticator implementation. // We create ProxyAdmin with msg.sender as the owner to ensure broadcasts come from - // the expected address, then transfer ownership to deployerAddress afterward. + // the expected address, then transfer ownership to proxyAdminOwner afterward. // Use DeployUtils.create1 to ensure artifacts are available for vm.getCode calls. vm.broadcast(msg.sender); ProxyAdmin proxyAdmin = ProxyAdmin( @@ -132,16 +181,28 @@ contract DeployEspresso is Script { BatchAuthenticator impl = new BatchAuthenticator(); vm.label(address(impl), "BatchAuthenticatorImpl"); - // Initialize the proxy. - bytes memory initData = - abi.encodeCall(BatchAuthenticator.initialize, (teeVerifier, input.teeBatcher(), input.nonTeeBatcher())); + // Determine the desired BatchAuthenticator owner + address batchAuthenticatorOwner = input.proxyAdminOwner(); + if (batchAuthenticatorOwner == address(0)) { + batchAuthenticatorOwner = msg.sender; + } + + // Initialize the proxy with explicit owner parameter + bytes memory initData = abi.encodeCall( + BatchAuthenticator.initialize, + (teeVerifier, input.teeBatcher(), input.nonTeeBatcher(), batchAuthenticatorOwner) + ); vm.broadcast(msg.sender); proxyAdmin.upgradeAndCall(payable(address(proxy)), address(impl), initData); - // Transfer ownership to the desired deployerAddress if it differs from msg.sender. - if (deployerAddress != msg.sender) { + // Transfer ProxyAdmin ownership to the desired proxyAdminOwner if different from msg.sender. + address proxyAdminOwner = input.proxyAdminOwner(); + if (proxyAdminOwner == address(0)) { + proxyAdminOwner = msg.sender; + } + if (proxyAdminOwner != msg.sender) { vm.broadcast(msg.sender); - proxyAdmin.transferOwnership(deployerAddress); + proxyAdmin.transferOwnership(proxyAdminOwner); } // Return the proxied contract. @@ -152,27 +213,112 @@ contract DeployEspresso is Script { function deployTEEVerifier( DeployEspressoInput input, - address /* deployerAddress */ + DeployEspressoOutput output, + address deployerAddress ) public returns (IEspressoTEEVerifier) { IEspressoNitroTEEVerifier nitroTEEVerifier = IEspressoNitroTEEVerifier(input.nitroTEEVerifier()); + // OP only uses Nitro TEE, not SGX + IEspressoSGXTEEVerifier sgxTEEVerifier = IEspressoSGXTEEVerifier(address(0)); + + // Use mock if explicitly requested or if nitroTEEVerifier is not set + if (input.useMockTEEVerifier() || address(nitroTEEVerifier) == address(0)) { + vm.broadcast(msg.sender); + MockEspressoTEEVerifier mockImpl = new MockEspressoTEEVerifier(nitroTEEVerifier); + vm.label(address(mockImpl), "MockEspressoTEEVerifier"); + + // For mock deployments, we still need valid distinct addresses for the output. + // Deploy a minimal ProxyAdmin to satisfy the output requirements, even though + // the mock doesn't use it. This ensures checkOutput validation passes. + address mockProxyAdminOwner = input.proxyAdminOwner(); + if (mockProxyAdminOwner == address(0)) { + mockProxyAdminOwner = msg.sender; + } + vm.broadcast(msg.sender); + ProxyAdmin mockProxyAdmin = ProxyAdmin( + payable( + DeployUtils.create1({ + _name: "ProxyAdmin", + _args: DeployUtils.encodeConstructor( + abi.encodeCall(IProxyAdmin.__constructor__, (mockProxyAdminOwner)) + ) + }) + ) + ); + vm.label(address(mockProxyAdmin), "MockTEEVerifierProxyAdmin"); + + output.set(output.teeVerifierProxy.selector, address(mockImpl)); + output.set(output.teeVerifierImpl.selector, address(mockImpl)); + output.set(output.teeVerifierProxyAdmin.selector, address(mockProxyAdmin)); + return IEspressoTEEVerifier(address(mockImpl)); + } + + // Production deployment: Proxy + ProxyAdmin pattern + + // 1. Deploy the ProxyAdmin + vm.broadcast(msg.sender); + ProxyAdmin proxyAdmin = ProxyAdmin( + payable( + DeployUtils.create1({ + _name: "ProxyAdmin", + _args: DeployUtils.encodeConstructor(abi.encodeCall(IProxyAdmin.__constructor__, (msg.sender))) + }) + ) + ); + vm.label(address(proxyAdmin), "TEEVerifierProxyAdmin"); + + // 2. Deploy the Proxy vm.broadcast(msg.sender); - IEspressoTEEVerifier impl = new EspressoTEEVerifier( - // SGX TEE verifier is not yet implemented - IEspressoSGXTEEVerifier(address(0)), - nitroTEEVerifier + Proxy proxy = Proxy( + payable( + DeployUtils.create1({ + _name: "Proxy", + _args: DeployUtils.encodeConstructor(abi.encodeCall(IProxy.__constructor__, (address(proxyAdmin)))) + }) + ) ); - vm.label(address(impl), "EspressoTEEVerifierImpl"); - return impl; + vm.label(address(proxy), "TEEVerifierProxy"); + + // 3. Set proxy type + vm.broadcast(msg.sender); + proxyAdmin.setProxyType(address(proxy), ProxyAdmin.ProxyType.ERC1967); + + // 4. Deploy the EspressoTEEVerifier implementation + vm.broadcast(msg.sender); + EspressoTEEVerifier impl = new EspressoTEEVerifier(); + vm.label(address(impl), "TEEVerifierImpl"); + + // 5. Initialize the proxy + // Note: EspressoTEEVerifier.initialize takes (owner, sgxVerifier, nitroVerifier) + bytes memory initData = + abi.encodeCall(EspressoTEEVerifier.initialize, (deployerAddress, sgxTEEVerifier, nitroTEEVerifier)); + vm.broadcast(msg.sender); + proxyAdmin.upgradeAndCall(payable(address(proxy)), address(impl), initData); + + // 6. Transfer ownership to the desired proxyAdminOwner if different from msg.sender + address proxyAdminOwner = input.proxyAdminOwner(); + if (proxyAdminOwner == address(0)) { + proxyAdminOwner = msg.sender; + } + if (proxyAdminOwner != msg.sender) { + vm.broadcast(msg.sender); + proxyAdmin.transferOwnership(proxyAdminOwner); + } + + // 7. Set outputs + output.set(output.teeVerifierProxy.selector, address(proxy)); + output.set(output.teeVerifierImpl.selector, address(impl)); + output.set(output.teeVerifierProxyAdmin.selector, address(proxyAdmin)); + + return IEspressoTEEVerifier(address(proxy)); } function deployBatchInbox( DeployEspressoInput input, DeployEspressoOutput output, - IBatchAuthenticator batchAuthenticator, - address deployerAddress + IBatchAuthenticator batchAuthenticator ) public { @@ -183,7 +329,7 @@ contract DeployEspresso is Script { _name: "BatchInbox", _salt: salt, _args: DeployUtils.encodeConstructor( - abi.encodeCall(IBatchInbox.__constructor__, (address(batchAuthenticator), deployerAddress)) + abi.encodeCall(IBatchInbox.__constructor__, (address(batchAuthenticator))) ) }) ); @@ -191,9 +337,30 @@ contract DeployEspresso is Script { output.set(output.batchInboxAddress.selector, address(impl)); } - function checkOutput(DeployEspressoOutput output) public view { - address[] memory addresses = - Solarray.addresses(address(output.batchAuthenticatorAddress()), address(output.batchInboxAddress())); - DeployUtils.assertValidContractAddresses(addresses); + function checkOutput(DeployEspressoInput input, DeployEspressoOutput output) public view { + // Check core addresses + address[] memory coreAddresses = Solarray.addresses( + output.batchAuthenticatorAddress(), output.batchInboxAddress(), output.teeVerifierProxy() + ); + DeployUtils.assertValidContractAddresses(coreAddresses); + + // Check that proxy admin is a valid, distinct address (applies to both mock and production) + address[] memory adminAddresses = Solarray.addresses(output.teeVerifierProxyAdmin()); + DeployUtils.assertValidContractAddresses(adminAddresses); + require( + output.teeVerifierProxy() != output.teeVerifierProxyAdmin(), + "DeployEspresso: proxy and proxy admin should be different" + ); + + // For production deployment, also check impl is valid and distinct from proxy + if (!input.useMockTEEVerifier() && input.nitroTEEVerifier() != address(0)) { + address[] memory teeAddresses = + Solarray.addresses(output.teeVerifierProxy(), output.teeVerifierImpl(), output.teeVerifierProxyAdmin()); + DeployUtils.assertValidContractAddresses(teeAddresses); + require( + output.teeVerifierProxy() != output.teeVerifierImpl(), + "DeployEspresso: proxy and impl should be different" + ); + } } } diff --git a/packages/contracts-bedrock/src/L1/BatchAuthenticator.sol b/packages/contracts-bedrock/src/L1/BatchAuthenticator.sol index 16ec3c4719c..b89d7bc430f 100644 --- a/packages/contracts-bedrock/src/L1/BatchAuthenticator.sol +++ b/packages/contracts-bedrock/src/L1/BatchAuthenticator.sol @@ -2,17 +2,27 @@ pragma solidity ^0.8.0; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; -import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; +import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; +import { OwnableUpgradeable } from + "lib/espresso-tee-contracts/lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; import { ISemver } from "interfaces/universal/ISemver.sol"; import { IEspressoTEEVerifier } from "@espresso-tee-contracts/interface/IEspressoTEEVerifier.sol"; +import { ServiceType } from "@espresso-tee-contracts/types/Types.sol"; import { IBatchAuthenticator } from "interfaces/L1/IBatchAuthenticator.sol"; +import { OwnableWithGuardiansUpgradeable } from "@espresso-tee-contracts/OwnableWithGuardiansUpgradeable.sol"; import { ProxyAdminOwnedBase } from "src/L1/ProxyAdminOwnedBase.sol"; import { ReinitializableBase } from "src/universal/ReinitializableBase.sol"; /// @notice Upgradeable contract that authenticates batch information using the Transparent Proxy /// pattern. /// Supports switching between TEE and non-TEE batchers. -contract BatchAuthenticator is IBatchAuthenticator, ISemver, Initializable, ProxyAdminOwnedBase, ReinitializableBase { +contract BatchAuthenticator is + IBatchAuthenticator, + ISemver, + OwnableWithGuardiansUpgradeable, + ProxyAdminOwnedBase, + ReinitializableBase +{ /// @notice Semantic version. /// @custom:semver 1.0.0 string public constant version = "1.0.0"; @@ -41,7 +51,8 @@ contract BatchAuthenticator is IBatchAuthenticator, ISemver, Initializable, Prox function initialize( IEspressoTEEVerifier _espressoTEEVerifier, address _teeBatcher, - address _nonTeeBatcher + address _nonTeeBatcher, + address _owner ) external reinitializer(initVersion()) @@ -49,9 +60,14 @@ contract BatchAuthenticator is IBatchAuthenticator, ISemver, Initializable, Prox // Initialization transactions must come from the ProxyAdmin or its owner. _assertOnlyProxyAdminOrProxyAdminOwner(); + // Initialize OwnableWithGuardians with the provided owner address + __OwnableWithGuardians_init(_owner); + if (_teeBatcher == address(0)) revert InvalidAddress(_teeBatcher); if (_nonTeeBatcher == address(0)) revert InvalidAddress(_nonTeeBatcher); - if (address(_espressoTEEVerifier) == address(0)) revert InvalidAddress(address(_espressoTEEVerifier)); + if (address(_espressoTEEVerifier) == address(0)) { + revert InvalidAddress(address(_espressoTEEVerifier)); + } espressoTEEVerifier = _espressoTEEVerifier; teeBatcher = _teeBatcher; @@ -60,20 +76,19 @@ contract BatchAuthenticator is IBatchAuthenticator, ISemver, Initializable, Prox activeIsTee = true; } - /// @notice Returns the owner of the ProxyAdmin that owns this proxy. - function owner() external view returns (address) { - return proxyAdminOwner(); + /// @notice Returns the owner of the contract. + function owner() public view override(IBatchAuthenticator, OwnableUpgradeable) returns (address) { + return super.owner(); } /// @notice Toggles the active batcher between the TEE and non-TEE batcher. - function switchBatcher() external { - _assertOnlyProxyAdminOwner(); + function switchBatcher() external onlyGuardianOrOwner { activeIsTee = !activeIsTee; + emit BatcherSwitched(activeIsTee); } /// @notice Updates the TEE batcher address. - function setTeeBatcher(address _newTeeBatcher) external { - _assertOnlyProxyAdminOwner(); + function setTeeBatcher(address _newTeeBatcher) external onlyOwner { if (_newTeeBatcher == address(0)) revert InvalidAddress(_newTeeBatcher); address oldTeeBatcher = teeBatcher; teeBatcher = _newTeeBatcher; @@ -81,9 +96,10 @@ contract BatchAuthenticator is IBatchAuthenticator, ISemver, Initializable, Prox } /// @notice Updates the non-TEE batcher address. - function setNonTeeBatcher(address _newNonTeeBatcher) external { - _assertOnlyProxyAdminOwner(); - if (_newNonTeeBatcher == address(0)) revert InvalidAddress(_newNonTeeBatcher); + function setNonTeeBatcher(address _newNonTeeBatcher) external onlyOwner { + if (_newNonTeeBatcher == address(0)) { + revert InvalidAddress(_newNonTeeBatcher); + } address oldNonTeeBatcher = nonTeeBatcher; nonTeeBatcher = _newNonTeeBatcher; emit NonTeeBatcherUpdated(oldNonTeeBatcher, _newNonTeeBatcher); @@ -103,7 +119,7 @@ contract BatchAuthenticator is IBatchAuthenticator, ISemver, Initializable, Prox require(signer != address(0), "BatchAuthenticator: invalid signature"); require( - espressoTEEVerifier.espressoNitroTEEVerifier().registeredSigners(signer), + espressoTEEVerifier.espressoNitroTEEVerifier().isSignerValid(signer, ServiceType.BatchPoster), "BatchAuthenticator: invalid signer" ); @@ -112,7 +128,9 @@ contract BatchAuthenticator is IBatchAuthenticator, ISemver, Initializable, Prox } function registerSigner(bytes calldata attestationTbs, bytes calldata signature) external { - espressoTEEVerifier.registerSigner(attestationTbs, signature, IEspressoTEEVerifier.TeeType.NITRO); + espressoTEEVerifier.registerService( + attestationTbs, signature, IEspressoTEEVerifier.TeeType.NITRO, ServiceType.BatchPoster + ); emit SignerRegistrationInitiated(msg.sender); } @@ -120,4 +138,80 @@ contract BatchAuthenticator is IBatchAuthenticator, ISemver, Initializable, Prox function nitroValidator() external view returns (address) { return address(espressoTEEVerifier.espressoNitroTEEVerifier()); } + + /// @notice Validates a batch submission in TEE mode. + /// @param sender The address attempting to submit the batch. + /// @param data The batch data being submitted. + /// @dev Checks sender is teeBatcher and batch is authenticated. + /// Handles both blob and calldata batches. + function validateTeeBatch(address sender, bytes calldata data) public view { + // Check sender authorization + if (sender != teeBatcher) { + revert( + string( + abi.encodePacked( + "BatchInbox: batcher not authorized to post in TEE mode. Expected: ", + Strings.toHexString(uint160(teeBatcher), 20), + ", Actual: ", + Strings.toHexString(uint160(sender), 20) + ) + ) + ); + } + + // Check batch authentication + if (blobhash(0) != 0) { + // Blob batch: concatenate all blob hashes + uint256 numBlobs = 0; + while (blobhash(numBlobs) != 0) { + numBlobs++; + } + bytes memory concatenatedHashes = new bytes(32 * numBlobs); + for (uint256 i = 0; i < numBlobs; i++) { + assembly { + mstore(add(concatenatedHashes, add(0x20, mul(i, 32))), blobhash(i)) + } + } + bytes32 hash = keccak256(concatenatedHashes); + if (!validBatchInfo[hash]) { + revert("Invalid blob batch"); + } + } else { + // Calldata batch + bytes32 hash = keccak256(data); + if (!validBatchInfo[hash]) { + revert("Invalid calldata batch"); + } + } + } + + /// @notice Validates a batch submission in non-TEE (fallback) mode. + /// @param sender The address attempting to submit the batch. + /// @dev Only checks sender is nonTeeBatcher. No batch authentication required. + function validateNonTeeBatch(address sender) public view { + if (sender != nonTeeBatcher) { + revert( + string( + abi.encodePacked( + "BatchInbox: batcher not authorized to post in fallback mode. Expected: ", + Strings.toHexString(uint160(nonTeeBatcher), 20), + ", Actual: ", + Strings.toHexString(uint160(sender), 20) + ) + ) + ); + } + } + + /// @notice Validates a batch submission based on current batcher mode. + /// @param sender The address attempting to submit the batch. + /// @param data The batch data being submitted. + /// @dev Routes to validateTeeBatch or validateNonTeeBatch based on activeIsTee. + function validateBatch(address sender, bytes calldata data) external view { + if (activeIsTee) { + validateTeeBatch(sender, data); + } else { + validateNonTeeBatch(sender); + } + } } diff --git a/packages/contracts-bedrock/src/L1/BatchInbox.sol b/packages/contracts-bedrock/src/L1/BatchInbox.sol index 613de19aef2..137643f49b6 100644 --- a/packages/contracts-bedrock/src/L1/BatchInbox.sol +++ b/packages/contracts-bedrock/src/L1/BatchInbox.sol @@ -1,76 +1,26 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; -import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; import { IBatchAuthenticator } from "interfaces/L1/IBatchAuthenticator.sol"; /// @title BatchInbox /// @notice Receives batches from either a TEE batcher or a non-TEE batcher and enforces /// that TEE batches are authenticated by the configured batch authenticator. -contract BatchInbox is Ownable { +/// @dev This contract has NO public function selectors - all calls route to the fallback. +contract BatchInbox { /// @notice Contract responsible for authenticating TEE batch commitments. - IBatchAuthenticator public immutable batchAuthenticator; + /// @dev Private to prevent creating a function selector. + IBatchAuthenticator private immutable batchAuthenticator; /// @notice Initializes the contract with the batch authenticator. /// @param _batchAuthenticator Address of the batch authenticator contract. - constructor(IBatchAuthenticator _batchAuthenticator, address _owner) Ownable() { + constructor(IBatchAuthenticator _batchAuthenticator) { batchAuthenticator = _batchAuthenticator; - _transferOwnership(_owner); } /// @notice Fallback entry point for batch submissions. - /// @dev Enforces that the caller matches the currently active batcher and, when - /// the TEE batcher is active, that the batch commitment is approved by - /// the batch authenticator. For non-TEE batches, only the caller check - /// is enforced. + /// @dev Delegates all validation to the batch authenticator. fallback() external { - // TEE batcher requires batch and address authentication - if (batchAuthenticator.activeIsTee()) { - if (msg.sender != batchAuthenticator.teeBatcher()) { - revert( - string( - abi.encodePacked( - "BatchInbox: batcher not authorized to post in TEE mode. Expected: ", - Strings.toHexString(uint160(batchAuthenticator.teeBatcher()), 20), - ", Actual: ", - Strings.toHexString(uint160(msg.sender), 20) - ) - ) - ); - } - - if (blobhash(0) != 0) { - bytes memory concatenatedHashes = new bytes(0); - uint256 currentBlob = 0; - while (blobhash(currentBlob) != 0) { - concatenatedHashes = bytes.concat(concatenatedHashes, blobhash(currentBlob)); - currentBlob++; - } - bytes32 hash = keccak256(concatenatedHashes); - if (!batchAuthenticator.validBatchInfo(hash)) { - revert("Invalid blob batch"); - } - } else { - bytes32 hash = keccak256(msg.data); - if (!batchAuthenticator.validBatchInfo(hash)) { - revert("Invalid calldata batch"); - } - } - } else { - // Fallback batcher requires only batcher address authentication - if (msg.sender != batchAuthenticator.nonTeeBatcher()) { - revert( - string( - abi.encodePacked( - "BatchInbox: batcher not authorized to post in fallback mode. Expected: ", - Strings.toHexString(uint160(batchAuthenticator.nonTeeBatcher()), 20), - ", Actual: ", - Strings.toHexString(uint160(msg.sender), 20) - ) - ) - ); - } - } + batchAuthenticator.validateBatch(msg.sender, msg.data); } } diff --git a/packages/contracts-bedrock/test/L1/BatchAuthenticator.t.sol b/packages/contracts-bedrock/test/L1/BatchAuthenticator.t.sol index a4140741cf1..e2e47387f4d 100644 --- a/packages/contracts-bedrock/test/L1/BatchAuthenticator.t.sol +++ b/packages/contracts-bedrock/test/L1/BatchAuthenticator.t.sol @@ -10,109 +10,19 @@ import { Proxy } from "src/universal/Proxy.sol"; import { ProxyAdmin } from "src/universal/ProxyAdmin.sol"; import { IEspressoTEEVerifier } from "@espresso-tee-contracts/interface/IEspressoTEEVerifier.sol"; import { IEspressoNitroTEEVerifier } from "@espresso-tee-contracts/interface/IEspressoNitroTEEVerifier.sol"; -import { IEspressoSGXTEEVerifier } from "@espresso-tee-contracts/interface/IEspressoSGXTEEVerifier.sol"; -import { EspressoTEEVerifierMock } from "@espresso-tee-contracts/mocks/EspressoTEEVerifier.sol"; import { IProxy } from "interfaces/universal/IProxy.sol"; import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol"; +import { MockEspressoTEEVerifier } from "test/mocks/MockEspressoTEEVerifiers.sol"; import { Config } from "scripts/libraries/Config.sol"; import { Chains } from "scripts/libraries/Chains.sol"; -/// @notice Mock that implements IEspressoTEEVerifier and IEspressoNitroTEEVerifier by using -/// composition with EspressoTEEVerifierMock to reuse its logic. -/// Supports only the Nitro TEE verifier. -contract MockEspressoTEEVerifier is IEspressoTEEVerifier, IEspressoNitroTEEVerifier { - EspressoTEEVerifierMock private _mock; - - constructor() { - _mock = new EspressoTEEVerifierMock(); - } - - function espressoNitroTEEVerifier() external view override returns (IEspressoNitroTEEVerifier) { - return this; - } - - function espressoSGXTEEVerifier() external pure override returns (IEspressoSGXTEEVerifier) { - return IEspressoSGXTEEVerifier(address(0)); - } - - function verify( - bytes memory signature, - bytes32 userDataHash, - TeeType teeType - ) - external - view - override - returns (bool) - { - if (teeType != TeeType.NITRO) { - return false; - } - EspressoTEEVerifierMock.TeeType mockTeeType = EspressoTEEVerifierMock.TeeType(uint8(teeType)); - return _mock.verify(signature, userDataHash, mockTeeType); - } - - function registerSigner(bytes calldata attestation, bytes calldata data, TeeType teeType) external override { - require(teeType == TeeType.NITRO, "MockEspressoTEEVerifier: only NITRO supported"); - EspressoTEEVerifierMock.TeeType mockTeeType = EspressoTEEVerifierMock.TeeType(uint8(teeType)); - _mock.registerSigner(attestation, data, mockTeeType); - } - - function registeredSigners(address signer, TeeType teeType) external view override returns (bool) { - if (teeType != TeeType.NITRO) { - return false; - } - EspressoTEEVerifierMock.TeeType mockTeeType = EspressoTEEVerifierMock.TeeType(uint8(teeType)); - return _mock.registeredSigners(signer, mockTeeType); - } - - function registeredEnclaveHashes(bytes32, TeeType) external pure override returns (bool) { - return false; - } - - function setEspressoSGXTEEVerifier(IEspressoSGXTEEVerifier) external pure override { - // No-op: SGX is not supported. - } - - function setEspressoNitroTEEVerifier(IEspressoNitroTEEVerifier) external pure override { - // No-op: this contract can only be used as the Nitro TEE verifier. - } - - function registeredSigners(address signer) external view override returns (bool) { - return _mock.registeredSigner(signer); - } - - function registeredEnclaveHash(bytes32) external pure override returns (bool) { - return false; - } - - function registerSigner(bytes calldata, bytes calldata) external pure override { - // No-op: registration should go through registerSigner(bytes, bytes, TeeType) - } - - function setEnclaveHash(bytes32, bool) external pure override { } - - function deleteRegisteredSigners(address[] memory) external pure override { } - - /// @notice Test helper to directly set registered signer status. - function setRegisteredSigner(address signer, bool value) external { - if (value) { - bytes memory data = abi.encodePacked(signer); - this.registerSigner("", data, TeeType.NITRO); - } else { - // For false, we can't unregister through the mock's interface, - // but tests only set to true, so this is fine. - revert("MockEspressoTEEVerifier: unregistering not supported"); - } - } -} - /// @notice Tests for the upgradeable BatchAuthenticator contract using the Transparent Proxy pattern. contract BatchAuthenticator_Test is Test { address public deployer = address(0xABCD); address public proxyAdminOwner = address(0xBEEF); address public unauthorized = address(0xDEAD); + address public guardian = address(0xFACE); address public teeBatcher = address(0x1234); address public nonTeeBatcher = address(0x5678); @@ -122,8 +32,9 @@ contract BatchAuthenticator_Test is Test { ProxyAdmin public proxyAdmin; function setUp() public { - // Deploy the mock TEE verifier and the authenticator implementation. - teeVerifier = new MockEspressoTEEVerifier(); + // Deploy the mock TEE verifier (standalone mode with no external nitro verifier) + // and the authenticator implementation. + teeVerifier = new MockEspressoTEEVerifier(IEspressoNitroTEEVerifier(address(0))); implementation = new BatchAuthenticator(); // Deploy the proxy admin. @@ -138,7 +49,8 @@ contract BatchAuthenticator_Test is Test { proxyAdmin.setProxyType(address(proxy), ProxyAdmin.ProxyType.ERC1967); bytes memory initData = abi.encodeCall( - BatchAuthenticator.initialize, (IEspressoTEEVerifier(address(teeVerifier)), teeBatcher, nonTeeBatcher) + BatchAuthenticator.initialize, + (IEspressoTEEVerifier(address(teeVerifier)), teeBatcher, nonTeeBatcher, proxyAdminOwner) ); vm.prank(proxyAdminOwner); proxyAdmin.upgradeAndCall(payable(address(proxy)), address(implementation), initData); @@ -153,7 +65,8 @@ contract BatchAuthenticator_Test is Test { proxyAdmin.setProxyType(address(proxy), ProxyAdmin.ProxyType.ERC1967); bytes memory initData = abi.encodeCall( - BatchAuthenticator.initialize, (IEspressoTEEVerifier(address(teeVerifier)), teeBatcher, nonTeeBatcher) + BatchAuthenticator.initialize, + (IEspressoTEEVerifier(address(teeVerifier)), teeBatcher, nonTeeBatcher, proxyAdminOwner) ); // First initialization succeeds. @@ -173,7 +86,8 @@ contract BatchAuthenticator_Test is Test { proxyAdmin.setProxyType(address(proxy), ProxyAdmin.ProxyType.ERC1967); bytes memory initData = abi.encodeCall( - BatchAuthenticator.initialize, (IEspressoTEEVerifier(address(teeVerifier)), address(0), nonTeeBatcher) + BatchAuthenticator.initialize, + (IEspressoTEEVerifier(address(teeVerifier)), address(0), nonTeeBatcher, proxyAdminOwner) ); vm.prank(proxyAdminOwner); @@ -188,7 +102,8 @@ contract BatchAuthenticator_Test is Test { proxyAdmin.setProxyType(address(proxy), ProxyAdmin.ProxyType.ERC1967); bytes memory initData = abi.encodeCall( - BatchAuthenticator.initialize, (IEspressoTEEVerifier(address(teeVerifier)), teeBatcher, address(0)) + BatchAuthenticator.initialize, + (IEspressoTEEVerifier(address(teeVerifier)), teeBatcher, address(0), proxyAdminOwner) ); vm.prank(proxyAdminOwner); @@ -202,8 +117,10 @@ contract BatchAuthenticator_Test is Test { vm.prank(proxyAdminOwner); proxyAdmin.setProxyType(address(proxy), ProxyAdmin.ProxyType.ERC1967); - bytes memory initData = - abi.encodeCall(BatchAuthenticator.initialize, (IEspressoTEEVerifier(address(0)), teeBatcher, nonTeeBatcher)); + bytes memory initData = abi.encodeCall( + BatchAuthenticator.initialize, + (IEspressoTEEVerifier(address(0)), teeBatcher, nonTeeBatcher, proxyAdminOwner) + ); vm.prank(proxyAdminOwner); vm.expectRevert("Proxy: delegatecall to new implementation contract failed"); @@ -220,20 +137,43 @@ contract BatchAuthenticator_Test is Test { assertTrue(authenticator.activeIsTee()); } - /// @notice Test that switchBatcher can only be called by ProxyAdmin owner. - function test_switchBatcher_onlyProxyAdminOwner() external { + /// @notice Test that switchBatcher can be called by owner or guardian. + function test_switchBatcher_onlyOwnerOrGuardian() external { BatchAuthenticator authenticator = _deployAndInitializeProxy(); - // ProxyAdmin owner can switch. + // ProxyAdmin owner (now contract owner) can switch. + vm.expectEmit(true, false, false, false); + emit BatcherSwitched(false); vm.prank(proxyAdminOwner); authenticator.switchBatcher(); assertFalse(authenticator.activeIsTee()); // Switch back. + vm.expectEmit(true, false, false, false); + emit BatcherSwitched(true); vm.prank(proxyAdminOwner); authenticator.switchBatcher(); assertTrue(authenticator.activeIsTee()); + // Add a guardian. + vm.prank(proxyAdminOwner); + authenticator.addGuardian(guardian); + assertTrue(authenticator.isGuardian(guardian)); + + // Guardian can switch. + vm.expectEmit(true, false, false, false); + emit BatcherSwitched(false); + vm.prank(guardian); + authenticator.switchBatcher(); + assertFalse(authenticator.activeIsTee()); + + // Guardian can switch back. + vm.expectEmit(true, false, false, false); + emit BatcherSwitched(true); + vm.prank(guardian); + authenticator.switchBatcher(); + assertTrue(authenticator.activeIsTee()); + // Unauthorized cannot switch. vm.prank(unauthorized); vm.expectRevert(); @@ -269,18 +209,54 @@ contract BatchAuthenticator_Test is Test { assertTrue(authenticator.validBatchInfo(commitment)); } + /// @notice Test that authenticateBatchInfo reverts for unregistered signers. + function test_authenticateBatchInfo_revertsForUnregisteredSigner() external { + BatchAuthenticator authenticator = _deployAndInitializeProxy(); + + uint256 privateKey = 1; + bytes32 commitment = keccak256("test commitment"); + + // DO NOT register signer - signer is not registered in the TEE verifier + + // Create valid signature from unregistered signer. + (uint8 v, bytes32 r, bytes32 s) = vm.sign(privateKey, commitment); + bytes memory signature = abi.encodePacked(r, s, v); + + // Should revert because signer is not registered. + vm.expectRevert("BatchAuthenticator: invalid signer"); + authenticator.authenticateBatchInfo(commitment, signature); + + // Verify commitment was NOT marked as valid + assertFalse(authenticator.validBatchInfo(commitment)); + } + + /// @notice Test that authenticateBatchInfo reverts for invalid signature (zero address recovery). + function test_authenticateBatchInfo_revertsForInvalidSignature() external { + BatchAuthenticator authenticator = _deployAndInitializeProxy(); + + bytes32 commitment = keccak256("test commitment"); + + // Create an invalid signature that will recover to address(0) + bytes memory invalidSignature = new bytes(65); + + // OpenZeppelin's ECDSA.recover reverts with its own error for invalid signatures + vm.expectRevert("ECDSA: invalid signature"); + authenticator.authenticateBatchInfo(commitment, invalidSignature); + } + /// @notice Test that registerSigner works correctly. function test_registerSigner_succeeds() external { BatchAuthenticator authenticator = _deployAndInitializeProxy(); - bytes memory attestationTbs = "test attestation"; + // The new mock expects signer address in the first parameter (output/attestation) address signer = address(0x1234); - bytes memory signature = abi.encodePacked(signer); + bytes memory signerData = abi.encodePacked(signer); + bytes memory proofBytes = ""; vm.expectEmit(true, false, false, true); emit SignerRegistrationInitiated(address(this)); - authenticator.registerSigner(attestationTbs, signature); + authenticator.registerSigner(signerData, proofBytes); } /// @notice Test that setTeeBatcher can only be called by ProxyAdmin owner. @@ -390,6 +366,7 @@ contract BatchAuthenticator_Test is Test { event SignerRegistrationInitiated(address indexed caller); event TeeBatcherUpdated(address indexed oldTeeBatcher, address indexed newTeeBatcher); event NonTeeBatcherUpdated(address indexed oldNonTeeBatcher, address indexed newNonTeeBatcher); + event BatcherSwitched(bool indexed activeIsTee); } /// @notice Fork tests for BatchAuthenticator on Sepolia. @@ -413,8 +390,8 @@ contract BatchAuthenticator_Fork_Test is Test { require(block.chainid == Chains.Sepolia, "Fork test must run on Sepolia"); console.log("Forked Sepolia at block:", block.number); - // Deploy mock TEE verifier and authenticator implementation. - teeVerifier = new MockEspressoTEEVerifier(); + // Deploy mock TEE verifier (standalone mode) and authenticator implementation. + teeVerifier = new MockEspressoTEEVerifier(IEspressoNitroTEEVerifier(address(0))); implementation = new BatchAuthenticator(); // Deploy proxy admin and proxy. @@ -426,7 +403,8 @@ contract BatchAuthenticator_Fork_Test is Test { // Initialize the proxy. bytes memory initData = abi.encodeCall( - BatchAuthenticator.initialize, (IEspressoTEEVerifier(address(teeVerifier)), teeBatcher, nonTeeBatcher) + BatchAuthenticator.initialize, + (IEspressoTEEVerifier(address(teeVerifier)), teeBatcher, nonTeeBatcher, proxyAdminOwner) ); vm.prank(proxyAdminOwner); proxyAdmin.upgradeAndCall(payable(address(proxy)), address(implementation), initData); @@ -538,4 +516,5 @@ contract BatchAuthenticator_Fork_Test is Test { event SignerRegistrationInitiated(address indexed caller); event TeeBatcherUpdated(address indexed oldTeeBatcher, address indexed newTeeBatcher); event NonTeeBatcherUpdated(address indexed oldNonTeeBatcher, address indexed newNonTeeBatcher); + event BatcherSwitched(bool indexed activeIsTee); } diff --git a/packages/contracts-bedrock/test/L1/BatchInbox.t.sol b/packages/contracts-bedrock/test/L1/BatchInbox.t.sol index f3e89057168..3b620069119 100644 --- a/packages/contracts-bedrock/test/L1/BatchInbox.t.sol +++ b/packages/contracts-bedrock/test/L1/BatchInbox.t.sol @@ -12,7 +12,8 @@ import { Proxy } from "src/universal/Proxy.sol"; import { ProxyAdmin } from "src/universal/ProxyAdmin.sol"; import { IBatchAuthenticator } from "interfaces/L1/IBatchAuthenticator.sol"; import { IEspressoTEEVerifier } from "@espresso-tee-contracts/interface/IEspressoTEEVerifier.sol"; -import { MockEspressoTEEVerifier } from "./BatchAuthenticator.t.sol"; +import { IEspressoNitroTEEVerifier } from "@espresso-tee-contracts/interface/IEspressoNitroTEEVerifier.sol"; +import { MockEspressoTEEVerifier } from "test/mocks/MockEspressoTEEVerifiers.sol"; /// @notice Test helper contract that extends BatchAuthenticator to allow direct setting of validBatchInfo. /// This bypasses signature verification for testing purposes. @@ -39,7 +40,7 @@ contract BatchInbox_Test is Test { address public unauthorized = address(0xDEAD); function setUp() public virtual { - teeVerifier = new MockEspressoTEEVerifier(); + teeVerifier = new MockEspressoTEEVerifier(IEspressoNitroTEEVerifier(address(0))); // Deploy TestBatchAuthenticator via proxy. TestBatchAuthenticator impl = new TestBatchAuthenticator(); @@ -48,13 +49,14 @@ contract BatchInbox_Test is Test { vm.prank(deployer); proxyAdmin.setProxyType(address(proxy), ProxyAdmin.ProxyType.ERC1967); bytes memory initData = abi.encodeCall( - BatchAuthenticator.initialize, (IEspressoTEEVerifier(address(teeVerifier)), teeBatcher, nonTeeBatcher) + BatchAuthenticator.initialize, + (IEspressoTEEVerifier(address(teeVerifier)), teeBatcher, nonTeeBatcher, deployer) ); vm.prank(deployer); proxyAdmin.upgradeAndCall(payable(address(proxy)), address(impl), initData); authenticator = TestBatchAuthenticator(address(proxy)); - inbox = new BatchInbox(IBatchAuthenticator(address(authenticator)), deployer); + inbox = new BatchInbox(IBatchAuthenticator(address(authenticator))); } } @@ -203,3 +205,85 @@ contract BatchInbox_Fallback_Test is BatchInbox_Test { assertEq(string(returnData), string(abi.encodeWithSignature("Error(string)", expectedError))); } } + +/// @title BatchInbox_BlobBatch_Test +/// @notice Tests for blob batch handling +contract BatchInbox_BlobBatch_Test is BatchInbox_Test { + /// @notice Test that TEE batcher succeeds with valid blob batch authentication + /// @dev Verifies that blobhash() works correctly when called from BatchAuthenticator + function test_fallback_teeBatcherSucceedsWithValidBlobAuth() external { + // TEE batcher is active by default + + // Create test blob hashes + bytes32 blobHash1 = keccak256("blob1"); + bytes32 blobHash2 = keccak256("blob2"); + + // Calculate the expected concatenated hash + bytes memory concatenatedHashes = bytes.concat(blobHash1, blobHash2); + bytes32 expectedHash = keccak256(concatenatedHashes); + + // Set the hash as valid in authenticator + authenticator.setValidBatchInfo(expectedHash, true); + + // Set blob hashes for this transaction using Foundry's cheatcode + bytes32[] memory blobHashes = new bytes32[](2); + blobHashes[0] = blobHash1; + blobHashes[1] = blobHash2; + vm.blobhashes(blobHashes); + + // TEE batcher should succeed with valid blob authentication + vm.prank(teeBatcher); + (bool success,) = address(inbox).call(""); + assertTrue(success, "TEE batcher should succeed with valid blob auth"); + } + + /// @notice Test that TEE batcher reverts with invalid blob authentication + function test_fallback_teeBatcherRevertsWithInvalidBlobAuth() external { + // TEE batcher is active by default + + // Create test blob hashes + bytes32 blobHash1 = keccak256("blob1"); + bytes32 blobHash2 = keccak256("blob2"); + + // Calculate hash but DON'T set it as valid + bytes memory concatenatedHashes = bytes.concat(blobHash1, blobHash2); + bytes32 expectedHash = keccak256(concatenatedHashes); + authenticator.setValidBatchInfo(expectedHash, false); + + // Set blob hashes + bytes32[] memory blobHashes = new bytes32[](2); + blobHashes[0] = blobHash1; + blobHashes[1] = blobHash2; + vm.blobhashes(blobHashes); + + // TEE batcher should revert + vm.prank(teeBatcher); + (bool success, bytes memory returnData) = address(inbox).call(""); + assertFalse(success, "Should revert with invalid blob auth"); + assertEq(string(returnData), string(abi.encodeWithSignature("Error(string)", "Invalid blob batch"))); + } + + /// @notice Test that blob batch with single blob works + function test_fallback_teeBatcherSucceedsWithSingleBlob() external { + // TEE batcher is active by default + + // Create single test blob hash + bytes32 blobHash1 = keccak256("single-blob"); + + // For single blob, the hash is just the blob hash itself (no concatenation) + bytes32 expectedHash = keccak256(abi.encodePacked(blobHash1)); + + // Set the hash as valid in authenticator + authenticator.setValidBatchInfo(expectedHash, true); + + // Set single blob hash + bytes32[] memory blobHashes = new bytes32[](1); + blobHashes[0] = blobHash1; + vm.blobhashes(blobHashes); + + // TEE batcher should succeed + vm.prank(teeBatcher); + (bool success,) = address(inbox).call(""); + assertTrue(success, "TEE batcher should succeed with single blob"); + } +} diff --git a/packages/contracts-bedrock/test/mocks/MockEspressoTEEVerifiers.sol b/packages/contracts-bedrock/test/mocks/MockEspressoTEEVerifiers.sol new file mode 100644 index 00000000000..c3ed5932f81 --- /dev/null +++ b/packages/contracts-bedrock/test/mocks/MockEspressoTEEVerifiers.sol @@ -0,0 +1,180 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import { IEspressoTEEVerifier } from "@espresso-tee-contracts/interface/IEspressoTEEVerifier.sol"; +import { IEspressoNitroTEEVerifier } from "@espresso-tee-contracts/interface/IEspressoNitroTEEVerifier.sol"; +import { IEspressoSGXTEEVerifier } from "@espresso-tee-contracts/interface/IEspressoSGXTEEVerifier.sol"; +import { ServiceType } from "@espresso-tee-contracts/types/Types.sol"; +import { INitroEnclaveVerifier } from "aws-nitro-enclave-attestation/interfaces/INitroEnclaveVerifier.sol"; + +/// @notice Mock implementation of IEspressoNitroTEEVerifier for testing without real attestation verification. +/// Used by deployment scripts and tests. +contract MockEspressoNitroTEEVerifier is IEspressoNitroTEEVerifier { + address internal _teeVerifier; + mapping(ServiceType => mapping(address => bool)) private _registeredServices; + + constructor() { } + + function isSignerValid(address signer, ServiceType service) external view override returns (bool) { + // Special condition for test TestE2eDevnetWithUnattestedBatcherKey + if (signer == address(0xe16d5c4080C0faD6D2Ef4eb07C657674a217271C)) { + return false; + } + // If signer was explicitly registered, return true + if (_registeredServices[service][signer]) { + return true; + } + // Default permissive behavior for deployment scripts (when no signers registered) + // This allows the mock to work in both test (explicit registration) and deploy (permissive) modes + return true; + } + + function registeredEnclaveHash(bytes32, ServiceType) external pure override returns (bool) { + return true; + } + + function registerService(bytes calldata attestation, bytes calldata, ServiceType service) external override { + if (attestation.length >= 20) { + address signer = address(uint160(bytes20(attestation[:20]))); + _registeredServices[service][signer] = true; + } + } + + function setEnclaveHash(bytes32, bool, ServiceType) external override { } + + function deleteEnclaveHashes(bytes32[] memory, ServiceType) external override { } + + function setNitroEnclaveVerifier(address) external override { } + + function nitroEnclaveVerifier() external pure override returns (INitroEnclaveVerifier) { + return INitroEnclaveVerifier(address(0)); + } + + function teeVerifier() external view override returns (address) { + return _teeVerifier; + } + + /// @notice Test helper to directly set registered signer status for a service type. + function setRegisteredSigner(address signer, bool value, ServiceType service) external { + _registeredServices[service][signer] = value; + } + + /// @notice Test helper to directly set registered signer status (defaults to BatchPoster). + function setRegisteredSigner(address signer, bool value) external { + _registeredServices[ServiceType.BatchPoster][signer] = value; + } +} + +/// @notice Mock implementation of IEspressoTEEVerifier for testing. +/// Can optionally wrap a MockEspressoNitroTEEVerifier or act as its own Nitro verifier. +contract MockEspressoTEEVerifier is IEspressoTEEVerifier, IEspressoNitroTEEVerifier { + IEspressoNitroTEEVerifier private _nitroVerifier; + mapping(ServiceType => mapping(address => bool)) private _registeredServices; + bool private _useExternalNitroVerifier; + + /// @notice Constructor that optionally takes an external Nitro verifier. + /// @param nitroVerifier_ The external Nitro verifier to use. If address(0), acts as standalone. + constructor(IEspressoNitroTEEVerifier nitroVerifier_) { + if (address(nitroVerifier_) != address(0)) { + _nitroVerifier = nitroVerifier_; + _useExternalNitroVerifier = true; + } else { + _useExternalNitroVerifier = false; + } + } + + // ============ IEspressoTEEVerifier Implementation ============ + + function espressoNitroTEEVerifier() external view override returns (IEspressoNitroTEEVerifier) { + if (_useExternalNitroVerifier) { + return _nitroVerifier; + } + return this; + } + + function espressoSGXTEEVerifier() external pure override returns (IEspressoSGXTEEVerifier) { + return IEspressoSGXTEEVerifier(address(0)); + } + + function verify(bytes memory, bytes32, TeeType teeType, ServiceType) external pure override returns (bool) { + if (teeType != TeeType.NITRO) { + return false; + } + return true; + } + + function registerService( + bytes calldata attestation, + bytes calldata, + TeeType teeType, + ServiceType serviceType + ) + external + override + { + require(teeType == TeeType.NITRO, "MockEspressoTEEVerifier: only NITRO supported"); + if (attestation.length >= 20) { + address signer = address(uint160(bytes20(attestation[:20]))); + _registeredServices[serviceType][signer] = true; + } + } + + function registeredEnclaveHashes(bytes32, TeeType, ServiceType) external pure override returns (bool) { + return false; + } + + function setEspressoSGXTEEVerifier(IEspressoSGXTEEVerifier) external override { } + + function setEspressoNitroTEEVerifier(IEspressoNitroTEEVerifier verifier) external override { + _nitroVerifier = verifier; + _useExternalNitroVerifier = address(verifier) != address(0); + } + + function setEnclaveHash(bytes32, bool, TeeType, ServiceType) external override { } + + function deleteEnclaveHashes(bytes32[] memory, TeeType, ServiceType) external override { } + + function setQuoteVerifier(address) external override { } + + function setNitroEnclaveVerifier(address) external override(IEspressoNitroTEEVerifier, IEspressoTEEVerifier) { } + + // ============ IEspressoNitroTEEVerifier Implementation (for standalone mode) ============ + + function isSignerValid(address signer, ServiceType service) external view override returns (bool) { + return _registeredServices[service][signer]; + } + + function registeredEnclaveHash(bytes32, ServiceType) external pure override returns (bool) { + return false; + } + + function registerService(bytes calldata attestation, bytes calldata, ServiceType service) external override { + if (attestation.length >= 20) { + address signer = address(uint160(bytes20(attestation[:20]))); + _registeredServices[service][signer] = true; + } + } + + function setEnclaveHash(bytes32, bool, ServiceType) external pure override { } + + function deleteEnclaveHashes(bytes32[] memory, ServiceType) external pure override { } + + function nitroEnclaveVerifier() external pure override returns (INitroEnclaveVerifier) { + return INitroEnclaveVerifier(address(0)); + } + + function teeVerifier() external view override returns (address) { + return address(this); + } + + // ============ Test Helpers ============ + + /// @notice Test helper to directly set registered signer status. + function setRegisteredSigner(address signer, bool value) external { + if (value) { + _registeredServices[ServiceType.BatchPoster][signer] = true; + } else { + revert("MockEspressoTEEVerifier: unregistering not supported"); + } + } +}