github.com/hyperion-hyn/go-ethereum@v2.4.0+incompatible/permission/bind/permission_upgr.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 permission 5 6 import ( 7 "math/big" 8 "strings" 9 10 ethereum "github.com/ethereum/go-ethereum" 11 "github.com/ethereum/go-ethereum/accounts/abi" 12 "github.com/ethereum/go-ethereum/accounts/abi/bind" 13 "github.com/ethereum/go-ethereum/common" 14 "github.com/ethereum/go-ethereum/core/types" 15 "github.com/ethereum/go-ethereum/event" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var ( 20 _ = big.NewInt 21 _ = strings.NewReader 22 _ = ethereum.NotFound 23 _ = abi.U256 24 _ = bind.Bind 25 _ = common.Big1 26 _ = types.BloomLookup 27 _ = event.NewSubscription 28 ) 29 30 // PermUpgrABI is the input ABI used to generate the binding from. 31 const PermUpgrABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"getPermImpl\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposedImpl\",\"type\":\"address\"}],\"name\":\"confirmImplChange\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getGuardian\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getPermInterface\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_permInterface\",\"type\":\"address\"},{\"name\":\"_permImpl\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_guardian\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" 32 33 // PermUpgrBin is the compiled bytecode used for deploying new contracts. 34 const PermUpgrBin = `608060405234801561001057600080fd5b50604051602080610b2d8339810180604052602081101561003057600080fd5b8101908080519060200190929190505050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260146101000a81548160ff02191690831515021790555050610a81806100ac6000396000f3fe608060405234801561001057600080fd5b5060043610610074576000357c0100000000000000000000000000000000000000000000000000000000900480630e32cf901461007957806322bcb39a146100c3578063a75b87d214610107578063e572515c14610151578063f09a40161461019b575b600080fd5b6100816101ff565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610105600480360360208110156100d957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610229565b005b61010f61053c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610159610565565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101fd600480360360408110156101b157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061058f565b005b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156102ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b60608060606000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cc9ba6fa6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160006040518083038186803b15801561037857600080fd5b505afa15801561038c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060808110156103b657600080fd5b8101908080516401000000008111156103ce57600080fd5b828101905060208101848111156103e457600080fd5b815185600182028301116401000000008211171561040157600080fd5b5050929190602001805164010000000081111561041d57600080fd5b8281019050602081018481111561043357600080fd5b815185600182028301116401000000008211171561045057600080fd5b5050929190602001805164010000000081111561046c57600080fd5b8281019050602081018481111561048257600080fd5b815185600182028301116401000000008211171561049f57600080fd5b50509291906020018051906020019092919050505093509350935093506104c985858585856107a4565b84600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610535600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661097d565b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610653576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f696e76616c69642063616c6c657200000000000000000000000000000000000081525060200191505060405180910390fd5b600260149054906101000a900460ff161515156106d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f63616e206265206578656375746564206f6e6c79206f6e63650000000000000081525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610785600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661097d565b6001600260146101000a81548160ff0219169083151502179055505050565b8473ffffffffffffffffffffffffffffffffffffffff1663f5ad584a858585856040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001806020018060200185151515158152602001848103845288818151815260200191508051906020019080838360005b83811015610841578082015181840152602081019050610826565b50505050905090810190601f16801561086e5780820380516001836020036101000a031916815260200191505b50848103835287818151815260200191508051906020019080838360005b838110156108a757808201518184015260208101905061088c565b50505050905090810190601f1680156108d45780820380516001836020036101000a031916815260200191505b50848103825286818151815260200191508051906020019080838360005b8381101561090d5780820151818401526020810190506108f2565b50505050905090810190601f16801561093a5780820380516001836020036101000a031916815260200191505b50975050505050505050600060405180830381600087803b15801561095e57600080fd5b505af1158015610972573d6000803e3d6000fd5b505050505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663511bbd9f826040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015610a3a57600080fd5b505af1158015610a4e573d6000803e3d6000fd5b505050505056fea165627a7a72305820378cf538b83ea9abe4413391f6284a8f7e800144d9df63dcbba67da0f58949500029` 35 36 // DeployPermUpgr deploys a new Ethereum contract, binding an instance of PermUpgr to it. 37 func DeployPermUpgr(auth *bind.TransactOpts, backend bind.ContractBackend, _guardian common.Address) (common.Address, *types.Transaction, *PermUpgr, error) { 38 parsed, err := abi.JSON(strings.NewReader(PermUpgrABI)) 39 if err != nil { 40 return common.Address{}, nil, nil, err 41 } 42 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(PermUpgrBin), backend, _guardian) 43 if err != nil { 44 return common.Address{}, nil, nil, err 45 } 46 return address, tx, &PermUpgr{PermUpgrCaller: PermUpgrCaller{contract: contract}, PermUpgrTransactor: PermUpgrTransactor{contract: contract}, PermUpgrFilterer: PermUpgrFilterer{contract: contract}}, nil 47 } 48 49 // PermUpgr is an auto generated Go binding around an Ethereum contract. 50 type PermUpgr struct { 51 PermUpgrCaller // Read-only binding to the contract 52 PermUpgrTransactor // Write-only binding to the contract 53 PermUpgrFilterer // Log filterer for contract events 54 } 55 56 // PermUpgrCaller is an auto generated read-only Go binding around an Ethereum contract. 57 type PermUpgrCaller struct { 58 contract *bind.BoundContract // Generic contract wrapper for the low level calls 59 } 60 61 // PermUpgrTransactor is an auto generated write-only Go binding around an Ethereum contract. 62 type PermUpgrTransactor struct { 63 contract *bind.BoundContract // Generic contract wrapper for the low level calls 64 } 65 66 // PermUpgrFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 67 type PermUpgrFilterer struct { 68 contract *bind.BoundContract // Generic contract wrapper for the low level calls 69 } 70 71 // PermUpgrSession is an auto generated Go binding around an Ethereum contract, 72 // with pre-set call and transact options. 73 type PermUpgrSession struct { 74 Contract *PermUpgr // Generic contract binding to set the session for 75 CallOpts bind.CallOpts // Call options to use throughout this session 76 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 77 } 78 79 // PermUpgrCallerSession is an auto generated read-only Go binding around an Ethereum contract, 80 // with pre-set call options. 81 type PermUpgrCallerSession struct { 82 Contract *PermUpgrCaller // Generic contract caller binding to set the session for 83 CallOpts bind.CallOpts // Call options to use throughout this session 84 } 85 86 // PermUpgrTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 87 // with pre-set transact options. 88 type PermUpgrTransactorSession struct { 89 Contract *PermUpgrTransactor // Generic contract transactor binding to set the session for 90 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 91 } 92 93 // PermUpgrRaw is an auto generated low-level Go binding around an Ethereum contract. 94 type PermUpgrRaw struct { 95 Contract *PermUpgr // Generic contract binding to access the raw methods on 96 } 97 98 // PermUpgrCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 99 type PermUpgrCallerRaw struct { 100 Contract *PermUpgrCaller // Generic read-only contract binding to access the raw methods on 101 } 102 103 // PermUpgrTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 104 type PermUpgrTransactorRaw struct { 105 Contract *PermUpgrTransactor // Generic write-only contract binding to access the raw methods on 106 } 107 108 // NewPermUpgr creates a new instance of PermUpgr, bound to a specific deployed contract. 109 func NewPermUpgr(address common.Address, backend bind.ContractBackend) (*PermUpgr, error) { 110 contract, err := bindPermUpgr(address, backend, backend, backend) 111 if err != nil { 112 return nil, err 113 } 114 return &PermUpgr{PermUpgrCaller: PermUpgrCaller{contract: contract}, PermUpgrTransactor: PermUpgrTransactor{contract: contract}, PermUpgrFilterer: PermUpgrFilterer{contract: contract}}, nil 115 } 116 117 // NewPermUpgrCaller creates a new read-only instance of PermUpgr, bound to a specific deployed contract. 118 func NewPermUpgrCaller(address common.Address, caller bind.ContractCaller) (*PermUpgrCaller, error) { 119 contract, err := bindPermUpgr(address, caller, nil, nil) 120 if err != nil { 121 return nil, err 122 } 123 return &PermUpgrCaller{contract: contract}, nil 124 } 125 126 // NewPermUpgrTransactor creates a new write-only instance of PermUpgr, bound to a specific deployed contract. 127 func NewPermUpgrTransactor(address common.Address, transactor bind.ContractTransactor) (*PermUpgrTransactor, error) { 128 contract, err := bindPermUpgr(address, nil, transactor, nil) 129 if err != nil { 130 return nil, err 131 } 132 return &PermUpgrTransactor{contract: contract}, nil 133 } 134 135 // NewPermUpgrFilterer creates a new log filterer instance of PermUpgr, bound to a specific deployed contract. 136 func NewPermUpgrFilterer(address common.Address, filterer bind.ContractFilterer) (*PermUpgrFilterer, error) { 137 contract, err := bindPermUpgr(address, nil, nil, filterer) 138 if err != nil { 139 return nil, err 140 } 141 return &PermUpgrFilterer{contract: contract}, nil 142 } 143 144 // bindPermUpgr binds a generic wrapper to an already deployed contract. 145 func bindPermUpgr(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 146 parsed, err := abi.JSON(strings.NewReader(PermUpgrABI)) 147 if err != nil { 148 return nil, err 149 } 150 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 151 } 152 153 // Call invokes the (constant) contract method with params as input values and 154 // sets the output to result. The result type might be a single field for simple 155 // returns, a slice of interfaces for anonymous returns and a struct for named 156 // returns. 157 func (_PermUpgr *PermUpgrRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 158 return _PermUpgr.Contract.PermUpgrCaller.contract.Call(opts, result, method, params...) 159 } 160 161 // Transfer initiates a plain transaction to move funds to the contract, calling 162 // its default method if one is available. 163 func (_PermUpgr *PermUpgrRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 164 return _PermUpgr.Contract.PermUpgrTransactor.contract.Transfer(opts) 165 } 166 167 // Transact invokes the (paid) contract method with params as input values. 168 func (_PermUpgr *PermUpgrRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 169 return _PermUpgr.Contract.PermUpgrTransactor.contract.Transact(opts, method, params...) 170 } 171 172 // Call invokes the (constant) contract method with params as input values and 173 // sets the output to result. The result type might be a single field for simple 174 // returns, a slice of interfaces for anonymous returns and a struct for named 175 // returns. 176 func (_PermUpgr *PermUpgrCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 177 return _PermUpgr.Contract.contract.Call(opts, result, method, params...) 178 } 179 180 // Transfer initiates a plain transaction to move funds to the contract, calling 181 // its default method if one is available. 182 func (_PermUpgr *PermUpgrTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 183 return _PermUpgr.Contract.contract.Transfer(opts) 184 } 185 186 // Transact invokes the (paid) contract method with params as input values. 187 func (_PermUpgr *PermUpgrTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 188 return _PermUpgr.Contract.contract.Transact(opts, method, params...) 189 } 190 191 // GetGuardian is a free data retrieval call binding the contract method 0xa75b87d2. 192 // 193 // Solidity: function getGuardian() constant returns(address) 194 func (_PermUpgr *PermUpgrCaller) GetGuardian(opts *bind.CallOpts) (common.Address, error) { 195 var ( 196 ret0 = new(common.Address) 197 ) 198 out := ret0 199 err := _PermUpgr.contract.Call(opts, out, "getGuardian") 200 return *ret0, err 201 } 202 203 // GetGuardian is a free data retrieval call binding the contract method 0xa75b87d2. 204 // 205 // Solidity: function getGuardian() constant returns(address) 206 func (_PermUpgr *PermUpgrSession) GetGuardian() (common.Address, error) { 207 return _PermUpgr.Contract.GetGuardian(&_PermUpgr.CallOpts) 208 } 209 210 // GetGuardian is a free data retrieval call binding the contract method 0xa75b87d2. 211 // 212 // Solidity: function getGuardian() constant returns(address) 213 func (_PermUpgr *PermUpgrCallerSession) GetGuardian() (common.Address, error) { 214 return _PermUpgr.Contract.GetGuardian(&_PermUpgr.CallOpts) 215 } 216 217 // GetPermImpl is a free data retrieval call binding the contract method 0x0e32cf90. 218 // 219 // Solidity: function getPermImpl() constant returns(address) 220 func (_PermUpgr *PermUpgrCaller) GetPermImpl(opts *bind.CallOpts) (common.Address, error) { 221 var ( 222 ret0 = new(common.Address) 223 ) 224 out := ret0 225 err := _PermUpgr.contract.Call(opts, out, "getPermImpl") 226 return *ret0, err 227 } 228 229 // GetPermImpl is a free data retrieval call binding the contract method 0x0e32cf90. 230 // 231 // Solidity: function getPermImpl() constant returns(address) 232 func (_PermUpgr *PermUpgrSession) GetPermImpl() (common.Address, error) { 233 return _PermUpgr.Contract.GetPermImpl(&_PermUpgr.CallOpts) 234 } 235 236 // GetPermImpl is a free data retrieval call binding the contract method 0x0e32cf90. 237 // 238 // Solidity: function getPermImpl() constant returns(address) 239 func (_PermUpgr *PermUpgrCallerSession) GetPermImpl() (common.Address, error) { 240 return _PermUpgr.Contract.GetPermImpl(&_PermUpgr.CallOpts) 241 } 242 243 // GetPermInterface is a free data retrieval call binding the contract method 0xe572515c. 244 // 245 // Solidity: function getPermInterface() constant returns(address) 246 func (_PermUpgr *PermUpgrCaller) GetPermInterface(opts *bind.CallOpts) (common.Address, error) { 247 var ( 248 ret0 = new(common.Address) 249 ) 250 out := ret0 251 err := _PermUpgr.contract.Call(opts, out, "getPermInterface") 252 return *ret0, err 253 } 254 255 // GetPermInterface is a free data retrieval call binding the contract method 0xe572515c. 256 // 257 // Solidity: function getPermInterface() constant returns(address) 258 func (_PermUpgr *PermUpgrSession) GetPermInterface() (common.Address, error) { 259 return _PermUpgr.Contract.GetPermInterface(&_PermUpgr.CallOpts) 260 } 261 262 // GetPermInterface is a free data retrieval call binding the contract method 0xe572515c. 263 // 264 // Solidity: function getPermInterface() constant returns(address) 265 func (_PermUpgr *PermUpgrCallerSession) GetPermInterface() (common.Address, error) { 266 return _PermUpgr.Contract.GetPermInterface(&_PermUpgr.CallOpts) 267 } 268 269 // ConfirmImplChange is a paid mutator transaction binding the contract method 0x22bcb39a. 270 // 271 // Solidity: function confirmImplChange(_proposedImpl address) returns() 272 func (_PermUpgr *PermUpgrTransactor) ConfirmImplChange(opts *bind.TransactOpts, _proposedImpl common.Address) (*types.Transaction, error) { 273 return _PermUpgr.contract.Transact(opts, "confirmImplChange", _proposedImpl) 274 } 275 276 // ConfirmImplChange is a paid mutator transaction binding the contract method 0x22bcb39a. 277 // 278 // Solidity: function confirmImplChange(_proposedImpl address) returns() 279 func (_PermUpgr *PermUpgrSession) ConfirmImplChange(_proposedImpl common.Address) (*types.Transaction, error) { 280 return _PermUpgr.Contract.ConfirmImplChange(&_PermUpgr.TransactOpts, _proposedImpl) 281 } 282 283 // ConfirmImplChange is a paid mutator transaction binding the contract method 0x22bcb39a. 284 // 285 // Solidity: function confirmImplChange(_proposedImpl address) returns() 286 func (_PermUpgr *PermUpgrTransactorSession) ConfirmImplChange(_proposedImpl common.Address) (*types.Transaction, error) { 287 return _PermUpgr.Contract.ConfirmImplChange(&_PermUpgr.TransactOpts, _proposedImpl) 288 } 289 290 // Init is a paid mutator transaction binding the contract method 0xf09a4016. 291 // 292 // Solidity: function init(_permInterface address, _permImpl address) returns() 293 func (_PermUpgr *PermUpgrTransactor) Init(opts *bind.TransactOpts, _permInterface common.Address, _permImpl common.Address) (*types.Transaction, error) { 294 return _PermUpgr.contract.Transact(opts, "init", _permInterface, _permImpl) 295 } 296 297 // Init is a paid mutator transaction binding the contract method 0xf09a4016. 298 // 299 // Solidity: function init(_permInterface address, _permImpl address) returns() 300 func (_PermUpgr *PermUpgrSession) Init(_permInterface common.Address, _permImpl common.Address) (*types.Transaction, error) { 301 return _PermUpgr.Contract.Init(&_PermUpgr.TransactOpts, _permInterface, _permImpl) 302 } 303 304 // Init is a paid mutator transaction binding the contract method 0xf09a4016. 305 // 306 // Solidity: function init(_permInterface address, _permImpl address) returns() 307 func (_PermUpgr *PermUpgrTransactorSession) Init(_permInterface common.Address, _permImpl common.Address) (*types.Transaction, error) { 308 return _PermUpgr.Contract.Init(&_PermUpgr.TransactOpts, _permInterface, _permImpl) 309 }