gsnforwarder

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2023 License: LGPL-3.0 Imports: 16 Imported by: 2

README

GSN Forwarder Contract Code

Solidity Code We Used

The github repo doesn't contain what's needed to create a byte-compatible contract to what is deployed. We used etherscan's API's to download the source solidity files validated by them. Note that etherscan only does partial validation which does not include the metadata, so the actual source code used may differ some, but it will generated the same byte code.

We built with the same solidity compiler (0.8.7), same optimization flags, and same file paths and were able to get identical byte code except for the contract metadata at the end.

Documentation

Index

Constants

View Source
const (
	MainnetForwarderAddrHex = "0xB2b5841DBeF766d4b521221732F9B618fCf34A87"
	GoerliForwarderAddrHex  = MainnetForwarderAddrHex
	SepoliaForwarderAddrHex = "0x0A3bcecbf4987f917a4C1aa75376671B54a0a2d8"
)

Note: Mainnet and Goerli forwarder contracts were deployed by opengsn and have the same address. The sepolia contract was deployed by us.

View Source
const ExpectedForwarderByteCodeHex = "" //nolint:lll

/* 9892-byte string literal not displayed */

ExpectedForwarderByteCodeHex is created by deploying the contract, reading it back, and then removing the metadata appended on the end.

Variables

View Source
var (
	DefaultName            = "Forwarder"
	DefaultVersion         = "0.0.1"
	ForwardRequestTypehash = crypto.Keccak256Hash(
		[]byte("ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data,uint256 validUntilTime)"),
	)
)
View Source
var ForwarderABI = ForwarderMetaData.ABI

ForwarderABI is the input ABI used to generate the binding from. Deprecated: Use ForwarderMetaData.ABI instead.

View Source
var ForwarderBin = ForwarderMetaData.Bin

ForwarderBin is the compiled bytecode used for deploying new contracts. Deprecated: Use ForwarderMetaData.Bin instead.

