github.com/ethereum/go-ethereum@v1.16.1/accounts/abi/abigen/testdata/v2/dao.go.txt (about) 1 // Code generated via abigen V2 - DO NOT EDIT. 2 // This file is a generated binding and any manual changes will be lost. 3 4 package bindtests 5 6 import ( 7 "bytes" 8 "errors" 9 "math/big" 10 11 "github.com/ethereum/go-ethereum/accounts/abi" 12 "github.com/ethereum/go-ethereum/accounts/abi/bind/v2" 13 "github.com/ethereum/go-ethereum/common" 14 "github.com/ethereum/go-ethereum/core/types" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var ( 19 _ = bytes.Equal 20 _ = errors.New 21 _ = big.NewInt 22 _ = common.Big1 23 _ = types.BloomLookup 24 _ = abi.ConvertType 25 ) 26 27 // DAOMetaData contains all meta data concerning the DAO contract. 28 var DAOMetaData = bind.MetaData{ 29 ABI: "[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"votingDeadline\",\"type\":\"uint256\"},{\"name\":\"executed\",\"type\":\"bool\"},{\"name\":\"proposalPassed\",\"type\":\"bool\"},{\"name\":\"numberOfVotes\",\"type\":\"uint256\"},{\"name\":\"currentResult\",\"type\":\"int256\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"proposalNumber\",\"type\":\"uint256\"},{\"name\":\"transactionBytecode\",\"type\":\"bytes\"}],\"name\":\"executeProposal\",\"outputs\":[{\"name\":\"result\",\"type\":\"int256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"memberId\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numProposals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"members\",\"outputs\":[{\"name\":\"member\",\"type\":\"address\"},{\"name\":\"canVote\",\"type\":\"bool\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"memberSince\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"debatingPeriodInMinutes\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumQuorum\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"targetMember\",\"type\":\"address\"},{\"name\":\"canVote\",\"type\":\"bool\"},{\"name\":\"memberName\",\"type\":\"string\"}],\"name\":\"changeMembership\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"majorityMargin\",\"outputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"beneficiary\",\"type\":\"address\"},{\"name\":\"etherAmount\",\"type\":\"uint256\"},{\"name\":\"JobDescription\",\"type\":\"string\"},{\"name\":\"transactionBytecode\",\"type\":\"bytes\"}],\"name\":\"newProposal\",\"outputs\":[{\"name\":\"proposalID\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"minimumQuorumForProposals\",\"type\":\"uint256\"},{\"name\":\"minutesForDebate\",\"type\":\"uint256\"},{\"name\":\"marginOfVotesForMajority\",\"type\":\"int256\"}],\"name\":\"changeVotingRules\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"proposalNumber\",\"type\":\"uint256\"},{\"name\":\"supportsProposal\",\"type\":\"bool\"},{\"name\":\"justificationText\",\"type\":\"string\"}],\"name\":\"vote\",\"outputs\":[{\"name\":\"voteID\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"proposalNumber\",\"type\":\"uint256\"},{\"name\":\"beneficiary\",\"type\":\"address\"},{\"name\":\"etherAmount\",\"type\":\"uint256\"},{\"name\":\"transactionBytecode\",\"type\":\"bytes\"}],\"name\":\"checkProposalCode\",\"outputs\":[{\"name\":\"codeChecksOut\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"type\":\"function\"},{\"inputs\":[{\"name\":\"minimumQuorumForProposals\",\"type\":\"uint256\"},{\"name\":\"minutesForDebate\",\"type\":\"uint256\"},{\"name\":\"marginOfVotesForMajority\",\"type\":\"int256\"},{\"name\":\"congressLeader\",\"type\":\"address\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"description\",\"type\":\"string\"}],\"name\":\"ProposalAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"position\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"justification\",\"type\":\"string\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"result\",\"type\":\"int256\"},{\"indexed\":false,\"name\":\"quorum\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"active\",\"type\":\"bool\"}],\"name\":\"ProposalTallied\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"member\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"isMember\",\"type\":\"bool\"}],\"name\":\"MembershipChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"minimumQuorum\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"debatingPeriodInMinutes\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"majorityMargin\",\"type\":\"int256\"}],\"name\":\"ChangeOfRules\",\"type\":\"event\"}]", 30 ID: "d0a4ad96d49edb1c33461cebc6fb260919", 31 Bin: "0x606060405260405160808061145f833960e06040529051905160a05160c05160008054600160a060020a03191633179055600184815560028490556003839055600780549182018082558280158290116100b8576003028160030283600052602060002091820191016100b891906101c8565b50506060919091015160029190910155600160a060020a0381166000146100a65760008054600160a060020a031916821790555b505050506111f18061026e6000396000f35b505060408051608081018252600080825260208281018290528351908101845281815292820192909252426060820152600780549194509250811015610002579081527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6889050815181546020848101517401000000000000000000000000000000000000000002600160a060020a03199290921690921760a060020a60ff021916178255604083015180516001848101805460008281528690209195600293821615610100026000190190911692909204601f9081018390048201949192919091019083901061023e57805160ff19168380011785555b50610072929150610226565b5050600060028201556001015b8082111561023a578054600160a860020a031916815560018181018054600080835592600290821615610100026000190190911604601f81901061020c57506101bb565b601f0160209004906000526020600020908101906101bb91905b8082111561023a5760008155600101610226565b5090565b828001600101855582156101af579182015b828111156101af57825182600050559160200191906001019061025056606060405236156100b95760e060020a6000350463013cf08b81146100bb578063237e9492146101285780633910682114610281578063400e3949146102995780635daf08ca146102a257806369bd34361461032f5780638160f0b5146103385780638da5cb5b146103415780639644fcbd14610353578063aa02a90f146103be578063b1050da5146103c7578063bcca1fd3146104b5578063d3c0715b146104dc578063eceb29451461058d578063f2fde38b1461067b575b005b61069c6004356004805482908110156100025790600052602060002090600a02016000506005810154815460018301546003840154600485015460068601546007870154600160a060020a03959095169750929560020194919360ff828116946101009093041692919089565b60408051602060248035600481810135601f81018590048502860185019096528585526107759581359591946044949293909201918190840183828082843750949650505050505050600060006004600050848154811015610002575090527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e600a8402908101547f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b909101904210806101e65750600481015460ff165b8061026757508060000160009054906101000a9004600160a060020a03168160010160005054846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f15090500193505050506040518091039020816007016000505414155b8061027757506001546005820154105b1561109257610002565b61077560043560066020526000908152604090205481565b61077560055481565b61078760043560078054829081101561000257506000526003026000805160206111d18339815191528101547fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a820154600160a060020a0382169260a060020a90920460ff16917fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689019084565b61077560025481565b61077560015481565b610830600054600160a060020a031681565b604080516020604435600481810135601f81018490048402850184019095528484526100b9948135946024803595939460649492939101918190840183828082843750949650505050505050600080548190600160a060020a03908116339091161461084d57610002565b61077560035481565b604080516020604435600481810135601f8101849004840285018401909552848452610775948135946024803595939460649492939101918190840183828082843750506040805160209735808a0135601f81018a90048a0283018a019093528282529698976084979196506024909101945090925082915084018382808284375094965050505050505033600160a060020a031660009081526006602052604081205481908114806104ab5750604081205460078054909190811015610002579082526003026000805160206111d1833981519152015460a060020a900460ff16155b15610ce557610002565b6100b960043560243560443560005433600160a060020a03908116911614610b1857610002565b604080516020604435600481810135601f810184900484028501840190955284845261077594813594602480359593946064949293910191819084018382808284375094965050505050505033600160a060020a031660009081526006602052604081205481908114806105835750604081205460078054909190811015610002579082526003026000805160206111d18339815191520181505460a060020a900460ff16155b15610f1d57610002565b604080516020606435600481810135601f81018490048402850184019095528484526107759481359460248035956044359560849492019190819084018382808284375094965050505050505060006000600460005086815481101561000257908252600a027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01815090508484846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f150905001935050505060405180910390208160070160005054149150610cdc565b6100b960043560005433600160a060020a03908116911614610f0857610002565b604051808a600160a060020a031681526020018981526020018060200188815260200187815260200186815260200185815260200184815260200183815260200182810382528981815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561075e5780601f106107335761010080835404028352916020019161075e565b820191906000526020600020905b81548152906001019060200180831161074157829003601f168201915b50509a505050505050505050505060405180910390f35b60408051918252519081900360200190f35b60408051600160a060020a038616815260208101859052606081018390526080918101828152845460026001821615610100026000190190911604928201839052909160a08301908590801561081e5780601f106107f35761010080835404028352916020019161081e565b820191906000526020600020905b81548152906001019060200180831161080157829003601f168201915b50509550505050505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b600160a060020a03851660009081526006602052604081205414156108a957604060002060078054918290556001820180825582801582901161095c5760030281600302836000526020600020918201910161095c9190610a4f565b600160a060020a03851660009081526006602052604090205460078054919350908390811015610002575060005250600381026000805160206111d183398151915201805474ff0000000000000000000000000000000000000000191660a060020a85021781555b60408051600160a060020a03871681526020810186905281517f27b022af4a8347100c7a041ce5ccf8e14d644ff05de696315196faae8cd50c9b929181900390910190a15050505050565b505050915081506080604051908101604052808681526020018581526020018481526020014281526020015060076000508381548110156100025790600052602060002090600302016000508151815460208481015160a060020a02600160a060020a03199290921690921774ff00000000000000000000000000000000000000001916178255604083015180516001848101805460008281528690209195600293821615610100026000190190911692909204601f90810183900482019491929190910190839010610ad357805160ff19168380011785555b50610b03929150610abb565b5050600060028201556001015b80821115610acf57805474ffffffffffffffffffffffffffffffffffffffffff1916815560018181018054600080835592600290821615610100026000190190911604601f819010610aa15750610a42565b601f016020900490600052602060002090810190610a4291905b80821115610acf5760008155600101610abb565b5090565b82800160010185558215610a36579182015b82811115610a36578251826000505591602001919060010190610ae5565b50506060919091015160029190910155610911565b600183905560028290556003819055604080518481526020810184905280820183905290517fa439d3fa452be5e0e1e24a8145e715f4fd8b9c08c96a42fd82a855a85e5d57de9181900360600190a1505050565b50508585846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f150905001935050505060405180910390208160070160005081905550600260005054603c024201816003016000508190555060008160040160006101000a81548160ff0219169083021790555060008160040160016101000a81548160ff02191690830217905550600081600501600050819055507f646fec02522b41e7125cfc859a64fd4f4cefd5dc3b6237ca0abe251ded1fa881828787876040518085815260200184600160a060020a03168152602001838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f168015610cc45780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a1600182016005555b50949350505050565b6004805460018101808355909190828015829011610d1c57600a0281600a028360005260206000209182019101610d1c9190610db8565b505060048054929450918491508110156100025790600052602060002090600a02016000508054600160a060020a031916871781556001818101879055855160028381018054600082815260209081902096975091959481161561010002600019011691909104601f90810182900484019391890190839010610ed857805160ff19168380011785555b50610b6c929150610abb565b50506001015b80821115610acf578054600160a060020a03191681556000600182810182905560028381018054848255909281161561010002600019011604601f819010610e9c57505b5060006003830181905560048301805461ffff191690556005830181905560068301819055600783018190556008830180548282559082526020909120610db2916002028101905b80821115610acf57805474ffffffffffffffffffffffffffffffffffffffffff1916815560018181018054600080835592600290821615610100026000190190911604601f819010610eba57505b5050600101610e44565b601f016020900490600052602060002090810190610dfc9190610abb565b601f016020900490600052602060002090810190610e929190610abb565b82800160010185558215610da6579182015b82811115610da6578251826000505591602001919060010190610eea565b60008054600160a060020a0319168217905550565b600480548690811015610002576000918252600a027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01905033600160a060020a0316600090815260098201602052604090205490915060ff1660011415610f8457610002565b33600160a060020a031660009081526009820160205260409020805460ff1916600190811790915560058201805490910190558315610fcd576006810180546001019055610fda565b6006810180546000190190555b7fc34f869b7ff431b034b7b9aea9822dac189a685e0b015c7d1be3add3f89128e8858533866040518085815260200184815260200183600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f16801561107a5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a1509392505050565b6006810154600354901315611158578060000160009054906101000a9004600160a060020a0316600160a060020a03168160010160005054670de0b6b3a76400000284604051808280519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156111225780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876185025a03f15050505060048101805460ff191660011761ff00191661010017905561116d565b60048101805460ff191660011761ff00191690555b60068101546005820154600483015460408051888152602081019490945283810192909252610100900460ff166060830152517fd220b7272a8b6d0d7d6bcdace67b936a8f175e6d5c1b3ee438b72256b32ab3af9181900360800190a1509291505056a66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688", 32 } 33 34 // DAO is an auto generated Go binding around an Ethereum contract. 35 type DAO struct { 36 abi abi.ABI 37 } 38 39 // NewDAO creates a new instance of DAO. 40 func NewDAO() *DAO { 41 parsed, err := DAOMetaData.ParseABI() 42 if err != nil { 43 panic(errors.New("invalid ABI: " + err.Error())) 44 } 45 return &DAO{abi: *parsed} 46 } 47 48 // Instance creates a wrapper for a deployed contract instance at the given address. 49 // Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. 50 func (c *DAO) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { 51 return bind.NewBoundContract(addr, c.abi, backend, backend, backend) 52 } 53 54 // PackConstructor is the Go binding used to pack the parameters required for 55 // contract deployment. 56 // 57 // Solidity: constructor(uint256 minimumQuorumForProposals, uint256 minutesForDebate, int256 marginOfVotesForMajority, address congressLeader) returns() 58 func (dAO *DAO) PackConstructor(minimumQuorumForProposals *big.Int, minutesForDebate *big.Int, marginOfVotesForMajority *big.Int, congressLeader common.Address) []byte { 59 enc, err := dAO.abi.Pack("", minimumQuorumForProposals, minutesForDebate, marginOfVotesForMajority, congressLeader) 60 if err != nil { 61 panic(err) 62 } 63 return enc 64 } 65 66 // PackChangeMembership is the Go binding used to pack the parameters required for calling 67 // the contract method with ID 0x9644fcbd. This method will panic if any 68 // invalid/nil inputs are passed. 69 // 70 // Solidity: function changeMembership(address targetMember, bool canVote, string memberName) returns() 71 func (dAO *DAO) PackChangeMembership(targetMember common.Address, canVote bool, memberName string) []byte { 72 enc, err := dAO.abi.Pack("changeMembership", targetMember, canVote, memberName) 73 if err != nil { 74 panic(err) 75 } 76 return enc 77 } 78 79 // TryPackChangeMembership is the Go binding used to pack the parameters required for calling 80 // the contract method with ID 0x9644fcbd. This method will return an error 81 // if any inputs are invalid/nil. 82 // 83 // Solidity: function changeMembership(address targetMember, bool canVote, string memberName) returns() 84 func (dAO *DAO) TryPackChangeMembership(targetMember common.Address, canVote bool, memberName string) ([]byte, error) { 85 return dAO.abi.Pack("changeMembership", targetMember, canVote, memberName) 86 } 87 88 // PackChangeVotingRules is the Go binding used to pack the parameters required for calling 89 // the contract method with ID 0xbcca1fd3. This method will panic if any 90 // invalid/nil inputs are passed. 91 // 92 // Solidity: function changeVotingRules(uint256 minimumQuorumForProposals, uint256 minutesForDebate, int256 marginOfVotesForMajority) returns() 93 func (dAO *DAO) PackChangeVotingRules(minimumQuorumForProposals *big.Int, minutesForDebate *big.Int, marginOfVotesForMajority *big.Int) []byte { 94 enc, err := dAO.abi.Pack("changeVotingRules", minimumQuorumForProposals, minutesForDebate, marginOfVotesForMajority) 95 if err != nil { 96 panic(err) 97 } 98 return enc 99 } 100 101 // TryPackChangeVotingRules is the Go binding used to pack the parameters required for calling 102 // the contract method with ID 0xbcca1fd3. This method will return an error 103 // if any inputs are invalid/nil. 104 // 105 // Solidity: function changeVotingRules(uint256 minimumQuorumForProposals, uint256 minutesForDebate, int256 marginOfVotesForMajority) returns() 106 func (dAO *DAO) TryPackChangeVotingRules(minimumQuorumForProposals *big.Int, minutesForDebate *big.Int, marginOfVotesForMajority *big.Int) ([]byte, error) { 107 return dAO.abi.Pack("changeVotingRules", minimumQuorumForProposals, minutesForDebate, marginOfVotesForMajority) 108 } 109 110 // PackCheckProposalCode is the Go binding used to pack the parameters required for calling 111 // the contract method with ID 0xeceb2945. This method will panic if any 112 // invalid/nil inputs are passed. 113 // 114 // Solidity: function checkProposalCode(uint256 proposalNumber, address beneficiary, uint256 etherAmount, bytes transactionBytecode) returns(bool codeChecksOut) 115 func (dAO *DAO) PackCheckProposalCode(proposalNumber *big.Int, beneficiary common.Address, etherAmount *big.Int, transactionBytecode []byte) []byte { 116 enc, err := dAO.abi.Pack("checkProposalCode", proposalNumber, beneficiary, etherAmount, transactionBytecode) 117 if err != nil { 118 panic(err) 119 } 120 return enc 121 } 122 123 // TryPackCheckProposalCode is the Go binding used to pack the parameters required for calling 124 // the contract method with ID 0xeceb2945. This method will return an error 125 // if any inputs are invalid/nil. 126 // 127 // Solidity: function checkProposalCode(uint256 proposalNumber, address beneficiary, uint256 etherAmount, bytes transactionBytecode) returns(bool codeChecksOut) 128 func (dAO *DAO) TryPackCheckProposalCode(proposalNumber *big.Int, beneficiary common.Address, etherAmount *big.Int, transactionBytecode []byte) ([]byte, error) { 129 return dAO.abi.Pack("checkProposalCode", proposalNumber, beneficiary, etherAmount, transactionBytecode) 130 } 131 132 // UnpackCheckProposalCode is the Go binding that unpacks the parameters returned 133 // from invoking the contract method with ID 0xeceb2945. 134 // 135 // Solidity: function checkProposalCode(uint256 proposalNumber, address beneficiary, uint256 etherAmount, bytes transactionBytecode) returns(bool codeChecksOut) 136 func (dAO *DAO) UnpackCheckProposalCode(data []byte) (bool, error) { 137 out, err := dAO.abi.Unpack("checkProposalCode", data) 138 if err != nil { 139 return *new(bool), err 140 } 141 out0 := *abi.ConvertType(out[0], new(bool)).(*bool) 142 return out0, nil 143 } 144 145 // PackDebatingPeriodInMinutes is the Go binding used to pack the parameters required for calling 146 // the contract method with ID 0x69bd3436. This method will panic if any 147 // invalid/nil inputs are passed. 148 // 149 // Solidity: function debatingPeriodInMinutes() returns(uint256) 150 func (dAO *DAO) PackDebatingPeriodInMinutes() []byte { 151 enc, err := dAO.abi.Pack("debatingPeriodInMinutes") 152 if err != nil { 153 panic(err) 154 } 155 return enc 156 } 157 158 // TryPackDebatingPeriodInMinutes is the Go binding used to pack the parameters required for calling 159 // the contract method with ID 0x69bd3436. This method will return an error 160 // if any inputs are invalid/nil. 161 // 162 // Solidity: function debatingPeriodInMinutes() returns(uint256) 163 func (dAO *DAO) TryPackDebatingPeriodInMinutes() ([]byte, error) { 164 return dAO.abi.Pack("debatingPeriodInMinutes") 165 } 166 167 // UnpackDebatingPeriodInMinutes is the Go binding that unpacks the parameters returned 168 // from invoking the contract method with ID 0x69bd3436. 169 // 170 // Solidity: function debatingPeriodInMinutes() returns(uint256) 171 func (dAO *DAO) UnpackDebatingPeriodInMinutes(data []byte) (*big.Int, error) { 172 out, err := dAO.abi.Unpack("debatingPeriodInMinutes", data) 173 if err != nil { 174 return new(big.Int), err 175 } 176 out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) 177 return out0, nil 178 } 179 180 // PackExecuteProposal is the Go binding used to pack the parameters required for calling 181 // the contract method with ID 0x237e9492. This method will panic if any 182 // invalid/nil inputs are passed. 183 // 184 // Solidity: function executeProposal(uint256 proposalNumber, bytes transactionBytecode) returns(int256 result) 185 func (dAO *DAO) PackExecuteProposal(proposalNumber *big.Int, transactionBytecode []byte) []byte { 186 enc, err := dAO.abi.Pack("executeProposal", proposalNumber, transactionBytecode) 187 if err != nil { 188 panic(err) 189 } 190 return enc 191 } 192 193 // TryPackExecuteProposal is the Go binding used to pack the parameters required for calling 194 // the contract method with ID 0x237e9492. This method will return an error 195 // if any inputs are invalid/nil. 196 // 197 // Solidity: function executeProposal(uint256 proposalNumber, bytes transactionBytecode) returns(int256 result) 198 func (dAO *DAO) TryPackExecuteProposal(proposalNumber *big.Int, transactionBytecode []byte) ([]byte, error) { 199 return dAO.abi.Pack("executeProposal", proposalNumber, transactionBytecode) 200 } 201 202 // UnpackExecuteProposal is the Go binding that unpacks the parameters returned 203 // from invoking the contract method with ID 0x237e9492. 204 // 205 // Solidity: function executeProposal(uint256 proposalNumber, bytes transactionBytecode) returns(int256 result) 206 func (dAO *DAO) UnpackExecuteProposal(data []byte) (*big.Int, error) { 207 out, err := dAO.abi.Unpack("executeProposal", data) 208 if err != nil { 209 return new(big.Int), err 210 } 211 out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) 212 return out0, nil 213 } 214 215 // PackMajorityMargin is the Go binding used to pack the parameters required for calling 216 // the contract method with ID 0xaa02a90f. This method will panic if any 217 // invalid/nil inputs are passed. 218 // 219 // Solidity: function majorityMargin() returns(int256) 220 func (dAO *DAO) PackMajorityMargin() []byte { 221 enc, err := dAO.abi.Pack("majorityMargin") 222 if err != nil { 223 panic(err) 224 } 225 return enc 226 } 227 228 // TryPackMajorityMargin is the Go binding used to pack the parameters required for calling 229 // the contract method with ID 0xaa02a90f. This method will return an error 230 // if any inputs are invalid/nil. 231 // 232 // Solidity: function majorityMargin() returns(int256) 233 func (dAO *DAO) TryPackMajorityMargin() ([]byte, error) { 234 return dAO.abi.Pack("majorityMargin") 235 } 236 237 // UnpackMajorityMargin is the Go binding that unpacks the parameters returned 238 // from invoking the contract method with ID 0xaa02a90f. 239 // 240 // Solidity: function majorityMargin() returns(int256) 241 func (dAO *DAO) UnpackMajorityMargin(data []byte) (*big.Int, error) { 242 out, err := dAO.abi.Unpack("majorityMargin", data) 243 if err != nil { 244 return new(big.Int), err 245 } 246 out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) 247 return out0, nil 248 } 249 250 // PackMemberId is the Go binding used to pack the parameters required for calling 251 // the contract method with ID 0x39106821. This method will panic if any 252 // invalid/nil inputs are passed. 253 // 254 // Solidity: function memberId(address ) returns(uint256) 255 func (dAO *DAO) PackMemberId(arg0 common.Address) []byte { 256 enc, err := dAO.abi.Pack("memberId", arg0) 257 if err != nil { 258 panic(err) 259 } 260 return enc 261 } 262 263 // TryPackMemberId is the Go binding used to pack the parameters required for calling 264 // the contract method with ID 0x39106821. This method will return an error 265 // if any inputs are invalid/nil. 266 // 267 // Solidity: function memberId(address ) returns(uint256) 268 func (dAO *DAO) TryPackMemberId(arg0 common.Address) ([]byte, error) { 269 return dAO.abi.Pack("memberId", arg0) 270 } 271 272 // UnpackMemberId is the Go binding that unpacks the parameters returned 273 // from invoking the contract method with ID 0x39106821. 274 // 275 // Solidity: function memberId(address ) returns(uint256) 276 func (dAO *DAO) UnpackMemberId(data []byte) (*big.Int, error) { 277 out, err := dAO.abi.Unpack("memberId", data) 278 if err != nil { 279 return new(big.Int), err 280 } 281 out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) 282 return out0, nil 283 } 284 285 // PackMembers is the Go binding used to pack the parameters required for calling 286 // the contract method with ID 0x5daf08ca. This method will panic if any 287 // invalid/nil inputs are passed. 288 // 289 // Solidity: function members(uint256 ) returns(address member, bool canVote, string name, uint256 memberSince) 290 func (dAO *DAO) PackMembers(arg0 *big.Int) []byte { 291 enc, err := dAO.abi.Pack("members", arg0) 292 if err != nil { 293 panic(err) 294 } 295 return enc 296 } 297 298 // TryPackMembers is the Go binding used to pack the parameters required for calling 299 // the contract method with ID 0x5daf08ca. This method will return an error 300 // if any inputs are invalid/nil. 301 // 302 // Solidity: function members(uint256 ) returns(address member, bool canVote, string name, uint256 memberSince) 303 func (dAO *DAO) TryPackMembers(arg0 *big.Int) ([]byte, error) { 304 return dAO.abi.Pack("members", arg0) 305 } 306 307 // MembersOutput serves as a container for the return parameters of contract 308 // method Members. 309 type MembersOutput struct { 310 Member common.Address 311 CanVote bool 312 Name string 313 MemberSince *big.Int 314 } 315 316 // UnpackMembers is the Go binding that unpacks the parameters returned 317 // from invoking the contract method with ID 0x5daf08ca. 318 // 319 // Solidity: function members(uint256 ) returns(address member, bool canVote, string name, uint256 memberSince) 320 func (dAO *DAO) UnpackMembers(data []byte) (MembersOutput, error) { 321 out, err := dAO.abi.Unpack("members", data) 322 outstruct := new(MembersOutput) 323 if err != nil { 324 return *outstruct, err 325 } 326 outstruct.Member = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 327 outstruct.CanVote = *abi.ConvertType(out[1], new(bool)).(*bool) 328 outstruct.Name = *abi.ConvertType(out[2], new(string)).(*string) 329 outstruct.MemberSince = abi.ConvertType(out[3], new(big.Int)).(*big.Int) 330 return *outstruct, nil 331 } 332 333 // PackMinimumQuorum is the Go binding used to pack the parameters required for calling 334 // the contract method with ID 0x8160f0b5. This method will panic if any 335 // invalid/nil inputs are passed. 336 // 337 // Solidity: function minimumQuorum() returns(uint256) 338 func (dAO *DAO) PackMinimumQuorum() []byte { 339 enc, err := dAO.abi.Pack("minimumQuorum") 340 if err != nil { 341 panic(err) 342 } 343 return enc 344 } 345 346 // TryPackMinimumQuorum is the Go binding used to pack the parameters required for calling 347 // the contract method with ID 0x8160f0b5. This method will return an error 348 // if any inputs are invalid/nil. 349 // 350 // Solidity: function minimumQuorum() returns(uint256) 351 func (dAO *DAO) TryPackMinimumQuorum() ([]byte, error) { 352 return dAO.abi.Pack("minimumQuorum") 353 } 354 355 // UnpackMinimumQuorum is the Go binding that unpacks the parameters returned 356 // from invoking the contract method with ID 0x8160f0b5. 357 // 358 // Solidity: function minimumQuorum() returns(uint256) 359 func (dAO *DAO) UnpackMinimumQuorum(data []byte) (*big.Int, error) { 360 out, err := dAO.abi.Unpack("minimumQuorum", data) 361 if err != nil { 362 return new(big.Int), err 363 } 364 out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) 365 return out0, nil 366 } 367 368 // PackNewProposal is the Go binding used to pack the parameters required for calling 369 // the contract method with ID 0xb1050da5. This method will panic if any 370 // invalid/nil inputs are passed. 371 // 372 // Solidity: function newProposal(address beneficiary, uint256 etherAmount, string JobDescription, bytes transactionBytecode) returns(uint256 proposalID) 373 func (dAO *DAO) PackNewProposal(beneficiary common.Address, etherAmount *big.Int, jobDescription string, transactionBytecode []byte) []byte { 374 enc, err := dAO.abi.Pack("newProposal", beneficiary, etherAmount, jobDescription, transactionBytecode) 375 if err != nil { 376 panic(err) 377 } 378 return enc 379 } 380 381 // TryPackNewProposal is the Go binding used to pack the parameters required for calling 382 // the contract method with ID 0xb1050da5. This method will return an error 383 // if any inputs are invalid/nil. 384 // 385 // Solidity: function newProposal(address beneficiary, uint256 etherAmount, string JobDescription, bytes transactionBytecode) returns(uint256 proposalID) 386 func (dAO *DAO) TryPackNewProposal(beneficiary common.Address, etherAmount *big.Int, jobDescription string, transactionBytecode []byte) ([]byte, error) { 387 return dAO.abi.Pack("newProposal", beneficiary, etherAmount, jobDescription, transactionBytecode) 388 } 389 390 // UnpackNewProposal is the Go binding that unpacks the parameters returned 391 // from invoking the contract method with ID 0xb1050da5. 392 // 393 // Solidity: function newProposal(address beneficiary, uint256 etherAmount, string JobDescription, bytes transactionBytecode) returns(uint256 proposalID) 394 func (dAO *DAO) UnpackNewProposal(data []byte) (*big.Int, error) { 395 out, err := dAO.abi.Unpack("newProposal", data) 396 if err != nil { 397 return new(big.Int), err 398 } 399 out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) 400 return out0, nil 401 } 402 403 // PackNumProposals is the Go binding used to pack the parameters required for calling 404 // the contract method with ID 0x400e3949. This method will panic if any 405 // invalid/nil inputs are passed. 406 // 407 // Solidity: function numProposals() returns(uint256) 408 func (dAO *DAO) PackNumProposals() []byte { 409 enc, err := dAO.abi.Pack("numProposals") 410 if err != nil { 411 panic(err) 412 } 413 return enc 414 } 415 416 // TryPackNumProposals is the Go binding used to pack the parameters required for calling 417 // the contract method with ID 0x400e3949. This method will return an error 418 // if any inputs are invalid/nil. 419 // 420 // Solidity: function numProposals() returns(uint256) 421 func (dAO *DAO) TryPackNumProposals() ([]byte, error) { 422 return dAO.abi.Pack("numProposals") 423 } 424 425 // UnpackNumProposals is the Go binding that unpacks the parameters returned 426 // from invoking the contract method with ID 0x400e3949. 427 // 428 // Solidity: function numProposals() returns(uint256) 429 func (dAO *DAO) UnpackNumProposals(data []byte) (*big.Int, error) { 430 out, err := dAO.abi.Unpack("numProposals", data) 431 if err != nil { 432 return new(big.Int), err 433 } 434 out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) 435 return out0, nil 436 } 437 438 // PackOwner is the Go binding used to pack the parameters required for calling 439 // the contract method with ID 0x8da5cb5b. This method will panic if any 440 // invalid/nil inputs are passed. 441 // 442 // Solidity: function owner() returns(address) 443 func (dAO *DAO) PackOwner() []byte { 444 enc, err := dAO.abi.Pack("owner") 445 if err != nil { 446 panic(err) 447 } 448 return enc 449 } 450 451 // TryPackOwner is the Go binding used to pack the parameters required for calling 452 // the contract method with ID 0x8da5cb5b. This method will return an error 453 // if any inputs are invalid/nil. 454 // 455 // Solidity: function owner() returns(address) 456 func (dAO *DAO) TryPackOwner() ([]byte, error) { 457 return dAO.abi.Pack("owner") 458 } 459 460 // UnpackOwner is the Go binding that unpacks the parameters returned 461 // from invoking the contract method with ID 0x8da5cb5b. 462 // 463 // Solidity: function owner() returns(address) 464 func (dAO *DAO) UnpackOwner(data []byte) (common.Address, error) { 465 out, err := dAO.abi.Unpack("owner", data) 466 if err != nil { 467 return *new(common.Address), err 468 } 469 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 470 return out0, nil 471 } 472 473 // PackProposals is the Go binding used to pack the parameters required for calling 474 // the contract method with ID 0x013cf08b. This method will panic if any 475 // invalid/nil inputs are passed. 476 // 477 // Solidity: function proposals(uint256 ) returns(address recipient, uint256 amount, string description, uint256 votingDeadline, bool executed, bool proposalPassed, uint256 numberOfVotes, int256 currentResult, bytes32 proposalHash) 478 func (dAO *DAO) PackProposals(arg0 *big.Int) []byte { 479 enc, err := dAO.abi.Pack("proposals", arg0) 480 if err != nil { 481 panic(err) 482 } 483 return enc 484 } 485 486 // TryPackProposals is the Go binding used to pack the parameters required for calling 487 // the contract method with ID 0x013cf08b. This method will return an error 488 // if any inputs are invalid/nil. 489 // 490 // Solidity: function proposals(uint256 ) returns(address recipient, uint256 amount, string description, uint256 votingDeadline, bool executed, bool proposalPassed, uint256 numberOfVotes, int256 currentResult, bytes32 proposalHash) 491 func (dAO *DAO) TryPackProposals(arg0 *big.Int) ([]byte, error) { 492 return dAO.abi.Pack("proposals", arg0) 493 } 494 495 // ProposalsOutput serves as a container for the return parameters of contract 496 // method Proposals. 497 type ProposalsOutput struct { 498 Recipient common.Address 499 Amount *big.Int 500 Description string 501 VotingDeadline *big.Int 502 Executed bool 503 ProposalPassed bool 504 NumberOfVotes *big.Int 505 CurrentResult *big.Int 506 ProposalHash [32]byte 507 } 508 509 // UnpackProposals is the Go binding that unpacks the parameters returned 510 // from invoking the contract method with ID 0x013cf08b. 511 // 512 // Solidity: function proposals(uint256 ) returns(address recipient, uint256 amount, string description, uint256 votingDeadline, bool executed, bool proposalPassed, uint256 numberOfVotes, int256 currentResult, bytes32 proposalHash) 513 func (dAO *DAO) UnpackProposals(data []byte) (ProposalsOutput, error) { 514 out, err := dAO.abi.Unpack("proposals", data) 515 outstruct := new(ProposalsOutput) 516 if err != nil { 517 return *outstruct, err 518 } 519 outstruct.Recipient = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 520 outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(*big.Int) 521 outstruct.Description = *abi.ConvertType(out[2], new(string)).(*string) 522 outstruct.VotingDeadline = abi.ConvertType(out[3], new(big.Int)).(*big.Int) 523 outstruct.Executed = *abi.ConvertType(out[4], new(bool)).(*bool) 524 outstruct.ProposalPassed = *abi.ConvertType(out[5], new(bool)).(*bool) 525 outstruct.NumberOfVotes = abi.ConvertType(out[6], new(big.Int)).(*big.Int) 526 outstruct.CurrentResult = abi.ConvertType(out[7], new(big.Int)).(*big.Int) 527 outstruct.ProposalHash = *abi.ConvertType(out[8], new([32]byte)).(*[32]byte) 528 return *outstruct, nil 529 } 530 531 // PackTransferOwnership is the Go binding used to pack the parameters required for calling 532 // the contract method with ID 0xf2fde38b. This method will panic if any 533 // invalid/nil inputs are passed. 534 // 535 // Solidity: function transferOwnership(address newOwner) returns() 536 func (dAO *DAO) PackTransferOwnership(newOwner common.Address) []byte { 537 enc, err := dAO.abi.Pack("transferOwnership", newOwner) 538 if err != nil { 539 panic(err) 540 } 541 return enc 542 } 543 544 // TryPackTransferOwnership is the Go binding used to pack the parameters required for calling 545 // the contract method with ID 0xf2fde38b. This method will return an error 546 // if any inputs are invalid/nil. 547 // 548 // Solidity: function transferOwnership(address newOwner) returns() 549 func (dAO *DAO) TryPackTransferOwnership(newOwner common.Address) ([]byte, error) { 550 return dAO.abi.Pack("transferOwnership", newOwner) 551 } 552 553 // PackVote is the Go binding used to pack the parameters required for calling 554 // the contract method with ID 0xd3c0715b. This method will panic if any 555 // invalid/nil inputs are passed. 556 // 557 // Solidity: function vote(uint256 proposalNumber, bool supportsProposal, string justificationText) returns(uint256 voteID) 558 func (dAO *DAO) PackVote(proposalNumber *big.Int, supportsProposal bool, justificationText string) []byte { 559 enc, err := dAO.abi.Pack("vote", proposalNumber, supportsProposal, justificationText) 560 if err != nil { 561 panic(err) 562 } 563 return enc 564 } 565 566 // TryPackVote is the Go binding used to pack the parameters required for calling 567 // the contract method with ID 0xd3c0715b. This method will return an error 568 // if any inputs are invalid/nil. 569 // 570 // Solidity: function vote(uint256 proposalNumber, bool supportsProposal, string justificationText) returns(uint256 voteID) 571 func (dAO *DAO) TryPackVote(proposalNumber *big.Int, supportsProposal bool, justificationText string) ([]byte, error) { 572 return dAO.abi.Pack("vote", proposalNumber, supportsProposal, justificationText) 573 } 574 575 // UnpackVote is the Go binding that unpacks the parameters returned 576 // from invoking the contract method with ID 0xd3c0715b. 577 // 578 // Solidity: function vote(uint256 proposalNumber, bool supportsProposal, string justificationText) returns(uint256 voteID) 579 func (dAO *DAO) UnpackVote(data []byte) (*big.Int, error) { 580 out, err := dAO.abi.Unpack("vote", data) 581 if err != nil { 582 return new(big.Int), err 583 } 584 out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int) 585 return out0, nil 586 } 587 588 // DAOChangeOfRules represents a ChangeOfRules event raised by the DAO contract. 589 type DAOChangeOfRules struct { 590 MinimumQuorum *big.Int 591 DebatingPeriodInMinutes *big.Int 592 MajorityMargin *big.Int 593 Raw *types.Log // Blockchain specific contextual infos 594 } 595 596 const DAOChangeOfRulesEventName = "ChangeOfRules" 597 598 // ContractEventName returns the user-defined event name. 599 func (DAOChangeOfRules) ContractEventName() string { 600 return DAOChangeOfRulesEventName 601 } 602 603 // UnpackChangeOfRulesEvent is the Go binding that unpacks the event data emitted 604 // by contract. 605 // 606 // Solidity: event ChangeOfRules(uint256 minimumQuorum, uint256 debatingPeriodInMinutes, int256 majorityMargin) 607 func (dAO *DAO) UnpackChangeOfRulesEvent(log *types.Log) (*DAOChangeOfRules, error) { 608 event := "ChangeOfRules" 609 if log.Topics[0] != dAO.abi.Events[event].ID { 610 return nil, errors.New("event signature mismatch") 611 } 612 out := new(DAOChangeOfRules) 613 if len(log.Data) > 0 { 614 if err := dAO.abi.UnpackIntoInterface(out, event, log.Data); err != nil { 615 return nil, err 616 } 617 } 618 var indexed abi.Arguments 619 for _, arg := range dAO.abi.Events[event].Inputs { 620 if arg.Indexed { 621 indexed = append(indexed, arg) 622 } 623 } 624 if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { 625 return nil, err 626 } 627 out.Raw = log 628 return out, nil 629 } 630 631 // DAOMembershipChanged represents a MembershipChanged event raised by the DAO contract. 632 type DAOMembershipChanged struct { 633 Member common.Address 634 IsMember bool 635 Raw *types.Log // Blockchain specific contextual infos 636 } 637 638 const DAOMembershipChangedEventName = "MembershipChanged" 639 640 // ContractEventName returns the user-defined event name. 641 func (DAOMembershipChanged) ContractEventName() string { 642 return DAOMembershipChangedEventName 643 } 644 645 // UnpackMembershipChangedEvent is the Go binding that unpacks the event data emitted 646 // by contract. 647 // 648 // Solidity: event MembershipChanged(address member, bool isMember) 649 func (dAO *DAO) UnpackMembershipChangedEvent(log *types.Log) (*DAOMembershipChanged, error) { 650 event := "MembershipChanged" 651 if log.Topics[0] != dAO.abi.Events[event].ID { 652 return nil, errors.New("event signature mismatch") 653 } 654 out := new(DAOMembershipChanged) 655 if len(log.Data) > 0 { 656 if err := dAO.abi.UnpackIntoInterface(out, event, log.Data); err != nil { 657 return nil, err 658 } 659 } 660 var indexed abi.Arguments 661 for _, arg := range dAO.abi.Events[event].Inputs { 662 if arg.Indexed { 663 indexed = append(indexed, arg) 664 } 665 } 666 if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { 667 return nil, err 668 } 669 out.Raw = log 670 return out, nil 671 } 672 673 // DAOProposalAdded represents a ProposalAdded event raised by the DAO contract. 674 type DAOProposalAdded struct { 675 ProposalID *big.Int 676 Recipient common.Address 677 Amount *big.Int 678 Description string 679 Raw *types.Log // Blockchain specific contextual infos 680 } 681 682 const DAOProposalAddedEventName = "ProposalAdded" 683 684 // ContractEventName returns the user-defined event name. 685 func (DAOProposalAdded) ContractEventName() string { 686 return DAOProposalAddedEventName 687 } 688 689 // UnpackProposalAddedEvent is the Go binding that unpacks the event data emitted 690 // by contract. 691 // 692 // Solidity: event ProposalAdded(uint256 proposalID, address recipient, uint256 amount, string description) 693 func (dAO *DAO) UnpackProposalAddedEvent(log *types.Log) (*DAOProposalAdded, error) { 694 event := "ProposalAdded" 695 if log.Topics[0] != dAO.abi.Events[event].ID { 696 return nil, errors.New("event signature mismatch") 697 } 698 out := new(DAOProposalAdded) 699 if len(log.Data) > 0 { 700 if err := dAO.abi.UnpackIntoInterface(out, event, log.Data); err != nil { 701 return nil, err 702 } 703 } 704 var indexed abi.Arguments 705 for _, arg := range dAO.abi.Events[event].Inputs { 706 if arg.Indexed { 707 indexed = append(indexed, arg) 708 } 709 } 710 if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { 711 return nil, err 712 } 713 out.Raw = log 714 return out, nil 715 } 716 717 // DAOProposalTallied represents a ProposalTallied event raised by the DAO contract. 718 type DAOProposalTallied struct { 719 ProposalID *big.Int 720 Result *big.Int 721 Quorum *big.Int 722 Active bool 723 Raw *types.Log // Blockchain specific contextual infos 724 } 725 726 const DAOProposalTalliedEventName = "ProposalTallied" 727 728 // ContractEventName returns the user-defined event name. 729 func (DAOProposalTallied) ContractEventName() string { 730 return DAOProposalTalliedEventName 731 } 732 733 // UnpackProposalTalliedEvent is the Go binding that unpacks the event data emitted 734 // by contract. 735 // 736 // Solidity: event ProposalTallied(uint256 proposalID, int256 result, uint256 quorum, bool active) 737 func (dAO *DAO) UnpackProposalTalliedEvent(log *types.Log) (*DAOProposalTallied, error) { 738 event := "ProposalTallied" 739 if log.Topics[0] != dAO.abi.Events[event].ID { 740 return nil, errors.New("event signature mismatch") 741 } 742 out := new(DAOProposalTallied) 743 if len(log.Data) > 0 { 744 if err := dAO.abi.UnpackIntoInterface(out, event, log.Data); err != nil { 745 return nil, err 746 } 747 } 748 var indexed abi.Arguments 749 for _, arg := range dAO.abi.Events[event].Inputs { 750 if arg.Indexed { 751 indexed = append(indexed, arg) 752 } 753 } 754 if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { 755 return nil, err 756 } 757 out.Raw = log 758 return out, nil 759 } 760 761 // DAOVoted represents a Voted event raised by the DAO contract. 762 type DAOVoted struct { 763 ProposalID *big.Int 764 Position bool 765 Voter common.Address 766 Justification string 767 Raw *types.Log // Blockchain specific contextual infos 768 } 769 770 const DAOVotedEventName = "Voted" 771 772 // ContractEventName returns the user-defined event name. 773 func (DAOVoted) ContractEventName() string { 774 return DAOVotedEventName 775 } 776 777 // UnpackVotedEvent is the Go binding that unpacks the event data emitted 778 // by contract. 779 // 780 // Solidity: event Voted(uint256 proposalID, bool position, address voter, string justification) 781 func (dAO *DAO) UnpackVotedEvent(log *types.Log) (*DAOVoted, error) { 782 event := "Voted" 783 if log.Topics[0] != dAO.abi.Events[event].ID { 784 return nil, errors.New("event signature mismatch") 785 } 786 out := new(DAOVoted) 787 if len(log.Data) > 0 { 788 if err := dAO.abi.UnpackIntoInterface(out, event, log.Data); err != nil { 789 return nil, err 790 } 791 } 792 var indexed abi.Arguments 793 for _, arg := range dAO.abi.Events[event].Inputs { 794 if arg.Indexed { 795 indexed = append(indexed, arg) 796 } 797 } 798 if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil { 799 return nil, err 800 } 801 out.Raw = log 802 return out, nil 803 }