github.com/kivutar/go-ethereum@v1.7.4-0.20180117074026-6fdb126e9630/contracts/ens/contract/fifsregistrar.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 contract 5 6 import ( 7 "strings" 8 9 "github.com/ethereum/go-ethereum/accounts/abi" 10 "github.com/ethereum/go-ethereum/accounts/abi/bind" 11 "github.com/ethereum/go-ethereum/common" 12 "github.com/ethereum/go-ethereum/core/types" 13 ) 14 15 // FIFSRegistrarABI is the input ABI used to generate the binding from. 16 const FIFSRegistrarABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"subnode\",\"type\":\"bytes32\"},{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"ensAddr\",\"type\":\"address\"},{\"name\":\"node\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" 17 18 // FIFSRegistrarBin is the compiled bytecode used for deploying new contracts. 19 const FIFSRegistrarBin = `0x6060604052341561000f57600080fd5b604051604080610224833981016040528080519190602001805160008054600160a060020a03909516600160a060020a03199095169490941790935550506001556101c58061005f6000396000f3006060604052600436106100275763ffffffff60e060020a600035041663d22057a9811461002c575b600080fd5b341561003757600080fd5b61004e600435600160a060020a0360243516610050565b005b816000806001548360405191825260208201526040908101905190819003902060008054919350600160a060020a03909116906302571be39084906040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b15156100c857600080fd5b6102c65a03f115156100d957600080fd5b5050506040518051915050600160a060020a0381161580159061010e575033600160a060020a031681600160a060020a031614155b1561011857600080fd5b600054600154600160a060020a03909116906306ab592390878760405160e060020a63ffffffff861602815260048101939093526024830191909152600160a060020a03166044820152606401600060405180830381600087803b151561017e57600080fd5b6102c65a03f1151561018f57600080fd5b50505050505050505600a165627a7a723058209b0c0f4ed76e4fe49a71d4b838ab3d00d6bad29021172db7ced9f36abcafbf510029` 20 21 // DeployFIFSRegistrar deploys a new Ethereum contract, binding an instance of FIFSRegistrar to it. 22 func DeployFIFSRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, ensAddr common.Address, node [32]byte) (common.Address, *types.Transaction, *FIFSRegistrar, error) { 23 parsed, err := abi.JSON(strings.NewReader(FIFSRegistrarABI)) 24 if err != nil { 25 return common.Address{}, nil, nil, err 26 } 27 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(FIFSRegistrarBin), backend, ensAddr, node) 28 if err != nil { 29 return common.Address{}, nil, nil, err 30 } 31 return address, tx, &FIFSRegistrar{FIFSRegistrarCaller: FIFSRegistrarCaller{contract: contract}, FIFSRegistrarTransactor: FIFSRegistrarTransactor{contract: contract}}, nil 32 } 33 34 // FIFSRegistrar is an auto generated Go binding around an Ethereum contract. 35 type FIFSRegistrar struct { 36 FIFSRegistrarCaller // Read-only binding to the contract 37 FIFSRegistrarTransactor // Write-only binding to the contract 38 } 39 40 // FIFSRegistrarCaller is an auto generated read-only Go binding around an Ethereum contract. 41 type FIFSRegistrarCaller struct { 42 contract *bind.BoundContract // Generic contract wrapper for the low level calls 43 } 44 45 // FIFSRegistrarTransactor is an auto generated write-only Go binding around an Ethereum contract. 46 type FIFSRegistrarTransactor struct { 47 contract *bind.BoundContract // Generic contract wrapper for the low level calls 48 } 49 50 // FIFSRegistrarSession is an auto generated Go binding around an Ethereum contract, 51 // with pre-set call and transact options. 52 type FIFSRegistrarSession struct { 53 Contract *FIFSRegistrar // Generic contract binding to set the session for 54 CallOpts bind.CallOpts // Call options to use throughout this session 55 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 56 } 57 58 // FIFSRegistrarCallerSession is an auto generated read-only Go binding around an Ethereum contract, 59 // with pre-set call options. 60 type FIFSRegistrarCallerSession struct { 61 Contract *FIFSRegistrarCaller // Generic contract caller binding to set the session for 62 CallOpts bind.CallOpts // Call options to use throughout this session 63 } 64 65 // FIFSRegistrarTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 66 // with pre-set transact options. 67 type FIFSRegistrarTransactorSession struct { 68 Contract *FIFSRegistrarTransactor // Generic contract transactor binding to set the session for 69 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 70 } 71 72 // FIFSRegistrarRaw is an auto generated low-level Go binding around an Ethereum contract. 73 type FIFSRegistrarRaw struct { 74 Contract *FIFSRegistrar // Generic contract binding to access the raw methods on 75 } 76 77 // FIFSRegistrarCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 78 type FIFSRegistrarCallerRaw struct { 79 Contract *FIFSRegistrarCaller // Generic read-only contract binding to access the raw methods on 80 } 81 82 // FIFSRegistrarTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 83 type FIFSRegistrarTransactorRaw struct { 84 Contract *FIFSRegistrarTransactor // Generic write-only contract binding to access the raw methods on 85 } 86 87 // NewFIFSRegistrar creates a new instance of FIFSRegistrar, bound to a specific deployed contract. 88 func NewFIFSRegistrar(address common.Address, backend bind.ContractBackend) (*FIFSRegistrar, error) { 89 contract, err := bindFIFSRegistrar(address, backend, backend) 90 if err != nil { 91 return nil, err 92 } 93 return &FIFSRegistrar{FIFSRegistrarCaller: FIFSRegistrarCaller{contract: contract}, FIFSRegistrarTransactor: FIFSRegistrarTransactor{contract: contract}}, nil 94 } 95 96 // NewFIFSRegistrarCaller creates a new read-only instance of FIFSRegistrar, bound to a specific deployed contract. 97 func NewFIFSRegistrarCaller(address common.Address, caller bind.ContractCaller) (*FIFSRegistrarCaller, error) { 98 contract, err := bindFIFSRegistrar(address, caller, nil) 99 if err != nil { 100 return nil, err 101 } 102 return &FIFSRegistrarCaller{contract: contract}, nil 103 } 104 105 // NewFIFSRegistrarTransactor creates a new write-only instance of FIFSRegistrar, bound to a specific deployed contract. 106 func NewFIFSRegistrarTransactor(address common.Address, transactor bind.ContractTransactor) (*FIFSRegistrarTransactor, error) { 107 contract, err := bindFIFSRegistrar(address, nil, transactor) 108 if err != nil { 109 return nil, err 110 } 111 return &FIFSRegistrarTransactor{contract: contract}, nil 112 } 113 114 // bindFIFSRegistrar binds a generic wrapper to an already deployed contract. 115 func bindFIFSRegistrar(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor) (*bind.BoundContract, error) { 116 parsed, err := abi.JSON(strings.NewReader(FIFSRegistrarABI)) 117 if err != nil { 118 return nil, err 119 } 120 return bind.NewBoundContract(address, parsed, caller, transactor), nil 121 } 122 123 // Call invokes the (constant) contract method with params as input values and 124 // sets the output to result. The result type might be a single field for simple 125 // returns, a slice of interfaces for anonymous returns and a struct for named 126 // returns. 127 func (_FIFSRegistrar *FIFSRegistrarRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 128 return _FIFSRegistrar.Contract.FIFSRegistrarCaller.contract.Call(opts, result, method, params...) 129 } 130 131 // Transfer initiates a plain transaction to move funds to the contract, calling 132 // its default method if one is available. 133 func (_FIFSRegistrar *FIFSRegistrarRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 134 return _FIFSRegistrar.Contract.FIFSRegistrarTransactor.contract.Transfer(opts) 135 } 136 137 // Transact invokes the (paid) contract method with params as input values. 138 func (_FIFSRegistrar *FIFSRegistrarRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 139 return _FIFSRegistrar.Contract.FIFSRegistrarTransactor.contract.Transact(opts, method, params...) 140 } 141 142 // Call invokes the (constant) contract method with params as input values and 143 // sets the output to result. The result type might be a single field for simple 144 // returns, a slice of interfaces for anonymous returns and a struct for named 145 // returns. 146 func (_FIFSRegistrar *FIFSRegistrarCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 147 return _FIFSRegistrar.Contract.contract.Call(opts, result, method, params...) 148 } 149 150 // Transfer initiates a plain transaction to move funds to the contract, calling 151 // its default method if one is available. 152 func (_FIFSRegistrar *FIFSRegistrarTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 153 return _FIFSRegistrar.Contract.contract.Transfer(opts) 154 } 155 156 // Transact invokes the (paid) contract method with params as input values. 157 func (_FIFSRegistrar *FIFSRegistrarTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 158 return _FIFSRegistrar.Contract.contract.Transact(opts, method, params...) 159 } 160 161 // Register is a paid mutator transaction binding the contract method 0xd22057a9. 162 // 163 // Solidity: function register(subnode bytes32, owner address) returns() 164 func (_FIFSRegistrar *FIFSRegistrarTransactor) Register(opts *bind.TransactOpts, subnode [32]byte, owner common.Address) (*types.Transaction, error) { 165 return _FIFSRegistrar.contract.Transact(opts, "register", subnode, owner) 166 } 167 168 // Register is a paid mutator transaction binding the contract method 0xd22057a9. 169 // 170 // Solidity: function register(subnode bytes32, owner address) returns() 171 func (_FIFSRegistrar *FIFSRegistrarSession) Register(subnode [32]byte, owner common.Address) (*types.Transaction, error) { 172 return _FIFSRegistrar.Contract.Register(&_FIFSRegistrar.TransactOpts, subnode, owner) 173 } 174 175 // Register is a paid mutator transaction binding the contract method 0xd22057a9. 176 // 177 // Solidity: function register(subnode bytes32, owner address) returns() 178 func (_FIFSRegistrar *FIFSRegistrarTransactorSession) Register(subnode [32]byte, owner common.Address) (*types.Transaction, error) { 179 return _FIFSRegistrar.Contract.Register(&_FIFSRegistrar.TransactOpts, subnode, owner) 180 }