View Source
var ForwarderMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"domainSeparator\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"domainValue\",\"type\":\"bytes\"}],\"name\":\"DomainRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"typeHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"typeStr\",\"type\":\"string\"}],\"name\":\"RequestTypeRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"EIP712_DOMAIN_TYPE\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GENERIC_PARAMS\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"validUntilTime\",\"type\":\"uint256\"}],\"internalType\":\"structIForwarder.ForwardRequest\",\"name\":\"req\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"requestTypeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"suffixData\",\"type\":\"bytes\"}],\"name\":\"_getEncoded\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"domains\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"validUntilTime\",\"type\":\"uint256\"}],\"internalType\":\"structIForwarder.ForwardRequest\",\"name\":\"req\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"domainSeparator\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"requestTypeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"suffixData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sig\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"ret\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"getNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"registerDomainSeparator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"typeName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"typeSuffix\",\"type\":\"string\"}],\"name\":\"registerRequestType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"typeHashes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"validUntilTime\",\"type\":\"uint256\"}],\"internalType\":\"structIForwarder.ForwardRequest\",\"name\":\"req\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"domainSeparator\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"requestTypeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"suffixData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sig\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
	Bin: "0x60806040523480156200001157600080fd5b5060006040518060a00160405280606181526020016200150b60619139604051602001620000409190620000c8565b60408051601f1981840301815291905290506200005d8162000064565b5062000174565b8051602080830191909120600081815291829052604091829020805460ff19166001179055905181907f64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb20290620000bc9085906200010c565b60405180910390a25050565b6e08cdee4eec2e4c8a4cae2eacae6e85608b1b815260008251620000f481600f85016020870162000141565b602960f81b600f939091019283015250601001919050565b60208152600082518060208401526200012d81604085016020870162000141565b601f01601f19169190910160400192915050565b60005b838110156200015e57818101518382015260200162000144565b838111156200016e576000848401525b50505050565b61138780620001846000396000f3fe6080604052600436106100a05760003560e01c8063ad9f99c711610064578063ad9f99c714610199578063c3f28abd146101b9578063c722f177146101ce578063d9210be5146101fe578063e024dc7f1461021e578063e2b62f2d1461023f57600080fd5b806301ffc9a7146100ac578063066a310c146100e157806321fe98df146101035780632d0335ab146101335780639c7b45921461017757600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c7366004610e84565b61025f565b60405190151581526020015b60405180910390f35b3480156100ed57600080fd5b506100f6610296565b6040516100d8919061115e565b34801561010f57600080fd5b506100cc61011e366004610e6b565b60006020819052908152604090205460ff1681565b34801561013f57600080fd5b5061016961014e366004610e3b565b6001600160a01b031660009081526002602052604090205490565b6040519081526020016100d8565b34801561018357600080fd5b50610197610192366004610eae565b6102b2565b005b3480156101a557600080fd5b506101976101b4366004610f1a565b6103a9565b3480156101c557600080fd5b506100f66103ca565b3480156101da57600080fd5b506100cc6101e9366004610e6b565b60016020526000908152604090205460ff1681565b34801561020a57600080fd5b50610197610219366004610eae565b6103e6565b61023161022c366004610f1a565b6104e9565b6040516100d892919061113b565b34801561024b57600080fd5b506100f661025a366004610fc2565b610700565b60006001600160e01b031982166309788f9960e21b148061029057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6040518060a001604052806061815260200161129f6061913981565b60004690506000604051806080016040528060528152602001611300605291398051906020012086866040516102e9929190611097565b60405180910390208585604051610301929190611097565b6040805191829003822060208301949094528101919091526060810191909152608081018390523060a082015260c00160408051601f198184030181528282528051602080830191909120600081815260019283905293909320805460ff1916909117905592509081907f4bc68689cbe89a4a6333a3ab0a70093874da3e5bfb71e93102027f3f073687d89061039890859061115e565b60405180910390a250505050505050565b6103b28761079a565b6103c187878787878787610817565b50505050505050565b6040518060800160405280605281526020016113006052913981565b60005b8381101561049457600085858381811061040557610405611288565b909101356001600160f81b031916915050600560fb1b81148015906104385750602960f81b6001600160f81b0319821614155b6104815760405162461bcd60e51b81526020600482015260156024820152744657443a20696e76616c696420747970656e616d6560581b60448201526064015b60405180910390fd5b508061048c81611241565b9150506103e9565b50600084846040518060a001604052806061815260200161129f6061913985856040516020016104c89594939291906110e9565b60405160208183030381529060405290506104e2816109e9565b5050505050565b600060606104fc89898989898989610817565b61050589610a4b565b60c089013515806105195750428960c00135115b61055c5760405162461bcd60e51b81526020600482015260146024820152731195d10e881c995c5d595cdd08195e1c1a5c995960621b6044820152606401610478565b600060408a01351561056d5750619c405b600061057c60a08c018c611171565b61058960208e018e610e3b565b60405160200161059b939291906110a7565b60408051601f1981840301815291905290506105bb8260608d01356111b8565b60405a6105c990603f6111f2565b6105d391906111d0565b10156106195760405162461bcd60e51b81526020600482015260156024820152744657443a20696e73756666696369656e742067617360581b6044820152606401610478565b61062960408c0160208d01610e3b565b6001600160a01b03168b606001358c604001358360405161064a91906110cd565b600060405180830381858888f193505050503d8060008114610688576040519150601f19603f3d011682016040523d82523d6000602084013e61068d565b606091505b50909450925060408b0135158015906106a65750600047115b156106f2576106b860208c018c610e3b565b6001600160a01b03166108fc479081150290604051600060405180830381858888f193505050501580156106f0573d6000803e3d6000fd5b505b505097509795505050505050565b6060836107106020870187610e3b565b6001600160a01b03166107296040880160208901610e3b565b6001600160a01b03166040880135606089013560808a013561074e60a08c018c611171565b60405161075c929190611097565b6040519081900381206107819796959493929160c08e0135908c908c90602001611045565b6040516020818303038152906040529050949350505050565b6080810135600260006107b06020850185610e3b565b6001600160a01b03166001600160a01b0316815260200190815260200160002054146108145760405162461bcd60e51b815260206004820152601360248201527208cae887440dcdedcc6ca40dad2e6dac2e8c6d606b1b6044820152606401610478565b50565b60008681526001602052604090205460ff166108755760405162461bcd60e51b815260206004820152601d60248201527f4657443a20756e7265676973746572656420646f6d61696e207365702e0000006044820152606401610478565b60008581526020819052604090205460ff166108d35760405162461bcd60e51b815260206004820152601a60248201527f4657443a20756e726567697374657265642074797065686173680000000000006044820152606401610478565b6000866108e289888888610700565b805160209182012060405161090e93920161190160f01b81526002810192909252602282015260420190565b60408051601f1981840301815291905280516020909101209050321580610993575061093d6020890189610e3b565b6001600160a01b031661098884848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508693925050610acf9050565b6001600160a01b0316145b6109df5760405162461bcd60e51b815260206004820152601760248201527f4657443a207369676e6174757265206d69736d617463680000000000000000006044820152606401610478565b5050505050505050565b8051602080830191909120600081815291829052604091829020805460ff19166001179055905181907f64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb20290610a3f90859061115e565b60405180910390a25050565b608081013560026000610a616020850185610e3b565b6001600160a01b0316815260208101919091526040016000908120805491610a8883611241565b91905055146108145760405162461bcd60e51b815260206004820152601360248201527208cae887440dcdedcc6ca40dad2e6dac2e8c6d606b1b6044820152606401610478565b6000806000610ade8585610af3565b91509150610aeb81610b39565b509392505050565b600080825160411415610b2a5760208301516040840151606085015160001a610b1e87828585610cf4565b94509450505050610b32565b506000905060025b9250929050565b6000816004811115610b4d57610b4d611272565b1415610b565750565b6001816004811115610b6a57610b6a611272565b1415610bb85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610478565b6002816004811115610bcc57610bcc611272565b1415610c1a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610478565b6003816004811115610c2e57610c2e611272565b1415610c875760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610478565b6004816004811115610c9b57610c9b611272565b14156108145760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610478565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610d2b5750600090506003610dd8565b8460ff16601b14158015610d4357508460ff16601c14155b15610d545750600090506004610dd8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610da8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610dd157600060019250925050610dd8565b9150600090505b94509492505050565b60008083601f840112610df357600080fd5b50813567ffffffffffffffff811115610e0b57600080fd5b602083019150836020828501011115610b3257600080fd5b600060e08284031215610e3557600080fd5b50919050565b600060208284031215610e4d57600080fd5b81356001600160a01b0381168114610e6457600080fd5b9392505050565b600060208284031215610e7d57600080fd5b5035919050565b600060208284031215610e9657600080fd5b81356001600160e01b031981168114610e6457600080fd5b60008060008060408587031215610ec457600080fd5b843567ffffffffffffffff80821115610edc57600080fd5b610ee888838901610de1565b90965094506020870135915080821115610f0157600080fd5b50610f0e87828801610de1565b95989497509550505050565b600080600080600080600060a0888a031215610f3557600080fd5b873567ffffffffffffffff80821115610f4d57600080fd5b610f598b838c01610e23565b985060208a0135975060408a0135965060608a0135915080821115610f7d57600080fd5b610f898b838c01610de1565b909650945060808a0135915080821115610fa257600080fd5b50610faf8a828b01610de1565b989b979a50959850939692959293505050565b60008060008060608587031215610fd857600080fd5b843567ffffffffffffffff80821115610ff057600080fd5b610ffc88838901610e23565b9550602087013594506040870135915080821115610f0157600080fd5b60008151808452611031816020860160208601611211565b601f01601f19169290920160200192915050565b8a81528960208201528860408201528760608201528660808201528560a08201528460c08201528360e082015260006101008385828501376000929093019092019081529a9950505050505050505050565b8183823760009101908152919050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600082516110df818460208701611211565b9190910192915050565b84868237600085820160008152600560fb1b81528551611110816001840160208a01611211565b600b60fa1b600192909101918201528385600283013760009301600201928352509095945050505050565b82151581526040602082015260006111566040830184611019565b949350505050565b602081526000610e646020830184611019565b6000808335601e1984360301811261118857600080fd5b83018035915067ffffffffffffffff8211156111a357600080fd5b602001915036819003821315610b3257600080fd5b600082198211156111cb576111cb61125c565b500190565b6000826111ed57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561120c5761120c61125c565b500290565b60005b8381101561122c578181015183820152602001611214565b8381111561123b576000848401525b50505050565b60006000198214156112555761125561125c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fdfe616464726573732066726f6d2c6164647265737320746f2c75696e743235362076616c75652c75696e74323536206761732c75696e74323536206e6f6e63652c627974657320646174612c75696e743235362076616c6964556e74696c54696d65454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429a264697066735822122003b3a2e969dc2974e43a08d29671da9ef2ad80429e65e7bf2bc59dc7f0f61ef064736f6c63430008070033616464726573732066726f6d2c6164647265737320746f2c75696e743235362076616c75652c75696e74323536206761732c75696e74323536206e6f6e63652c627974657320646174612c75696e743235362076616c6964556e74696c54696d65",
}

