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