github.com/unicornultrafoundation/go-u2u@v1.0.0-rc1.0.20240205080301-e74a83d3fadc/gossip/contract/ballot/contract.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 ballot 5 6 import ( 7 "errors" 8 "math/big" 9 "strings" 10 11 u2u "github.com/unicornultrafoundation/go-u2u" 12 "github.com/unicornultrafoundation/go-u2u/accounts/abi" 13 "github.com/unicornultrafoundation/go-u2u/accounts/abi/bind" 14 "github.com/unicornultrafoundation/go-u2u/common" 15 "github.com/unicornultrafoundation/go-u2u/core/types" 16 "github.com/unicornultrafoundation/go-u2u/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 _ = u2u.NotFound 25 _ = bind.Bind 26 _ = common.Big1 27 _ = types.BloomLookup 28 _ = event.NewSubscription 29 ) 30 31 // ContractMetaData contains all meta data concerning the Contract contract. 32 var ContractMetaData = &bind.MetaData{ 33 ABI: "[{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"proposalNames\",\"type\":\"bytes32[]\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"chairperson\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"giveRightToVote\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"voteCount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"proposal\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"voters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"voted\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"vote\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"winnerName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"winnerName_\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"winningProposal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winningProposal_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]", 34 Bin: "0x608060405234801561001057600080fd5b5060405161089a38038061089a8339818101604052602081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825186602082028301116401000000008211171561008557600080fd5b82525081516020918201928201910280838360005b838110156100b257818101518382015260200161009a565b50505050919091016040908152600080546001600160a01b03191633178082556001600160a01b03168152600160208190529181209190915593505050505b8151811015610153576002604051806040016040528084848151811061011357fe5b60209081029190910181015182526000918101829052835460018181018655948352918190208351600290930201918255919091015190820155016100f1565b5050610736806101646000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063609ff1bd1161005b578063609ff1bd1461012c5780639e7b8d6114610146578063a3ec138d1461016c578063e2ba53f0146101c057610088565b80630121b93f1461008d578063013cf08b146100ac5780632e4176cf146100e25780635c19a95c14610106575b600080fd5b6100aa600480360360208110156100a357600080fd5b50356101c8565b005b6100c9600480360360208110156100c257600080fd5b50356102cb565b6040805192835260208301919091528051918290030190f35b6100ea6102f6565b604080516001600160a01b039092168252519081900360200190f35b6100aa6004803603602081101561011c57600080fd5b50356001600160a01b0316610305565b610134610516565b60408051918252519081900360200190f35b6100aa6004803603602081101561015c57600080fd5b50356001600160a01b031661057d565b6101926004803603602081101561018257600080fd5b50356001600160a01b0316610678565b6040805194855292151560208501526001600160a01b03909116838301526060830152519081900360800190f35b6101346106ac565b336000908152600160205260409020805461022a576040805162461bcd60e51b815260206004820152601460248201527f486173206e6f20726967687420746f20766f7465000000000000000000000000604482015290519081900360640190fd5b600181015460ff1615610284576040805162461bcd60e51b815260206004820152600e60248201527f416c726561647920766f7465642e000000000000000000000000000000000000604482015290519081900360640190fd5b6001818101805460ff19169091179055600280820183905581548154909190849081106102ad57fe5b60009182526020909120600160029092020101805490910190555050565b600281815481106102d857fe5b60009182526020909120600290910201805460019091015490915082565b6000546001600160a01b031681565b3360009081526001602081905260409091209081015460ff1615610370576040805162461bcd60e51b815260206004820152601260248201527f596f7520616c726561647920766f7465642e0000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0382163314156103ce576040805162461bcd60e51b815260206004820152601e60248201527f53656c662d64656c65676174696f6e20697320646973616c6c6f7765642e0000604482015290519081900360640190fd5b6001600160a01b038281166000908152600160208190526040909120015461010090041615610478576001600160a01b039182166000908152600160208190526040909120015461010090049091169033821415610473576040805162461bcd60e51b815260206004820152601960248201527f466f756e64206c6f6f7020696e2064656c65676174696f6e2e00000000000000604482015290519081900360640190fd5b6103ce565b6001818101805460ff191682177fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b0386169081029190911790915560009081526020829052604090209081015460ff1615610509578154600282810154815481106104ea57fe5b6000918252602090912060016002909202010180549091019055610511565b815481540181555b505050565b600080805b60025481101561057857816002828154811061053357fe5b9060005260206000209060020201600101541115610570576002818154811061055857fe5b90600052602060002090600202016001015491508092505b60010161051b565b505090565b6000546001600160a01b031633146105c65760405162461bcd60e51b81526004018080602001828103825260288152602001806106da6028913960400191505060405180910390fd5b6001600160a01b0381166000908152600160208190526040909120015460ff1615610638576040805162461bcd60e51b815260206004820152601860248201527f54686520766f74657220616c726561647920766f7465642e0000000000000000604482015290519081900360640190fd5b6001600160a01b0381166000908152600160205260409020541561065b57600080fd5b6001600160a01b0316600090815260016020819052604090912055565b600160208190526000918252604090912080549181015460029091015460ff82169161010090046001600160a01b03169084565b600060026106b8610516565b815481106106c257fe5b90600052602060002090600202016000015490509056fe4f6e6c79206368616972706572736f6e2063616e206769766520726967687420746f20766f74652ea265627a7a72315820a22e04a1172617645f3654f281b81f779805de1b7d7930b30443c2f276926a8564736f6c634300050c0032", 35 } 36 37 // ContractABI is the input ABI used to generate the binding from. 38 // Deprecated: Use ContractMetaData.ABI instead. 39 var ContractABI = ContractMetaData.ABI 40 41 // ContractBin is the compiled bytecode used for deploying new contracts. 42 // Deprecated: Use ContractMetaData.Bin instead. 43 var ContractBin = ContractMetaData.Bin 44 45 // DeployContract deploys a new Ethereum contract, binding an instance of Contract to it. 46 func DeployContract(auth *bind.TransactOpts, backend bind.ContractBackend, proposalNames [][32]byte) (common.Address, *types.Transaction, *Contract, error) { 47 parsed, err := ContractMetaData.GetAbi() 48 if err != nil { 49 return common.Address{}, nil, nil, err 50 } 51 if parsed == nil { 52 return common.Address{}, nil, nil, errors.New("GetABI returned nil") 53 } 54 55 address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ContractBin), backend, proposalNames) 56 if err != nil { 57 return common.Address{}, nil, nil, err 58 } 59 return address, tx, &Contract{ContractCaller: ContractCaller{contract: contract}, ContractTransactor: ContractTransactor{contract: contract}, ContractFilterer: ContractFilterer{contract: contract}}, nil 60 } 61 62 // Contract is an auto generated Go binding around an Ethereum contract. 63 type Contract struct { 64 ContractCaller // Read-only binding to the contract 65 ContractTransactor // Write-only binding to the contract 66 ContractFilterer // Log filterer for contract events 67 } 68 69 // ContractCaller is an auto generated read-only Go binding around an Ethereum contract. 70 type ContractCaller struct { 71 contract *bind.BoundContract // Generic contract wrapper for the low level calls 72 } 73 74 // ContractTransactor is an auto generated write-only Go binding around an Ethereum contract. 75 type ContractTransactor struct { 76 contract *bind.BoundContract // Generic contract wrapper for the low level calls 77 } 78 79 // ContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 80 type ContractFilterer struct { 81 contract *bind.BoundContract // Generic contract wrapper for the low level calls 82 } 83 84 // ContractSession is an auto generated Go binding around an Ethereum contract, 85 // with pre-set call and transact options. 86 type ContractSession struct { 87 Contract *Contract // Generic contract binding to set the session for 88 CallOpts bind.CallOpts // Call options to use throughout this session 89 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 90 } 91 92 // ContractCallerSession is an auto generated read-only Go binding around an Ethereum contract, 93 // with pre-set call options. 94 type ContractCallerSession struct { 95 Contract *ContractCaller // Generic contract caller binding to set the session for 96 CallOpts bind.CallOpts // Call options to use throughout this session 97 } 98 99 // ContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 100 // with pre-set transact options. 101 type ContractTransactorSession struct { 102 Contract *ContractTransactor // Generic contract transactor binding to set the session for 103 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 104 } 105 106 // ContractRaw is an auto generated low-level Go binding around an Ethereum contract. 107 type ContractRaw struct { 108 Contract *Contract // Generic contract binding to access the raw methods on 109 } 110 111 // ContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 112 type ContractCallerRaw struct { 113 Contract *ContractCaller // Generic read-only contract binding to access the raw methods on 114 } 115 116 // ContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 117 type ContractTransactorRaw struct { 118 Contract *ContractTransactor // Generic write-only contract binding to access the raw methods on 119 } 120 121 // NewContract creates a new instance of Contract, bound to a specific deployed contract. 122 func NewContract(address common.Address, backend bind.ContractBackend) (*Contract, error) { 123 contract, err := bindContract(address, backend, backend, backend) 124 if err != nil { 125 return nil, err 126 } 127 return &Contract{ContractCaller: ContractCaller{contract: contract}, ContractTransactor: ContractTransactor{contract: contract}, ContractFilterer: ContractFilterer{contract: contract}}, nil 128 } 129 130 // NewContractCaller creates a new read-only instance of Contract, bound to a specific deployed contract. 131 func NewContractCaller(address common.Address, caller bind.ContractCaller) (*ContractCaller, error) { 132 contract, err := bindContract(address, caller, nil, nil) 133 if err != nil { 134 return nil, err 135 } 136 return &ContractCaller{contract: contract}, nil 137 } 138 139 // NewContractTransactor creates a new write-only instance of Contract, bound to a specific deployed contract. 140 func NewContractTransactor(address common.Address, transactor bind.ContractTransactor) (*ContractTransactor, error) { 141 contract, err := bindContract(address, nil, transactor, nil) 142 if err != nil { 143 return nil, err 144 } 145 return &ContractTransactor{contract: contract}, nil 146 } 147 148 // NewContractFilterer creates a new log filterer instance of Contract, bound to a specific deployed contract. 149 func NewContractFilterer(address common.Address, filterer bind.ContractFilterer) (*ContractFilterer, error) { 150 contract, err := bindContract(address, nil, nil, filterer) 151 if err != nil { 152 return nil, err 153 } 154 return &ContractFilterer{contract: contract}, nil 155 } 156 157 // bindContract binds a generic wrapper to an already deployed contract. 158 func bindContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 159 parsed, err := abi.JSON(strings.NewReader(ContractABI)) 160 if err != nil { 161 return nil, err 162 } 163 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 164 } 165 166 // Call invokes the (constant) contract method with params as input values and 167 // sets the output to result. The result type might be a single field for simple 168 // returns, a slice of interfaces for anonymous returns and a struct for named 169 // returns. 170 func (_Contract *ContractRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 171 return _Contract.Contract.ContractCaller.contract.Call(opts, result, method, params...) 172 } 173 174 // Transfer initiates a plain transaction to move funds to the contract, calling 175 // its default method if one is available. 176 func (_Contract *ContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 177 return _Contract.Contract.ContractTransactor.contract.Transfer(opts) 178 } 179 180 // Transact invokes the (paid) contract method with params as input values. 181 func (_Contract *ContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 182 return _Contract.Contract.ContractTransactor.contract.Transact(opts, method, params...) 183 } 184 185 // Call invokes the (constant) contract method with params as input values and 186 // sets the output to result. The result type might be a single field for simple 187 // returns, a slice of interfaces for anonymous returns and a struct for named 188 // returns. 189 func (_Contract *ContractCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 190 return _Contract.Contract.contract.Call(opts, result, method, params...) 191 } 192 193 // Transfer initiates a plain transaction to move funds to the contract, calling 194 // its default method if one is available. 195 func (_Contract *ContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 196 return _Contract.Contract.contract.Transfer(opts) 197 } 198 199 // Transact invokes the (paid) contract method with params as input values. 200 func (_Contract *ContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 201 return _Contract.Contract.contract.Transact(opts, method, params...) 202 } 203 204 // Chairperson is a free data retrieval call binding the contract method 0x2e4176cf. 205 // 206 // Solidity: function chairperson() view returns(address) 207 func (_Contract *ContractCaller) Chairperson(opts *bind.CallOpts) (common.Address, error) { 208 var out []interface{} 209 err := _Contract.contract.Call(opts, &out, "chairperson") 210 211 if err != nil { 212 return *new(common.Address), err 213 } 214 215 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 216 217 return out0, err 218 219 } 220 221 // Chairperson is a free data retrieval call binding the contract method 0x2e4176cf. 222 // 223 // Solidity: function chairperson() view returns(address) 224 func (_Contract *ContractSession) Chairperson() (common.Address, error) { 225 return _Contract.Contract.Chairperson(&_Contract.CallOpts) 226 } 227 228 // Chairperson is a free data retrieval call binding the contract method 0x2e4176cf. 229 // 230 // Solidity: function chairperson() view returns(address) 231 func (_Contract *ContractCallerSession) Chairperson() (common.Address, error) { 232 return _Contract.Contract.Chairperson(&_Contract.CallOpts) 233 } 234 235 // Proposals is a free data retrieval call binding the contract method 0x013cf08b. 236 // 237 // Solidity: function proposals(uint256 ) view returns(bytes32 name, uint256 voteCount) 238 func (_Contract *ContractCaller) Proposals(opts *bind.CallOpts, arg0 *big.Int) (struct { 239 Name [32]byte 240 VoteCount *big.Int 241 }, error) { 242 var out []interface{} 243 err := _Contract.contract.Call(opts, &out, "proposals", arg0) 244 245 outstruct := new(struct { 246 Name [32]byte 247 VoteCount *big.Int 248 }) 249 if err != nil { 250 return *outstruct, err 251 } 252 253 outstruct.Name = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) 254 outstruct.VoteCount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) 255 256 return *outstruct, err 257 258 } 259 260 // Proposals is a free data retrieval call binding the contract method 0x013cf08b. 261 // 262 // Solidity: function proposals(uint256 ) view returns(bytes32 name, uint256 voteCount) 263 func (_Contract *ContractSession) Proposals(arg0 *big.Int) (struct { 264 Name [32]byte 265 VoteCount *big.Int 266 }, error) { 267 return _Contract.Contract.Proposals(&_Contract.CallOpts, arg0) 268 } 269 270 // Proposals is a free data retrieval call binding the contract method 0x013cf08b. 271 // 272 // Solidity: function proposals(uint256 ) view returns(bytes32 name, uint256 voteCount) 273 func (_Contract *ContractCallerSession) Proposals(arg0 *big.Int) (struct { 274 Name [32]byte 275 VoteCount *big.Int 276 }, error) { 277 return _Contract.Contract.Proposals(&_Contract.CallOpts, arg0) 278 } 279 280 // Voters is a free data retrieval call binding the contract method 0xa3ec138d. 281 // 282 // Solidity: function voters(address ) view returns(uint256 weight, bool voted, address delegate, uint256 vote) 283 func (_Contract *ContractCaller) Voters(opts *bind.CallOpts, arg0 common.Address) (struct { 284 Weight *big.Int 285 Voted bool 286 Delegate common.Address 287 Vote *big.Int 288 }, error) { 289 var out []interface{} 290 err := _Contract.contract.Call(opts, &out, "voters", arg0) 291 292 outstruct := new(struct { 293 Weight *big.Int 294 Voted bool 295 Delegate common.Address 296 Vote *big.Int 297 }) 298 if err != nil { 299 return *outstruct, err 300 } 301 302 outstruct.Weight = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 303 outstruct.Voted = *abi.ConvertType(out[1], new(bool)).(*bool) 304 outstruct.Delegate = *abi.ConvertType(out[2], new(common.Address)).(*common.Address) 305 outstruct.Vote = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) 306 307 return *outstruct, err 308 309 } 310 311 // Voters is a free data retrieval call binding the contract method 0xa3ec138d. 312 // 313 // Solidity: function voters(address ) view returns(uint256 weight, bool voted, address delegate, uint256 vote) 314 func (_Contract *ContractSession) Voters(arg0 common.Address) (struct { 315 Weight *big.Int 316 Voted bool 317 Delegate common.Address 318 Vote *big.Int 319 }, error) { 320 return _Contract.Contract.Voters(&_Contract.CallOpts, arg0) 321 } 322 323 // Voters is a free data retrieval call binding the contract method 0xa3ec138d. 324 // 325 // Solidity: function voters(address ) view returns(uint256 weight, bool voted, address delegate, uint256 vote) 326 func (_Contract *ContractCallerSession) Voters(arg0 common.Address) (struct { 327 Weight *big.Int 328 Voted bool 329 Delegate common.Address 330 Vote *big.Int 331 }, error) { 332 return _Contract.Contract.Voters(&_Contract.CallOpts, arg0) 333 } 334 335 // WinnerName is a free data retrieval call binding the contract method 0xe2ba53f0. 336 // 337 // Solidity: function winnerName() view returns(bytes32 winnerName_) 338 func (_Contract *ContractCaller) WinnerName(opts *bind.CallOpts) ([32]byte, error) { 339 var out []interface{} 340 err := _Contract.contract.Call(opts, &out, "winnerName") 341 342 if err != nil { 343 return *new([32]byte), err 344 } 345 346 out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) 347 348 return out0, err 349 350 } 351 352 // WinnerName is a free data retrieval call binding the contract method 0xe2ba53f0. 353 // 354 // Solidity: function winnerName() view returns(bytes32 winnerName_) 355 func (_Contract *ContractSession) WinnerName() ([32]byte, error) { 356 return _Contract.Contract.WinnerName(&_Contract.CallOpts) 357 } 358 359 // WinnerName is a free data retrieval call binding the contract method 0xe2ba53f0. 360 // 361 // Solidity: function winnerName() view returns(bytes32 winnerName_) 362 func (_Contract *ContractCallerSession) WinnerName() ([32]byte, error) { 363 return _Contract.Contract.WinnerName(&_Contract.CallOpts) 364 } 365 366 // WinningProposal is a free data retrieval call binding the contract method 0x609ff1bd. 367 // 368 // Solidity: function winningProposal() view returns(uint256 winningProposal_) 369 func (_Contract *ContractCaller) WinningProposal(opts *bind.CallOpts) (*big.Int, error) { 370 var out []interface{} 371 err := _Contract.contract.Call(opts, &out, "winningProposal") 372 373 if err != nil { 374 return *new(*big.Int), err 375 } 376 377 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 378 379 return out0, err 380 381 } 382 383 // WinningProposal is a free data retrieval call binding the contract method 0x609ff1bd. 384 // 385 // Solidity: function winningProposal() view returns(uint256 winningProposal_) 386 func (_Contract *ContractSession) WinningProposal() (*big.Int, error) { 387 return _Contract.Contract.WinningProposal(&_Contract.CallOpts) 388 } 389 390 // WinningProposal is a free data retrieval call binding the contract method 0x609ff1bd. 391 // 392 // Solidity: function winningProposal() view returns(uint256 winningProposal_) 393 func (_Contract *ContractCallerSession) WinningProposal() (*big.Int, error) { 394 return _Contract.Contract.WinningProposal(&_Contract.CallOpts) 395 } 396 397 // Delegate is a paid mutator transaction binding the contract method 0x5c19a95c. 398 // 399 // Solidity: function delegate(address to) returns() 400 func (_Contract *ContractTransactor) Delegate(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { 401 return _Contract.contract.Transact(opts, "delegate", to) 402 } 403 404 // Delegate is a paid mutator transaction binding the contract method 0x5c19a95c. 405 // 406 // Solidity: function delegate(address to) returns() 407 func (_Contract *ContractSession) Delegate(to common.Address) (*types.Transaction, error) { 408 return _Contract.Contract.Delegate(&_Contract.TransactOpts, to) 409 } 410 411 // Delegate is a paid mutator transaction binding the contract method 0x5c19a95c. 412 // 413 // Solidity: function delegate(address to) returns() 414 func (_Contract *ContractTransactorSession) Delegate(to common.Address) (*types.Transaction, error) { 415 return _Contract.Contract.Delegate(&_Contract.TransactOpts, to) 416 } 417 418 // GiveRightToVote is a paid mutator transaction binding the contract method 0x9e7b8d61. 419 // 420 // Solidity: function giveRightToVote(address voter) returns() 421 func (_Contract *ContractTransactor) GiveRightToVote(opts *bind.TransactOpts, voter common.Address) (*types.Transaction, error) { 422 return _Contract.contract.Transact(opts, "giveRightToVote", voter) 423 } 424 425 // GiveRightToVote is a paid mutator transaction binding the contract method 0x9e7b8d61. 426 // 427 // Solidity: function giveRightToVote(address voter) returns() 428 func (_Contract *ContractSession) GiveRightToVote(voter common.Address) (*types.Transaction, error) { 429 return _Contract.Contract.GiveRightToVote(&_Contract.TransactOpts, voter) 430 } 431 432 // GiveRightToVote is a paid mutator transaction binding the contract method 0x9e7b8d61. 433 // 434 // Solidity: function giveRightToVote(address voter) returns() 435 func (_Contract *ContractTransactorSession) GiveRightToVote(voter common.Address) (*types.Transaction, error) { 436 return _Contract.Contract.GiveRightToVote(&_Contract.TransactOpts, voter) 437 } 438 439 // Vote is a paid mutator transaction binding the contract method 0x0121b93f. 440 // 441 // Solidity: function vote(uint256 proposal) returns() 442 func (_Contract *ContractTransactor) Vote(opts *bind.TransactOpts, proposal *big.Int) (*types.Transaction, error) { 443 return _Contract.contract.Transact(opts, "vote", proposal) 444 } 445 446 // Vote is a paid mutator transaction binding the contract method 0x0121b93f. 447 // 448 // Solidity: function vote(uint256 proposal) returns() 449 func (_Contract *ContractSession) Vote(proposal *big.Int) (*types.Transaction, error) { 450 return _Contract.Contract.Vote(&_Contract.TransactOpts, proposal) 451 } 452 453 // Vote is a paid mutator transaction binding the contract method 0x0121b93f. 454 // 455 // Solidity: function vote(uint256 proposal) returns() 456 func (_Contract *ContractTransactorSession) Vote(proposal *big.Int) (*types.Transaction, error) { 457 return _Contract.Contract.Vote(&_Contract.TransactOpts, proposal) 458 }