ForwarderMetaData contains all meta data concerning the Forwarder contract.

View Source
var IForwarderABI = IForwarderMetaData.ABI

IForwarderABI is the input ABI used to generate the binding from. Deprecated: Use IForwarderMetaData.ABI instead.

View Source
var IForwarderMetaData = &bind.MetaData{
	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"domainSeparator\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"domainValue\",\"type\":\"bytes\"}],\"name\":\"DomainRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"typeHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"typeStr\",\"type\":\"string\"}],\"name\":\"RequestTypeRegistered\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"validUntilTime\",\"type\":\"uint256\"}],\"internalType\":\"structIForwarder.ForwardRequest\",\"name\":\"forwardRequest\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"domainSeparator\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"requestTypeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"suffixData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"ret\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"getNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"registerDomainSeparator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"typeName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"typeSuffix\",\"type\":\"string\"}],\"name\":\"registerRequestType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"validUntilTime\",\"type\":\"uint256\"}],\"internalType\":\"structIForwarder.ForwardRequest\",\"name\":\"forwardRequest\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"domainSeparator\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"requestTypeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"suffixData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verify\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}]",
}

IForwarderMetaData contains all meta data concerning the IForwarder contract.

Functions

func CheckForwarderContractCode added in v0.2.0

func CheckForwarderContractCode(
	ctx context.Context,
	ec *ethclient.Client,
	contractAddr ethcommon.Address,
) error

CheckForwarderContractCode checks that the trusted forwarder contract used by the given swap contract has the expected bytecode.

Types

type Forwarder

type Forwarder struct {
	ForwarderCaller     // Read-only binding to the contract
	ForwarderTransactor // Write-only binding to the contract
	ForwarderFilterer   // Log filterer for contract events
}

Forwarder is an auto generated Go binding around an Ethereum contract.

func DeployForwarder

func DeployForwarder(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Forwarder, error)

DeployForwarder deploys a new Ethereum contract, binding an instance of Forwarder to it.

func NewForwarder

func NewForwarder(address common.Address, backend bind.ContractBackend) (*Forwarder, error)

NewForwarder creates a new instance of Forwarder, bound to a specific deployed contract.

type ForwarderCaller

type ForwarderCaller struct {
	// contains filtered or unexported fields
}

ForwarderCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewForwarderCaller

func NewForwarderCaller(address common.Address, caller bind.ContractCaller) (*ForwarderCaller, error)

NewForwarderCaller creates a new read-only instance of Forwarder, bound to a specific deployed contract.

func (*ForwarderCaller) Domains

func (_Forwarder *ForwarderCaller) Domains(opts *bind.CallOpts, arg0 [32]byte) (bool, error)

Domains is a free data retrieval call binding the contract method 0xc722f177.

Solidity: function domains(bytes32 ) view returns(bool)

func (*ForwarderCaller) EIP712DOMAINTYPE

func (_Forwarder *ForwarderCaller) EIP712DOMAINTYPE(opts *bind.CallOpts) (string, error)

EIP712DOMAINTYPE is a free data retrieval call binding the contract method 0xc3f28abd.

Solidity: function EIP712_DOMAIN_TYPE() view returns(string)

func (*ForwarderCaller) GENERICPARAMS

func (_Forwarder *ForwarderCaller) GENERICPARAMS(opts *bind.CallOpts) (string, error)

GENERICPARAMS is a free data retrieval call binding the contract method 0x066a310c.

Solidity: function GENERIC_PARAMS() view returns(string)

func (*ForwarderCaller) GetEncoded

func (_Forwarder *ForwarderCaller) GetEncoded(opts *bind.CallOpts, req IForwarderForwardRequest, requestTypeHash [32]byte, suffixData []byte) ([]byte, error)

GetEncoded is a free data retrieval call binding the contract method 0xe2b62f2d.

Solidity: function _getEncoded((address,address,uint256,uint256,uint256,bytes,uint256) req, bytes32 requestTypeHash, bytes suffixData) pure returns(bytes)

func (*ForwarderCaller) GetNonce

func (_Forwarder *ForwarderCaller) GetNonce(opts *bind.CallOpts, from common.Address) (*big.Int, error)

GetNonce is a free data retrieval call binding the contract method 0x2d0335ab.

Solidity: function getNonce(address from) view returns(uint256)

func (*ForwarderCaller) SupportsInterface

func (_Forwarder *ForwarderCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error)

SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.

Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)

func (*ForwarderCaller) TypeHashes

func (_Forwarder *ForwarderCaller) TypeHashes(opts *bind.CallOpts, arg0 [32]byte) (bool, error)

TypeHashes is a free data retrieval call binding the contract method 0x21fe98df.

Solidity: function typeHashes(bytes32 ) view returns(bool)

func (*ForwarderCaller) Verify

func (_Forwarder *ForwarderCaller) Verify(opts *bind.CallOpts, req IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, sig []byte) error

