github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/test/contracts/bin/ChainCallLevel2/ChainCallLevel2.go (about)

     1  // Code generated - DO NOT EDIT.
     2  // This file is a generated binding and any manual changes will be lost.
     3  
     4  package ChainCallLevel2
     5  
     6  import (
     7  	"errors"
     8  	"math/big"
     9  	"strings"
    10  
    11  	ethereum "github.com/ethereum/go-ethereum"
    12  	"github.com/ethereum/go-ethereum/accounts/abi"
    13  	"github.com/ethereum/go-ethereum/accounts/abi/bind"
    14  	"github.com/ethereum/go-ethereum/common"
    15  	"github.com/ethereum/go-ethereum/core/types"
    16  	"github.com/ethereum/go-ethereum/event"
    17  )
    18  
    19  // Reference imports to suppress errors if they are not otherwise used.
    20  var (
    21  	_ = errors.New
    22  	_ = big.NewInt
    23  	_ = strings.NewReader
    24  	_ = ethereum.NotFound
    25  	_ = bind.Bind
    26  	_ = common.Big1
    27  	_ = types.BloomLookup
    28  	_ = event.NewSubscription
    29  	_ = abi.ConvertType
    30  )
    31  
    32  // ChainCallLevel2MetaData contains all meta data concerning the ChainCallLevel2 contract.
    33  var ChainCallLevel2MetaData = &bind.MetaData{
    34  	ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"level3Addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"level4Addr\",\"type\":\"address\"}],\"name\":\"exec\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"level3Addr\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"level4Addr\",\"type\":\"address\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"t\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
    35  	Bin: "0x608060405234801561001057600080fd5b5061064e806100206000396000f3fe6080604052600436106100295760003560e01c8063d81e84231461002e578063ee2d011514610064575b600080fd5b34801561003a57600080fd5b5061004e6100493660046104a3565b610079565b60405161005b9190610506565b60405180910390f35b6100776100723660046104a3565b61029d565b005b6040516001600160a01b03828116602483015260609160009183919086169060440160408051601f198184030181529181526020820180516001600160e01b03166330af0bbf60e21b179052516100d09190610539565b600060405180830381855afa9150503d806000811461010b576040519150601f19603f3d011682016040523d82523d6000602084013e610110565b606091505b509092509050816101795760405162461bcd60e51b815260206004820152602860248201527f6661696c656420746f20706572666f726d207374617469632063616c6c20746f604482015267206c6576656c203360c01b60648201526084015b60405180910390fd5b8080602001905181019061018d919061056b565b60408051600481526024810182526020810180516001600160e01b0316631b53398f60e21b17905290519194506001600160a01b038616916101cf9190610539565b600060405180830381855afa9150503d806000811461020a576040519150601f19603f3d011682016040523d82523d6000602084013e61020f565b606091505b509092509050816102805760405162461bcd60e51b815260206004820152603560248201527f6661696c656420746f20706572666f726d207374617469632063616c6c20746f604482015274103632bb32b6101a10333937b6903632bb32b6101960591b6064820152608401610170565b80806020019051810190610294919061056b565b95945050505050565b6040516001600160a01b0382811660248301526000919084169060440160408051601f198184030181529181526020820180516001600160e01b03166335db093760e11b179052516102ef9190610539565b6000604051808303816000865af19150503d806000811461032c576040519150601f19603f3d011682016040523d82523d6000602084013e610331565b606091505b5050809150508061038e5760405162461bcd60e51b815260206004820152602160248201527f6661696c656420746f20706572666f726d2063616c6c20746f206c6576656c206044820152603360f81b6064820152608401610170565b6040516001600160a01b03838116602483015284169060440160408051601f198184030181529181526020820180516001600160e01b03166335db093760e11b179052516103dc9190610539565b600060405180830381855af49150503d8060008114610417576040519150601f19603f3d011682016040523d82523d6000602084013e61041c565b606091505b505080915050806104825760405162461bcd60e51b815260206004820152602a60248201527f6661696c656420746f20706572666f726d2064656c65676174652063616c6c20604482015269746f206c6576656c203360b01b6064820152608401610170565b505050565b80356001600160a01b038116811461049e57600080fd5b919050565b600080604083850312156104b657600080fd5b6104bf83610487565b91506104cd60208401610487565b90509250929050565b60005b838110156104f15781810151838201526020016104d9565b83811115610500576000848401525b50505050565b60208152600082518060208401526105258160408501602087016104d6565b601f01601f19169190910160400192915050565b6000825161054b8184602087016104d6565b9190910192915050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561057d57600080fd5b815167ffffffffffffffff8082111561059557600080fd5b818401915084601f8301126105a957600080fd5b8151818111156105bb576105bb610555565b604051601f8201601f19908116603f011681019083821181831017156105e3576105e3610555565b816040528281528760208487010111156105fc57600080fd5b61060d8360208301602088016104d6565b97965050505050505056fea2646970667358221220bcf0de35efbb5279a8492473f9a7ed3e68ddf1cbd76bc1ae167505bf83c9042664736f6c634300080c0033",
    36  }
    37  
    38  // ChainCallLevel2ABI is the input ABI used to generate the binding from.
    39  // Deprecated: Use ChainCallLevel2MetaData.ABI instead.
    40  var ChainCallLevel2ABI = ChainCallLevel2MetaData.ABI
    41  
    42  // ChainCallLevel2Bin is the compiled bytecode used for deploying new contracts.
    43  // Deprecated: Use ChainCallLevel2MetaData.Bin instead.
    44  var ChainCallLevel2Bin = ChainCallLevel2MetaData.Bin
    45  
    46  // DeployChainCallLevel2 deploys a new Ethereum contract, binding an instance of ChainCallLevel2 to it.
    47  func DeployChainCallLevel2(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ChainCallLevel2, error) {
    48  	parsed, err := ChainCallLevel2MetaData.GetAbi()
    49  	if err != nil {
    50  		return common.Address{}, nil, nil, err
    51  	}
    52  	if parsed == nil {
    53  		return common.Address{}, nil, nil, errors.New("GetABI returned nil")
    54  	}
    55  
    56  	address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ChainCallLevel2Bin), backend)
    57  	if err != nil {
    58  		return common.Address{}, nil, nil, err
    59  	}
    60  	return address, tx, &ChainCallLevel2{ChainCallLevel2Caller: ChainCallLevel2Caller{contract: contract}, ChainCallLevel2Transactor: ChainCallLevel2Transactor{contract: contract}, ChainCallLevel2Filterer: ChainCallLevel2Filterer{contract: contract}}, nil
    61  }
    62  
    63  // ChainCallLevel2 is an auto generated Go binding around an Ethereum contract.
    64  type ChainCallLevel2 struct {
    65  	ChainCallLevel2Caller     // Read-only binding to the contract
    66  	ChainCallLevel2Transactor // Write-only binding to the contract
    67  	ChainCallLevel2Filterer   // Log filterer for contract events
    68  }
    69  
    70  // ChainCallLevel2Caller is an auto generated read-only Go binding around an Ethereum contract.
    71  type ChainCallLevel2Caller struct {
    72  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    73  }
    74  
    75  // ChainCallLevel2Transactor is an auto generated write-only Go binding around an Ethereum contract.
    76  type ChainCallLevel2Transactor struct {
    77  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    78  }
    79  
    80  // ChainCallLevel2Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
    81  type ChainCallLevel2Filterer struct {
    82  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    83  }
    84  
    85  // ChainCallLevel2Session is an auto generated Go binding around an Ethereum contract,
    86  // with pre-set call and transact options.
    87  type ChainCallLevel2Session struct {
    88  	Contract     *ChainCallLevel2  // Generic contract binding to set the session for
    89  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    90  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    91  }
    92  
    93  // ChainCallLevel2CallerSession is an auto generated read-only Go binding around an Ethereum contract,
    94  // with pre-set call options.
    95  type ChainCallLevel2CallerSession struct {
    96  	Contract *ChainCallLevel2Caller // Generic contract caller binding to set the session for
    97  	CallOpts bind.CallOpts          // Call options to use throughout this session
    98  }
    99  
   100  // ChainCallLevel2TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   101  // with pre-set transact options.
   102  type ChainCallLevel2TransactorSession struct {
   103  	Contract     *ChainCallLevel2Transactor // Generic contract transactor binding to set the session for
   104  	TransactOpts bind.TransactOpts          // Transaction auth options to use throughout this session
   105  }
   106  
   107  // ChainCallLevel2Raw is an auto generated low-level Go binding around an Ethereum contract.
   108  type ChainCallLevel2Raw struct {
   109  	Contract *ChainCallLevel2 // Generic contract binding to access the raw methods on
   110  }
   111  
   112  // ChainCallLevel2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   113  type ChainCallLevel2CallerRaw struct {
   114  	Contract *ChainCallLevel2Caller // Generic read-only contract binding to access the raw methods on
   115  }
   116  
   117  // ChainCallLevel2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   118  type ChainCallLevel2TransactorRaw struct {
   119  	Contract *ChainCallLevel2Transactor // Generic write-only contract binding to access the raw methods on
   120  }
   121  
   122  // NewChainCallLevel2 creates a new instance of ChainCallLevel2, bound to a specific deployed contract.
   123  func NewChainCallLevel2(address common.Address, backend bind.ContractBackend) (*ChainCallLevel2, error) {
   124  	contract, err := bindChainCallLevel2(address, backend, backend, backend)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	return &ChainCallLevel2{ChainCallLevel2Caller: ChainCallLevel2Caller{contract: contract}, ChainCallLevel2Transactor: ChainCallLevel2Transactor{contract: contract}, ChainCallLevel2Filterer: ChainCallLevel2Filterer{contract: contract}}, nil
   129  }
   130  
   131  // NewChainCallLevel2Caller creates a new read-only instance of ChainCallLevel2, bound to a specific deployed contract.
   132  func NewChainCallLevel2Caller(address common.Address, caller bind.ContractCaller) (*ChainCallLevel2Caller, error) {
   133  	contract, err := bindChainCallLevel2(address, caller, nil, nil)
   134  	if err != nil {
   135  		return nil, err
   136  	}
   137  	return &ChainCallLevel2Caller{contract: contract}, nil
   138  }
   139  
   140  // NewChainCallLevel2Transactor creates a new write-only instance of ChainCallLevel2, bound to a specific deployed contract.
   141  func NewChainCallLevel2Transactor(address common.Address, transactor bind.ContractTransactor) (*ChainCallLevel2Transactor, error) {
   142  	contract, err := bindChainCallLevel2(address, nil, transactor, nil)
   143  	if err != nil {
   144  		return nil, err
   145  	}
   146  	return &ChainCallLevel2Transactor{contract: contract}, nil
   147  }
   148  
   149  // NewChainCallLevel2Filterer creates a new log filterer instance of ChainCallLevel2, bound to a specific deployed contract.
   150  func NewChainCallLevel2Filterer(address common.Address, filterer bind.ContractFilterer) (*ChainCallLevel2Filterer, error) {
   151  	contract, err := bindChainCallLevel2(address, nil, nil, filterer)
   152  	if err != nil {
   153  		return nil, err
   154  	}
   155  	return &ChainCallLevel2Filterer{contract: contract}, nil
   156  }
   157  
   158  // bindChainCallLevel2 binds a generic wrapper to an already deployed contract.
   159  func bindChainCallLevel2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   160  	parsed, err := ChainCallLevel2MetaData.GetAbi()
   161  	if err != nil {
   162  		return nil, err
   163  	}
   164  	return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
   165  }
   166  
   167  // Call invokes the (constant) contract method with params as input values and
   168  // sets the output to result. The result type might be a single field for simple
   169  // returns, a slice of interfaces for anonymous returns and a struct for named
   170  // returns.
   171  func (_ChainCallLevel2 *ChainCallLevel2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   172  	return _ChainCallLevel2.Contract.ChainCallLevel2Caller.contract.Call(opts, result, method, params...)
   173  }
   174  
   175  // Transfer initiates a plain transaction to move funds to the contract, calling
   176  // its default method if one is available.
   177  func (_ChainCallLevel2 *ChainCallLevel2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   178  	return _ChainCallLevel2.Contract.ChainCallLevel2Transactor.contract.Transfer(opts)
   179  }
   180  
   181  // Transact invokes the (paid) contract method with params as input values.
   182  func (_ChainCallLevel2 *ChainCallLevel2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   183  	return _ChainCallLevel2.Contract.ChainCallLevel2Transactor.contract.Transact(opts, method, params...)
   184  }
   185  
   186  // Call invokes the (constant) contract method with params as input values and
   187  // sets the output to result. The result type might be a single field for simple
   188  // returns, a slice of interfaces for anonymous returns and a struct for named
   189  // returns.
   190  func (_ChainCallLevel2 *ChainCallLevel2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   191  	return _ChainCallLevel2.Contract.contract.Call(opts, result, method, params...)
   192  }
   193  
   194  // Transfer initiates a plain transaction to move funds to the contract, calling
   195  // its default method if one is available.
   196  func (_ChainCallLevel2 *ChainCallLevel2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   197  	return _ChainCallLevel2.Contract.contract.Transfer(opts)
   198  }
   199  
   200  // Transact invokes the (paid) contract method with params as input values.
   201  func (_ChainCallLevel2 *ChainCallLevel2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   202  	return _ChainCallLevel2.Contract.contract.Transact(opts, method, params...)
   203  }
   204  
   205  // Get is a free data retrieval call binding the contract method 0xd81e8423.
   206  //
   207  // Solidity: function get(address level3Addr, address level4Addr) view returns(string t)
   208  func (_ChainCallLevel2 *ChainCallLevel2Caller) Get(opts *bind.CallOpts, level3Addr common.Address, level4Addr common.Address) (string, error) {
   209  	var out []interface{}
   210  	err := _ChainCallLevel2.contract.Call(opts, &out, "get", level3Addr, level4Addr)
   211  
   212  	if err != nil {
   213  		return *new(string), err
   214  	}
   215  
   216  	out0 := *abi.ConvertType(out[0], new(string)).(*string)
   217  
   218  	return out0, err
   219  
   220  }
   221  
   222  // Get is a free data retrieval call binding the contract method 0xd81e8423.
   223  //
   224  // Solidity: function get(address level3Addr, address level4Addr) view returns(string t)
   225  func (_ChainCallLevel2 *ChainCallLevel2Session) Get(level3Addr common.Address, level4Addr common.Address) (string, error) {
   226  	return _ChainCallLevel2.Contract.Get(&_ChainCallLevel2.CallOpts, level3Addr, level4Addr)
   227  }
   228  
   229  // Get is a free data retrieval call binding the contract method 0xd81e8423.
   230  //
   231  // Solidity: function get(address level3Addr, address level4Addr) view returns(string t)
   232  func (_ChainCallLevel2 *ChainCallLevel2CallerSession) Get(level3Addr common.Address, level4Addr common.Address) (string, error) {
   233  	return _ChainCallLevel2.Contract.Get(&_ChainCallLevel2.CallOpts, level3Addr, level4Addr)
   234  }
   235  
   236  // Exec is a paid mutator transaction binding the contract method 0xee2d0115.
   237  //
   238  // Solidity: function exec(address level3Addr, address level4Addr) payable returns()
   239  func (_ChainCallLevel2 *ChainCallLevel2Transactor) Exec(opts *bind.TransactOpts, level3Addr common.Address, level4Addr common.Address) (*types.Transaction, error) {
   240  	return _ChainCallLevel2.contract.Transact(opts, "exec", level3Addr, level4Addr)
   241  }
   242  
   243  // Exec is a paid mutator transaction binding the contract method 0xee2d0115.
   244  //
   245  // Solidity: function exec(address level3Addr, address level4Addr) payable returns()
   246  func (_ChainCallLevel2 *ChainCallLevel2Session) Exec(level3Addr common.Address, level4Addr common.Address) (*types.Transaction, error) {
   247  	return _ChainCallLevel2.Contract.Exec(&_ChainCallLevel2.TransactOpts, level3Addr, level4Addr)
   248  }
   249  
   250  // Exec is a paid mutator transaction binding the contract method 0xee2d0115.
   251  //
   252  // Solidity: function exec(address level3Addr, address level4Addr) payable returns()
   253  func (_ChainCallLevel2 *ChainCallLevel2TransactorSession) Exec(level3Addr common.Address, level4Addr common.Address) (*types.Transaction, error) {
   254  	return _ChainCallLevel2.Contract.Exec(&_ChainCallLevel2.TransactOpts, level3Addr, level4Addr)
   255  }