Verify is a free data retrieval call binding the contract method 0xad9f99c7.

Solidity: function verify((address,address,uint256,uint256,uint256,bytes,uint256) req, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes sig) view returns()

type ForwarderCallerRaw

type ForwarderCallerRaw struct {
	Contract *ForwarderCaller // Generic read-only contract binding to access the raw methods on
}

ForwarderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*ForwarderCallerRaw) Call

func (_Forwarder *ForwarderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type ForwarderCallerSession

type ForwarderCallerSession struct {
	Contract *ForwarderCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts    // Call options to use throughout this session
}

ForwarderCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*ForwarderCallerSession) Domains

func (_Forwarder *ForwarderCallerSession) Domains(arg0 [32]byte) (bool, error)

Domains is a free data retrieval call binding the contract method 0xc722f177.

Solidity: function domains(bytes32 ) view returns(bool)

func (*ForwarderCallerSession) EIP712DOMAINTYPE

func (_Forwarder *ForwarderCallerSession) EIP712DOMAINTYPE() (string, error)

EIP712DOMAINTYPE is a free data retrieval call binding the contract method 0xc3f28abd.

Solidity: function EIP712_DOMAIN_TYPE() view returns(string)

func (*ForwarderCallerSession) GENERICPARAMS

func (_Forwarder *ForwarderCallerSession) GENERICPARAMS() (string, error)

GENERICPARAMS is a free data retrieval call binding the contract method 0x066a310c.

Solidity: function GENERIC_PARAMS() view returns(string)

func (*ForwarderCallerSession) GetEncoded

func (_Forwarder *ForwarderCallerSession) GetEncoded(req IForwarderForwardRequest, requestTypeHash [32]byte, suffixData []byte) ([]byte, error)

GetEncoded is a free data retrieval call binding the contract method 0xe2b62f2d.

Solidity: function _getEncoded((address,address,uint256,uint256,uint256,bytes,uint256) req, bytes32 requestTypeHash, bytes suffixData) pure returns(bytes)

func (*ForwarderCallerSession) GetNonce

func (_Forwarder *ForwarderCallerSession) GetNonce(from common.Address) (*big.Int, error)

GetNonce is a free data retrieval call binding the contract method 0x2d0335ab.

Solidity: function getNonce(address from) view returns(uint256)

func (*ForwarderCallerSession) SupportsInterface

func (_Forwarder *ForwarderCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error)

SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.

Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)

func (*ForwarderCallerSession) TypeHashes

func (_Forwarder *ForwarderCallerSession) TypeHashes(arg0 [32]byte) (bool, error)

TypeHashes is a free data retrieval call binding the contract method 0x21fe98df.

Solidity: function typeHashes(bytes32 ) view returns(bool)

func (*ForwarderCallerSession) Verify

func (_Forwarder *ForwarderCallerSession) Verify(req IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, sig []byte) error

Verify is a free data retrieval call binding the contract method 0xad9f99c7.

Solidity: function verify((address,address,uint256,uint256,uint256,bytes,uint256) req, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes sig) view returns()

type ForwarderDomainRegistered

type ForwarderDomainRegistered struct {
	DomainSeparator [32]byte
	DomainValue     []byte
	Raw             types.Log // Blockchain specific contextual infos
}

ForwarderDomainRegistered represents a DomainRegistered event raised by the Forwarder contract.

type ForwarderDomainRegisteredIterator

type ForwarderDomainRegisteredIterator struct {
	Event *ForwarderDomainRegistered // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

ForwarderDomainRegisteredIterator is returned from FilterDomainRegistered and is used to iterate over the raw logs and unpacked data for DomainRegistered events raised by the Forwarder contract.

func (*ForwarderDomainRegisteredIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*ForwarderDomainRegisteredIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*ForwarderDomainRegisteredIterator) Next

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.

type ForwarderFilterer

type ForwarderFilterer struct {
	// contains filtered or unexported fields
}

ForwarderFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewForwarderFilterer

func NewForwarderFilterer(address common.Address, filterer bind.ContractFilterer) (*ForwarderFilterer, error)

NewForwarderFilterer creates a new log filterer instance of Forwarder, bound to a specific deployed contract.

func (*ForwarderFilterer) FilterDomainRegistered

func (_Forwarder *ForwarderFilterer) FilterDomainRegistered(opts *bind.FilterOpts, domainSeparator [][32]byte) (*ForwarderDomainRegisteredIterator, error)

FilterDomainRegistered is a free log retrieval operation binding the contract event 0x4bc68689cbe89a4a6333a3ab0a70093874da3e5bfb71e93102027f3f073687d8.

Solidity: event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue)

func (*ForwarderFilterer) FilterRequestTypeRegistered

func (_Forwarder *ForwarderFilterer) FilterRequestTypeRegistered(opts *bind.FilterOpts, typeHash [][32]byte) (*ForwarderRequestTypeRegisteredIterator, error)

FilterRequestTypeRegistered is a free log retrieval operation binding the contract event 0x64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb202.

Solidity: event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr)

func (*ForwarderFilterer) ParseDomainRegistered

func (_Forwarder *ForwarderFilterer) ParseDomainRegistered(log types.Log) (*ForwarderDomainRegistered, error)

ParseDomainRegistered is a log parse operation binding the contract event 0x4bc68689cbe89a4a6333a3ab0a70093874da3e5bfb71e93102027f3f073687d8.

Solidity: event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue)

func (*ForwarderFilterer) ParseRequestTypeRegistered

func (_Forwarder *ForwarderFilterer) ParseRequestTypeRegistered(log types.Log) (*ForwarderRequestTypeRegistered, error)

ParseRequestTypeRegistered is a log parse operation binding the contract event 0x64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb202.

Solidity: event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr)

func (*ForwarderFilterer) WatchDomainRegistered

func (_Forwarder *ForwarderFilterer) WatchDomainRegistered(opts *bind.WatchOpts, sink chan<- *ForwarderDomainRegistered, domainSeparator [][32]byte) (event.Subscription, error)

WatchDomainRegistered is a free log subscription operation binding the contract event 0x4bc68689cbe89a4a6333a3ab0a70093874da3e5bfb71e93102027f3f073687d8.

Solidity: event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue)

func (*ForwarderFilterer) WatchRequestTypeRegistered

func (_Forwarder *ForwarderFilterer) WatchRequestTypeRegistered(opts *bind.WatchOpts, sink chan<- *ForwarderRequestTypeRegistered, typeHash [][32]byte) (event.Subscription, error)

WatchRequestTypeRegistered is a free log subscription operation binding the contract event 0x64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb202.

Solidity: event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr)

type ForwarderRaw

type ForwarderRaw struct {
	Contract *Forwarder // Generic contract binding to access the raw methods on
}

ForwarderRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*ForwarderRaw) Call

func (_Forwarder *ForwarderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*ForwarderRaw) Transact

func (_Forwarder *ForwarderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*ForwarderRaw) Transfer

func (_Forwarder *ForwarderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ForwarderRequestTypeRegistered

type ForwarderRequestTypeRegistered struct {
	TypeHash [32]byte
	TypeStr  string
	Raw      types.Log // Blockchain specific contextual infos
}

ForwarderRequestTypeRegistered represents a RequestTypeRegistered event raised by the Forwarder contract.

type ForwarderRequestTypeRegisteredIterator

type ForwarderRequestTypeRegisteredIterator struct {
	Event *ForwarderRequestTypeRegistered // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

ForwarderRequestTypeRegisteredIterator is returned from FilterRequestTypeRegistered and is used to iterate over the raw logs and unpacked data for RequestTypeRegistered events raised by the Forwarder contract.

func (*ForwarderRequestTypeRegisteredIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*ForwarderRequestTypeRegisteredIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*ForwarderRequestTypeRegisteredIterator) Next

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.

type ForwarderSession

type ForwarderSession struct {
	Contract     *Forwarder        // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

ForwarderSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*ForwarderSession) Domains

func (_Forwarder *ForwarderSession) Domains(arg0 [32]byte) (bool, error)

Domains is a free data retrieval call binding the contract method 0xc722f177.

Solidity: function domains(bytes32 ) view returns(bool)

func (*ForwarderSession) EIP712DOMAINTYPE

func (_Forwarder *ForwarderSession) EIP712DOMAINTYPE() (string, error)

EIP712DOMAINTYPE is a free data retrieval call binding the contract method 0xc3f28abd.

Solidity: function EIP712_DOMAIN_TYPE() view returns(string)

func (*ForwarderSession) Execute

func (_Forwarder *ForwarderSession) Execute(req IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, sig []byte) (*types.Transaction, error)

Execute is a paid mutator transaction binding the contract method 0xe024dc7f.

Solidity: function execute((address,address,uint256,uint256,uint256,bytes,uint256) req, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes sig) payable returns(bool success, bytes ret)

func (*ForwarderSession) GENERICPARAMS

func (_Forwarder *ForwarderSession) GENERICPARAMS() (string, error)

GENERICPARAMS is a free data retrieval call binding the contract method 0x066a310c.

Solidity: function GENERIC_PARAMS() view returns(string)

func (*ForwarderSession) GetEncoded

func (_Forwarder *ForwarderSession) GetEncoded(req IForwarderForwardRequest, requestTypeHash [32]byte, suffixData []byte) ([]byte, error)

GetEncoded is a free data retrieval call binding the contract method 0xe2b62f2d.

Solidity: function _getEncoded((address,address,uint256,uint256,uint256,bytes,uint256) req, bytes32 requestTypeHash, bytes suffixData) pure returns(bytes)

func (*ForwarderSession) GetNonce

func (_Forwarder *ForwarderSession) GetNonce(from common.Address) (*big.Int, error)

GetNonce is a free data retrieval call binding the contract method 0x2d0335ab.

Solidity: function getNonce(address from) view returns(uint256)

func (*ForwarderSession) Receive

func (_Forwarder *ForwarderSession) Receive() (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*ForwarderSession) RegisterDomainSeparator

func (_Forwarder *ForwarderSession) RegisterDomainSeparator(name string, version string) (*types.Transaction, error)

RegisterDomainSeparator is a paid mutator transaction binding the contract method 0x9c7b4592.

Solidity: function registerDomainSeparator(string name, string version) returns()

func (*ForwarderSession) RegisterRequestType

func (_Forwarder *ForwarderSession) RegisterRequestType(typeName string, typeSuffix string) (*types.Transaction, error)

RegisterRequestType is a paid mutator transaction binding the contract method 0xd9210be5.

Solidity: function registerRequestType(string typeName, string typeSuffix) returns()

func (*ForwarderSession) SupportsInterface

func (_Forwarder *ForwarderSession) SupportsInterface(interfaceId [4]byte) (bool, error)

SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.

Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)

func (*ForwarderSession) TypeHashes

func (_Forwarder *ForwarderSession) TypeHashes(arg0 [32]byte) (bool, error)

TypeHashes is a free data retrieval call binding the contract method 0x21fe98df.

Solidity: function typeHashes(bytes32 ) view returns(bool)

func (*ForwarderSession) Verify

func (_Forwarder *ForwarderSession) Verify(req IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, sig []byte) error

Verify is a free data retrieval call binding the contract method 0xad9f99c7.

Solidity: function verify((address,address,uint256,uint256,uint256,bytes,uint256) req, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes sig) view returns()

type ForwarderTransactor

type ForwarderTransactor struct {
	// contains filtered or unexported fields
}

ForwarderTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewForwarderTransactor

func NewForwarderTransactor(address common.Address, transactor bind.ContractTransactor) (*ForwarderTransactor, error)

NewForwarderTransactor creates a new write-only instance of Forwarder, bound to a specific deployed contract.

func (*ForwarderTransactor) Execute

func (_Forwarder *ForwarderTransactor) Execute(opts *bind.TransactOpts, req IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, sig []byte) (*types.Transaction, error)

Execute is a paid mutator transaction binding the contract method 0xe024dc7f.

Solidity: function execute((address,address,uint256,uint256,uint256,bytes,uint256) req, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes sig) payable returns(bool success, bytes ret)

func (*ForwarderTransactor) Receive

func (_Forwarder *ForwarderTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*ForwarderTransactor) RegisterDomainSeparator

func (_Forwarder *ForwarderTransactor) RegisterDomainSeparator(opts *bind.TransactOpts, name string, version string) (*types.Transaction, error)

RegisterDomainSeparator is a paid mutator transaction binding the contract method 0x9c7b4592.

Solidity: function registerDomainSeparator(string name, string version) returns()

func (*ForwarderTransactor) RegisterRequestType

func (_Forwarder *ForwarderTransactor) RegisterRequestType(opts *bind.TransactOpts, typeName string, typeSuffix string) (*types.Transaction, error)

RegisterRequestType is a paid mutator transaction binding the contract method 0xd9210be5.

Solidity: function registerRequestType(string typeName, string typeSuffix) returns()

type ForwarderTransactorRaw

type ForwarderTransactorRaw struct {
	Contract *ForwarderTransactor // Generic write-only contract binding to access the raw methods on
}

ForwarderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*ForwarderTransactorRaw) Transact

func (_Forwarder *ForwarderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*ForwarderTransactorRaw) Transfer

func (_Forwarder *ForwarderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ForwarderTransactorSession

type ForwarderTransactorSession struct {
	Contract     *ForwarderTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts    // Transaction auth options to use throughout this session
}

ForwarderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*ForwarderTransactorSession) Execute

func (_Forwarder *ForwarderTransactorSession) Execute(req IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, sig []byte) (*types.Transaction, error)

Execute is a paid mutator transaction binding the contract method 0xe024dc7f.

Solidity: function execute((address,address,uint256,uint256,uint256,bytes,uint256) req, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes sig) payable returns(bool success, bytes ret)

func (*ForwarderTransactorSession) Receive

func (_Forwarder *ForwarderTransactorSession) Receive() (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*ForwarderTransactorSession) RegisterDomainSeparator

func (_Forwarder *ForwarderTransactorSession) RegisterDomainSeparator(name string, version string) (*types.Transaction, error)

RegisterDomainSeparator is a paid mutator transaction binding the contract method 0x9c7b4592.

Solidity: function registerDomainSeparator(string name, string version) returns()

func (*ForwarderTransactorSession) RegisterRequestType

func (_Forwarder *ForwarderTransactorSession) RegisterRequestType(typeName string, typeSuffix string) (*types.Transaction, error)

RegisterRequestType is a paid mutator transaction binding the contract method 0xd9210be5.

Solidity: function registerRequestType(string typeName, string typeSuffix) returns()

type IForwarder

type IForwarder struct {
	IForwarderCaller     // Read-only binding to the contract
	IForwarderTransactor // Write-only binding to the contract
	IForwarderFilterer   // Log filterer for contract events
}

IForwarder is an auto generated Go binding around an Ethereum contract.

func NewIForwarder

func NewIForwarder(address common.Address, backend bind.ContractBackend) (*IForwarder, error)

NewIForwarder creates a new instance of IForwarder, bound to a specific deployed contract.

type IForwarderCaller

type IForwarderCaller struct {
	// contains filtered or unexported fields
}

IForwarderCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewIForwarderCaller

func NewIForwarderCaller(address common.Address, caller bind.ContractCaller) (*IForwarderCaller, error)

NewIForwarderCaller creates a new read-only instance of IForwarder, bound to a specific deployed contract.

func (*IForwarderCaller) GetNonce

func (_IForwarder *IForwarderCaller) GetNonce(opts *bind.CallOpts, from common.Address) (*big.Int, error)

GetNonce is a free data retrieval call binding the contract method 0x2d0335ab.

Solidity: function getNonce(address from) view returns(uint256)

func (*IForwarderCaller) SupportsInterface

func (_IForwarder *IForwarderCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error)

SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.

Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)

func (*IForwarderCaller) Verify

func (_IForwarder *IForwarderCaller) Verify(opts *bind.CallOpts, forwardRequest IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, signature []byte) error

Verify is a free data retrieval call binding the contract method 0xad9f99c7.

Solidity: function verify((address,address,uint256,uint256,uint256,bytes,uint256) forwardRequest, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes signature) view returns()

type IForwarderCallerRaw

type IForwarderCallerRaw struct {
	Contract *IForwarderCaller // Generic read-only contract binding to access the raw methods on
}

IForwarderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*IForwarderCallerRaw) Call

func (_IForwarder *IForwarderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type IForwarderCallerSession

type IForwarderCallerSession struct {
	Contract *IForwarderCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts     // Call options to use throughout this session
}

IForwarderCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*IForwarderCallerSession) GetNonce

func (_IForwarder *IForwarderCallerSession) GetNonce(from common.Address) (*big.Int, error)

GetNonce is a free data retrieval call binding the contract method 0x2d0335ab.

Solidity: function getNonce(address from) view returns(uint256)

func (*IForwarderCallerSession) SupportsInterface

func (_IForwarder *IForwarderCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error)

SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.

Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)

func (*IForwarderCallerSession) Verify

func (_IForwarder *IForwarderCallerSession) Verify(forwardRequest IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, signature []byte) error

Verify is a free data retrieval call binding the contract method 0xad9f99c7.

Solidity: function verify((address,address,uint256,uint256,uint256,bytes,uint256) forwardRequest, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes signature) view returns()

type IForwarderDomainRegistered

type IForwarderDomainRegistered struct {
	DomainSeparator [32]byte
	DomainValue     []byte
	Raw             types.Log // Blockchain specific contextual infos
}

IForwarderDomainRegistered represents a DomainRegistered event raised by the IForwarder contract.

type IForwarderDomainRegisteredIterator

type IForwarderDomainRegisteredIterator struct {
	Event *IForwarderDomainRegistered // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

IForwarderDomainRegisteredIterator is returned from FilterDomainRegistered and is used to iterate over the raw logs and unpacked data for DomainRegistered events raised by the IForwarder contract.

func (*IForwarderDomainRegisteredIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*IForwarderDomainRegisteredIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*IForwarderDomainRegisteredIterator) Next

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.

type IForwarderFilterer

type IForwarderFilterer struct {
	// contains filtered or unexported fields
}

IForwarderFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewIForwarderFilterer

func NewIForwarderFilterer(address common.Address, filterer bind.ContractFilterer) (*IForwarderFilterer, error)

NewIForwarderFilterer creates a new log filterer instance of IForwarder, bound to a specific deployed contract.

func (*IForwarderFilterer) FilterDomainRegistered

func (_IForwarder *IForwarderFilterer) FilterDomainRegistered(opts *bind.FilterOpts, domainSeparator [][32]byte) (*IForwarderDomainRegisteredIterator, error)

FilterDomainRegistered is a free log retrieval operation binding the contract event 0x4bc68689cbe89a4a6333a3ab0a70093874da3e5bfb71e93102027f3f073687d8.

Solidity: event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue)

func (*IForwarderFilterer) FilterRequestTypeRegistered

func (_IForwarder *IForwarderFilterer) FilterRequestTypeRegistered(opts *bind.FilterOpts, typeHash [][32]byte) (*IForwarderRequestTypeRegisteredIterator, error)

FilterRequestTypeRegistered is a free log retrieval operation binding the contract event 0x64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb202.

Solidity: event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr)

func (*IForwarderFilterer) ParseDomainRegistered

func (_IForwarder *IForwarderFilterer) ParseDomainRegistered(log types.Log) (*IForwarderDomainRegistered, error)

ParseDomainRegistered is a log parse operation binding the contract event 0x4bc68689cbe89a4a6333a3ab0a70093874da3e5bfb71e93102027f3f073687d8.

Solidity: event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue)

func (*IForwarderFilterer) ParseRequestTypeRegistered

func (_IForwarder *IForwarderFilterer) ParseRequestTypeRegistered(log types.Log) (*IForwarderRequestTypeRegistered, error)

ParseRequestTypeRegistered is a log parse operation binding the contract event 0x64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb202.

Solidity: event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr)

func (*IForwarderFilterer) WatchDomainRegistered

func (_IForwarder *IForwarderFilterer) WatchDomainRegistered(opts *bind.WatchOpts, sink chan<- *IForwarderDomainRegistered, domainSeparator [][32]byte) (event.Subscription, error)

WatchDomainRegistered is a free log subscription operation binding the contract event 0x4bc68689cbe89a4a6333a3ab0a70093874da3e5bfb71e93102027f3f073687d8.

Solidity: event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue)

func (*IForwarderFilterer) WatchRequestTypeRegistered

func (_IForwarder *IForwarderFilterer) WatchRequestTypeRegistered(opts *bind.WatchOpts, sink chan<- *IForwarderRequestTypeRegistered, typeHash [][32]byte) (event.Subscription, error)

WatchRequestTypeRegistered is a free log subscription operation binding the contract event 0x64d6bce64323458c44643c51fe45113efc882082f7b7fd5f09f0d69d2eedb202.

Solidity: event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr)

type IForwarderForwardRequest

type IForwarderForwardRequest struct {
	From           common.Address
	To             common.Address
	Value          *big.Int
	Gas            *big.Int
	Nonce          *big.Int
	Data           []byte
	ValidUntilTime *big.Int
}

IForwarderForwardRequest is an auto generated low-level Go binding around an user-defined struct.

func (*IForwarderForwardRequest) FromSubmitTransactionRequest

func (r *IForwarderForwardRequest) FromSubmitTransactionRequest(
	req *common.SubmitTransactionRequest,
)

FromSubmitTransactionRequest returns a new SubmitTransactionRequest from the given IForwarderForwardRequest.

func (*IForwarderForwardRequest) Pack

func (r *IForwarderForwardRequest) Pack(suffixData []byte) ([]byte, error)

Pack packs the IForwarderForwardRequest data into an ABI-encoded format. It optionally includes the given suffixData. NOTE: suffixData is currently unused.

type IForwarderRaw

type IForwarderRaw struct {
	Contract *IForwarder // Generic contract binding to access the raw methods on
}

IForwarderRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*IForwarderRaw) Call

func (_IForwarder *IForwarderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*IForwarderRaw) Transact

func (_IForwarder *IForwarderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*IForwarderRaw) Transfer

func (_IForwarder *IForwarderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type IForwarderRequestTypeRegistered

type IForwarderRequestTypeRegistered struct {
	TypeHash [32]byte
	TypeStr  string
	Raw      types.Log // Blockchain specific contextual infos
}

IForwarderRequestTypeRegistered represents a RequestTypeRegistered event raised by the IForwarder contract.

type IForwarderRequestTypeRegisteredIterator

type IForwarderRequestTypeRegisteredIterator struct {
	Event *IForwarderRequestTypeRegistered // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

IForwarderRequestTypeRegisteredIterator is returned from FilterRequestTypeRegistered and is used to iterate over the raw logs and unpacked data for RequestTypeRegistered events raised by the IForwarder contract.

func (*IForwarderRequestTypeRegisteredIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*IForwarderRequestTypeRegisteredIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*IForwarderRequestTypeRegisteredIterator) Next

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.

type IForwarderSession

type IForwarderSession struct {
	Contract     *IForwarder       // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

IForwarderSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*IForwarderSession) Execute

func (_IForwarder *IForwarderSession) Execute(forwardRequest IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, signature []byte) (*types.Transaction, error)

Execute is a paid mutator transaction binding the contract method 0xe024dc7f.

Solidity: function execute((address,address,uint256,uint256,uint256,bytes,uint256) forwardRequest, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes signature) payable returns(bool success, bytes ret)

func (*IForwarderSession) GetNonce

func (_IForwarder *IForwarderSession) GetNonce(from common.Address) (*big.Int, error)

GetNonce is a free data retrieval call binding the contract method 0x2d0335ab.

Solidity: function getNonce(address from) view returns(uint256)

func (*IForwarderSession) RegisterDomainSeparator

func (_IForwarder *IForwarderSession) RegisterDomainSeparator(name string, version string) (*types.Transaction, error)

RegisterDomainSeparator is a paid mutator transaction binding the contract method 0x9c7b4592.

Solidity: function registerDomainSeparator(string name, string version) returns()

func (*IForwarderSession) RegisterRequestType

func (_IForwarder *IForwarderSession) RegisterRequestType(typeName string, typeSuffix string) (*types.Transaction, error)

RegisterRequestType is a paid mutator transaction binding the contract method 0xd9210be5.

Solidity: function registerRequestType(string typeName, string typeSuffix) returns()

func (*IForwarderSession) SupportsInterface

func (_IForwarder *IForwarderSession) SupportsInterface(interfaceId [4]byte) (bool, error)

SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7.

Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool)

func (*IForwarderSession) Verify

func (_IForwarder *IForwarderSession) Verify(forwardRequest IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, signature []byte) error

Verify is a free data retrieval call binding the contract method 0xad9f99c7.

Solidity: function verify((address,address,uint256,uint256,uint256,bytes,uint256) forwardRequest, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes signature) view returns()

type IForwarderTransactor

type IForwarderTransactor struct {
	// contains filtered or unexported fields
}

IForwarderTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewIForwarderTransactor

func NewIForwarderTransactor(address common.Address, transactor bind.ContractTransactor) (*IForwarderTransactor, error)

NewIForwarderTransactor creates a new write-only instance of IForwarder, bound to a specific deployed contract.

func (*IForwarderTransactor) Execute

func (_IForwarder *IForwarderTransactor) Execute(opts *bind.TransactOpts, forwardRequest IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, signature []byte) (*types.Transaction, error)

Execute is a paid mutator transaction binding the contract method 0xe024dc7f.

Solidity: function execute((address,address,uint256,uint256,uint256,bytes,uint256) forwardRequest, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes signature) payable returns(bool success, bytes ret)

func (*IForwarderTransactor) RegisterDomainSeparator

func (_IForwarder *IForwarderTransactor) RegisterDomainSeparator(opts *bind.TransactOpts, name string, version string) (*types.Transaction, error)

RegisterDomainSeparator is a paid mutator transaction binding the contract method 0x9c7b4592.

Solidity: function registerDomainSeparator(string name, string version) returns()

func (*IForwarderTransactor) RegisterRequestType

func (_IForwarder *IForwarderTransactor) RegisterRequestType(opts *bind.TransactOpts, typeName string, typeSuffix string) (*types.Transaction, error)

RegisterRequestType is a paid mutator transaction binding the contract method 0xd9210be5.

Solidity: function registerRequestType(string typeName, string typeSuffix) returns()

type IForwarderTransactorRaw

type IForwarderTransactorRaw struct {
	Contract *IForwarderTransactor // Generic write-only contract binding to access the raw methods on
}

IForwarderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*IForwarderTransactorRaw) Transact

func (_IForwarder *IForwarderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*IForwarderTransactorRaw) Transfer

func (_IForwarder *IForwarderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type IForwarderTransactorSession

type IForwarderTransactorSession struct {
	Contract     *IForwarderTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts     // Transaction auth options to use throughout this session
}

IForwarderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*IForwarderTransactorSession) Execute

func (_IForwarder *IForwarderTransactorSession) Execute(forwardRequest IForwarderForwardRequest, domainSeparator [32]byte, requestTypeHash [32]byte, suffixData []byte, signature []byte) (*types.Transaction, error)

Execute is a paid mutator transaction binding the contract method 0xe024dc7f.

Solidity: function execute((address,address,uint256,uint256,uint256,bytes,uint256) forwardRequest, bytes32 domainSeparator, bytes32 requestTypeHash, bytes suffixData, bytes signature) payable returns(bool success, bytes ret)

func (*IForwarderTransactorSession) RegisterDomainSeparator

func (_IForwarder *IForwarderTransactorSession) RegisterDomainSeparator(name string, version string) (*types.Transaction, error)

RegisterDomainSeparator is a paid mutator transaction binding the contract method 0x9c7b4592.

Solidity: function registerDomainSeparator(string name, string version) returns()

func (*IForwarderTransactorSession) RegisterRequestType

func (_IForwarder *IForwarderTransactorSession) RegisterRequestType(typeName string, typeSuffix string) (*types.Transaction, error)

RegisterRequestType is a paid mutator transaction binding the contract method 0xd9210be5.

Solidity: function registerRequestType(string typeName, string typeSuffix) returns()

type IForwarderWrapped

type IForwarderWrapped struct {
	// contains filtered or unexported fields
}

IForwarderWrapped represents a wrapped GSN IForwarder.

func NewIForwarderWrapped

func NewIForwarderWrapped(f *IForwarder) *IForwarderWrapped

NewIForwarderWrapped returns a new IForwarderWrapped.

func (*IForwarderWrapped) Execute

func (f *IForwarderWrapped) Execute(
	opts *bind.TransactOpts,
	req common.ForwardRequest,
	domainSeparator,
	requestTypeHash [32]byte,
	suffixData,
	signature []byte,
) (*types.Transaction, error)

Execute executes a forward request using the forwarder contract.

func (*IForwarderWrapped) GetNonce

func (f *IForwarderWrapped) GetNonce(opts *bind.CallOpts, from ethcommon.Address) (*big.Int, error)

GetNonce returns an account's nonce from the forwarder contract.

func (*IForwarderWrapped) NewEmptyForwardRequest added in v0.0.5

func (f *IForwarderWrapped) NewEmptyForwardRequest() common.ForwardRequest

NewEmptyForwardRequest returns a new empty *IForwarderForwardRequest.

func (*IForwarderWrapped) Verify

func (f *IForwarderWrapped) Verify(
	opts *bind.CallOpts,
	req common.ForwardRequest,
	domainSeparator,
	requestTypeHash [32]byte,
	suffixData,
	signature []byte,
) (bool, error)

Verify verifies a forward request using the forwarder contract.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL