ditCoordinator.go 125 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058
  1. // Code generated - DO NOT EDIT.
  2. // This file is a generated binding and any manual changes will be lost.
  3. package ditCoordinator
  4. import (
  5. "math/big"
  6. "strings"
  7. ethereum "github.com/ethereum/go-ethereum"
  8. "github.com/ethereum/go-ethereum/accounts/abi"
  9. "github.com/ethereum/go-ethereum/accounts/abi/bind"
  10. "github.com/ethereum/go-ethereum/common"
  11. "github.com/ethereum/go-ethereum/core/types"
  12. "github.com/ethereum/go-ethereum/event"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var (
  16. _ = big.NewInt
  17. _ = strings.NewReader
  18. _ = ethereum.NotFound
  19. _ = abi.U256
  20. _ = bind.Bind
  21. _ = common.Big1
  22. _ = types.BloomLookup
  23. _ = event.NewSubscription
  24. )
  25. // KNWTokenContractABI is the input ABI used to generate the binding from.
  26. const KNWTokenContractABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_newVotingAddress\",\"type\":\"address\"}],\"name\":\"setVotingAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
  27. // KNWTokenContractBin is the compiled bytecode used for deploying new contracts.
  28. const KNWTokenContractBin = `0x`
  29. // DeployKNWTokenContract deploys a new Ethereum contract, binding an instance of KNWTokenContract to it.
  30. func DeployKNWTokenContract(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *KNWTokenContract, error) {
  31. parsed, err := abi.JSON(strings.NewReader(KNWTokenContractABI))
  32. if err != nil {
  33. return common.Address{}, nil, nil, err
  34. }
  35. address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(KNWTokenContractBin), backend)
  36. if err != nil {
  37. return common.Address{}, nil, nil, err
  38. }
  39. return address, tx, &KNWTokenContract{KNWTokenContractCaller: KNWTokenContractCaller{contract: contract}, KNWTokenContractTransactor: KNWTokenContractTransactor{contract: contract}, KNWTokenContractFilterer: KNWTokenContractFilterer{contract: contract}}, nil
  40. }
  41. // KNWTokenContract is an auto generated Go binding around an Ethereum contract.
  42. type KNWTokenContract struct {
  43. KNWTokenContractCaller // Read-only binding to the contract
  44. KNWTokenContractTransactor // Write-only binding to the contract
  45. KNWTokenContractFilterer // Log filterer for contract events
  46. }
  47. // KNWTokenContractCaller is an auto generated read-only Go binding around an Ethereum contract.
  48. type KNWTokenContractCaller struct {
  49. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  50. }
  51. // KNWTokenContractTransactor is an auto generated write-only Go binding around an Ethereum contract.
  52. type KNWTokenContractTransactor struct {
  53. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  54. }
  55. // KNWTokenContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  56. type KNWTokenContractFilterer struct {
  57. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  58. }
  59. // KNWTokenContractSession is an auto generated Go binding around an Ethereum contract,
  60. // with pre-set call and transact options.
  61. type KNWTokenContractSession struct {
  62. Contract *KNWTokenContract // Generic contract binding to set the session for
  63. CallOpts bind.CallOpts // Call options to use throughout this session
  64. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  65. }
  66. // KNWTokenContractCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  67. // with pre-set call options.
  68. type KNWTokenContractCallerSession struct {
  69. Contract *KNWTokenContractCaller // Generic contract caller binding to set the session for
  70. CallOpts bind.CallOpts // Call options to use throughout this session
  71. }
  72. // KNWTokenContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  73. // with pre-set transact options.
  74. type KNWTokenContractTransactorSession struct {
  75. Contract *KNWTokenContractTransactor // Generic contract transactor binding to set the session for
  76. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  77. }
  78. // KNWTokenContractRaw is an auto generated low-level Go binding around an Ethereum contract.
  79. type KNWTokenContractRaw struct {
  80. Contract *KNWTokenContract // Generic contract binding to access the raw methods on
  81. }
  82. // KNWTokenContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  83. type KNWTokenContractCallerRaw struct {
  84. Contract *KNWTokenContractCaller // Generic read-only contract binding to access the raw methods on
  85. }
  86. // KNWTokenContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  87. type KNWTokenContractTransactorRaw struct {
  88. Contract *KNWTokenContractTransactor // Generic write-only contract binding to access the raw methods on
  89. }
  90. // NewKNWTokenContract creates a new instance of KNWTokenContract, bound to a specific deployed contract.
  91. func NewKNWTokenContract(address common.Address, backend bind.ContractBackend) (*KNWTokenContract, error) {
  92. contract, err := bindKNWTokenContract(address, backend, backend, backend)
  93. if err != nil {
  94. return nil, err
  95. }
  96. return &KNWTokenContract{KNWTokenContractCaller: KNWTokenContractCaller{contract: contract}, KNWTokenContractTransactor: KNWTokenContractTransactor{contract: contract}, KNWTokenContractFilterer: KNWTokenContractFilterer{contract: contract}}, nil
  97. }
  98. // NewKNWTokenContractCaller creates a new read-only instance of KNWTokenContract, bound to a specific deployed contract.
  99. func NewKNWTokenContractCaller(address common.Address, caller bind.ContractCaller) (*KNWTokenContractCaller, error) {
  100. contract, err := bindKNWTokenContract(address, caller, nil, nil)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return &KNWTokenContractCaller{contract: contract}, nil
  105. }
  106. // NewKNWTokenContractTransactor creates a new write-only instance of KNWTokenContract, bound to a specific deployed contract.
  107. func NewKNWTokenContractTransactor(address common.Address, transactor bind.ContractTransactor) (*KNWTokenContractTransactor, error) {
  108. contract, err := bindKNWTokenContract(address, nil, transactor, nil)
  109. if err != nil {
  110. return nil, err
  111. }
  112. return &KNWTokenContractTransactor{contract: contract}, nil
  113. }
  114. // NewKNWTokenContractFilterer creates a new log filterer instance of KNWTokenContract, bound to a specific deployed contract.
  115. func NewKNWTokenContractFilterer(address common.Address, filterer bind.ContractFilterer) (*KNWTokenContractFilterer, error) {
  116. contract, err := bindKNWTokenContract(address, nil, nil, filterer)
  117. if err != nil {
  118. return nil, err
  119. }
  120. return &KNWTokenContractFilterer{contract: contract}, nil
  121. }
  122. // bindKNWTokenContract binds a generic wrapper to an already deployed contract.
  123. func bindKNWTokenContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  124. parsed, err := abi.JSON(strings.NewReader(KNWTokenContractABI))
  125. if err != nil {
  126. return nil, err
  127. }
  128. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  129. }
  130. // Call invokes the (constant) contract method with params as input values and
  131. // sets the output to result. The result type might be a single field for simple
  132. // returns, a slice of interfaces for anonymous returns and a struct for named
  133. // returns.
  134. func (_KNWTokenContract *KNWTokenContractRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  135. return _KNWTokenContract.Contract.KNWTokenContractCaller.contract.Call(opts, result, method, params...)
  136. }
  137. // Transfer initiates a plain transaction to move funds to the contract, calling
  138. // its default method if one is available.
  139. func (_KNWTokenContract *KNWTokenContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  140. return _KNWTokenContract.Contract.KNWTokenContractTransactor.contract.Transfer(opts)
  141. }
  142. // Transact invokes the (paid) contract method with params as input values.
  143. func (_KNWTokenContract *KNWTokenContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  144. return _KNWTokenContract.Contract.KNWTokenContractTransactor.contract.Transact(opts, method, params...)
  145. }
  146. // Call invokes the (constant) contract method with params as input values and
  147. // sets the output to result. The result type might be a single field for simple
  148. // returns, a slice of interfaces for anonymous returns and a struct for named
  149. // returns.
  150. func (_KNWTokenContract *KNWTokenContractCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  151. return _KNWTokenContract.Contract.contract.Call(opts, result, method, params...)
  152. }
  153. // Transfer initiates a plain transaction to move funds to the contract, calling
  154. // its default method if one is available.
  155. func (_KNWTokenContract *KNWTokenContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  156. return _KNWTokenContract.Contract.contract.Transfer(opts)
  157. }
  158. // Transact invokes the (paid) contract method with params as input values.
  159. func (_KNWTokenContract *KNWTokenContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  160. return _KNWTokenContract.Contract.contract.Transact(opts, method, params...)
  161. }
  162. // SetVotingAddress is a paid mutator transaction binding the contract method 0x7a6cfcab.
  163. //
  164. // Solidity: function setVotingAddress(address _newVotingAddress) returns()
  165. func (_KNWTokenContract *KNWTokenContractTransactor) SetVotingAddress(opts *bind.TransactOpts, _newVotingAddress common.Address) (*types.Transaction, error) {
  166. return _KNWTokenContract.contract.Transact(opts, "setVotingAddress", _newVotingAddress)
  167. }
  168. // SetVotingAddress is a paid mutator transaction binding the contract method 0x7a6cfcab.
  169. //
  170. // Solidity: function setVotingAddress(address _newVotingAddress) returns()
  171. func (_KNWTokenContract *KNWTokenContractSession) SetVotingAddress(_newVotingAddress common.Address) (*types.Transaction, error) {
  172. return _KNWTokenContract.Contract.SetVotingAddress(&_KNWTokenContract.TransactOpts, _newVotingAddress)
  173. }
  174. // SetVotingAddress is a paid mutator transaction binding the contract method 0x7a6cfcab.
  175. //
  176. // Solidity: function setVotingAddress(address _newVotingAddress) returns()
  177. func (_KNWTokenContract *KNWTokenContractTransactorSession) SetVotingAddress(_newVotingAddress common.Address) (*types.Transaction, error) {
  178. return _KNWTokenContract.Contract.SetVotingAddress(&_KNWTokenContract.TransactOpts, _newVotingAddress)
  179. }
  180. // KNWVotingContractABI is the input ABI used to generate the binding from.
  181. const KNWVotingContractABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_newKNWTokenAddress\",\"type\":\"address\"}],\"name\":\"setTokenAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"},{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_voteOption\",\"type\":\"uint256\"},{\"name\":\"_salt\",\"type\":\"uint256\"}],\"name\":\"revealVote\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"},{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_secretHash\",\"type\":\"bytes32\"}],\"name\":\"commitVote\",\"outputs\":[{\"name\":\"numVotes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_knowledgeLabel\",\"type\":\"string\"},{\"name\":\"_commitDuration\",\"type\":\"uint256\"},{\"name\":\"_revealDuration\",\"type\":\"uint256\"},{\"name\":\"_proposersStake\",\"type\":\"uint256\"}],\"name\":\"startPoll\",\"outputs\":[{\"name\":\"pollID\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newRepository\",\"type\":\"bytes32\"},{\"name\":\"_majority\",\"type\":\"uint256\"},{\"name\":\"_mintingMethod\",\"type\":\"uint256\"},{\"name\":\"_burningMethod\",\"type\":\"uint256\"}],\"name\":\"addNewRepository\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"},{\"name\":\"_voteOption\",\"type\":\"uint256\"},{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"resolveVote\",\"outputs\":[{\"name\":\"reward\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"resolvePoll\",\"outputs\":[{\"name\":\"votePassed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newCoordinatorAddress\",\"type\":\"address\"}],\"name\":\"setCoordinatorAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
  182. // KNWVotingContractBin is the compiled bytecode used for deploying new contracts.
  183. const KNWVotingContractBin = `0x`
  184. // DeployKNWVotingContract deploys a new Ethereum contract, binding an instance of KNWVotingContract to it.
  185. func DeployKNWVotingContract(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *KNWVotingContract, error) {
  186. parsed, err := abi.JSON(strings.NewReader(KNWVotingContractABI))
  187. if err != nil {
  188. return common.Address{}, nil, nil, err
  189. }
  190. address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(KNWVotingContractBin), backend)
  191. if err != nil {
  192. return common.Address{}, nil, nil, err
  193. }
  194. return address, tx, &KNWVotingContract{KNWVotingContractCaller: KNWVotingContractCaller{contract: contract}, KNWVotingContractTransactor: KNWVotingContractTransactor{contract: contract}, KNWVotingContractFilterer: KNWVotingContractFilterer{contract: contract}}, nil
  195. }
  196. // KNWVotingContract is an auto generated Go binding around an Ethereum contract.
  197. type KNWVotingContract struct {
  198. KNWVotingContractCaller // Read-only binding to the contract
  199. KNWVotingContractTransactor // Write-only binding to the contract
  200. KNWVotingContractFilterer // Log filterer for contract events
  201. }
  202. // KNWVotingContractCaller is an auto generated read-only Go binding around an Ethereum contract.
  203. type KNWVotingContractCaller struct {
  204. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  205. }
  206. // KNWVotingContractTransactor is an auto generated write-only Go binding around an Ethereum contract.
  207. type KNWVotingContractTransactor struct {
  208. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  209. }
  210. // KNWVotingContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  211. type KNWVotingContractFilterer struct {
  212. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  213. }
  214. // KNWVotingContractSession is an auto generated Go binding around an Ethereum contract,
  215. // with pre-set call and transact options.
  216. type KNWVotingContractSession struct {
  217. Contract *KNWVotingContract // Generic contract binding to set the session for
  218. CallOpts bind.CallOpts // Call options to use throughout this session
  219. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  220. }
  221. // KNWVotingContractCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  222. // with pre-set call options.
  223. type KNWVotingContractCallerSession struct {
  224. Contract *KNWVotingContractCaller // Generic contract caller binding to set the session for
  225. CallOpts bind.CallOpts // Call options to use throughout this session
  226. }
  227. // KNWVotingContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  228. // with pre-set transact options.
  229. type KNWVotingContractTransactorSession struct {
  230. Contract *KNWVotingContractTransactor // Generic contract transactor binding to set the session for
  231. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  232. }
  233. // KNWVotingContractRaw is an auto generated low-level Go binding around an Ethereum contract.
  234. type KNWVotingContractRaw struct {
  235. Contract *KNWVotingContract // Generic contract binding to access the raw methods on
  236. }
  237. // KNWVotingContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  238. type KNWVotingContractCallerRaw struct {
  239. Contract *KNWVotingContractCaller // Generic read-only contract binding to access the raw methods on
  240. }
  241. // KNWVotingContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  242. type KNWVotingContractTransactorRaw struct {
  243. Contract *KNWVotingContractTransactor // Generic write-only contract binding to access the raw methods on
  244. }
  245. // NewKNWVotingContract creates a new instance of KNWVotingContract, bound to a specific deployed contract.
  246. func NewKNWVotingContract(address common.Address, backend bind.ContractBackend) (*KNWVotingContract, error) {
  247. contract, err := bindKNWVotingContract(address, backend, backend, backend)
  248. if err != nil {
  249. return nil, err
  250. }
  251. return &KNWVotingContract{KNWVotingContractCaller: KNWVotingContractCaller{contract: contract}, KNWVotingContractTransactor: KNWVotingContractTransactor{contract: contract}, KNWVotingContractFilterer: KNWVotingContractFilterer{contract: contract}}, nil
  252. }
  253. // NewKNWVotingContractCaller creates a new read-only instance of KNWVotingContract, bound to a specific deployed contract.
  254. func NewKNWVotingContractCaller(address common.Address, caller bind.ContractCaller) (*KNWVotingContractCaller, error) {
  255. contract, err := bindKNWVotingContract(address, caller, nil, nil)
  256. if err != nil {
  257. return nil, err
  258. }
  259. return &KNWVotingContractCaller{contract: contract}, nil
  260. }
  261. // NewKNWVotingContractTransactor creates a new write-only instance of KNWVotingContract, bound to a specific deployed contract.
  262. func NewKNWVotingContractTransactor(address common.Address, transactor bind.ContractTransactor) (*KNWVotingContractTransactor, error) {
  263. contract, err := bindKNWVotingContract(address, nil, transactor, nil)
  264. if err != nil {
  265. return nil, err
  266. }
  267. return &KNWVotingContractTransactor{contract: contract}, nil
  268. }
  269. // NewKNWVotingContractFilterer creates a new log filterer instance of KNWVotingContract, bound to a specific deployed contract.
  270. func NewKNWVotingContractFilterer(address common.Address, filterer bind.ContractFilterer) (*KNWVotingContractFilterer, error) {
  271. contract, err := bindKNWVotingContract(address, nil, nil, filterer)
  272. if err != nil {
  273. return nil, err
  274. }
  275. return &KNWVotingContractFilterer{contract: contract}, nil
  276. }
  277. // bindKNWVotingContract binds a generic wrapper to an already deployed contract.
  278. func bindKNWVotingContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  279. parsed, err := abi.JSON(strings.NewReader(KNWVotingContractABI))
  280. if err != nil {
  281. return nil, err
  282. }
  283. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  284. }
  285. // Call invokes the (constant) contract method with params as input values and
  286. // sets the output to result. The result type might be a single field for simple
  287. // returns, a slice of interfaces for anonymous returns and a struct for named
  288. // returns.
  289. func (_KNWVotingContract *KNWVotingContractRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  290. return _KNWVotingContract.Contract.KNWVotingContractCaller.contract.Call(opts, result, method, params...)
  291. }
  292. // Transfer initiates a plain transaction to move funds to the contract, calling
  293. // its default method if one is available.
  294. func (_KNWVotingContract *KNWVotingContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  295. return _KNWVotingContract.Contract.KNWVotingContractTransactor.contract.Transfer(opts)
  296. }
  297. // Transact invokes the (paid) contract method with params as input values.
  298. func (_KNWVotingContract *KNWVotingContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  299. return _KNWVotingContract.Contract.KNWVotingContractTransactor.contract.Transact(opts, method, params...)
  300. }
  301. // Call invokes the (constant) contract method with params as input values and
  302. // sets the output to result. The result type might be a single field for simple
  303. // returns, a slice of interfaces for anonymous returns and a struct for named
  304. // returns.
  305. func (_KNWVotingContract *KNWVotingContractCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  306. return _KNWVotingContract.Contract.contract.Call(opts, result, method, params...)
  307. }
  308. // Transfer initiates a plain transaction to move funds to the contract, calling
  309. // its default method if one is available.
  310. func (_KNWVotingContract *KNWVotingContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  311. return _KNWVotingContract.Contract.contract.Transfer(opts)
  312. }
  313. // Transact invokes the (paid) contract method with params as input values.
  314. func (_KNWVotingContract *KNWVotingContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  315. return _KNWVotingContract.Contract.contract.Transact(opts, method, params...)
  316. }
  317. // ResolveVote is a free data retrieval call binding the contract method 0xce729fd2.
  318. //
  319. // Solidity: function resolveVote(uint256 _pollID, uint256 _voteOption, address _address) constant returns(uint256 reward)
  320. func (_KNWVotingContract *KNWVotingContractCaller) ResolveVote(opts *bind.CallOpts, _pollID *big.Int, _voteOption *big.Int, _address common.Address) (*big.Int, error) {
  321. var (
  322. ret0 = new(*big.Int)
  323. )
  324. out := ret0
  325. err := _KNWVotingContract.contract.Call(opts, out, "resolveVote", _pollID, _voteOption, _address)
  326. return *ret0, err
  327. }
  328. // ResolveVote is a free data retrieval call binding the contract method 0xce729fd2.
  329. //
  330. // Solidity: function resolveVote(uint256 _pollID, uint256 _voteOption, address _address) constant returns(uint256 reward)
  331. func (_KNWVotingContract *KNWVotingContractSession) ResolveVote(_pollID *big.Int, _voteOption *big.Int, _address common.Address) (*big.Int, error) {
  332. return _KNWVotingContract.Contract.ResolveVote(&_KNWVotingContract.CallOpts, _pollID, _voteOption, _address)
  333. }
  334. // ResolveVote is a free data retrieval call binding the contract method 0xce729fd2.
  335. //
  336. // Solidity: function resolveVote(uint256 _pollID, uint256 _voteOption, address _address) constant returns(uint256 reward)
  337. func (_KNWVotingContract *KNWVotingContractCallerSession) ResolveVote(_pollID *big.Int, _voteOption *big.Int, _address common.Address) (*big.Int, error) {
  338. return _KNWVotingContract.Contract.ResolveVote(&_KNWVotingContract.CallOpts, _pollID, _voteOption, _address)
  339. }
  340. // AddNewRepository is a paid mutator transaction binding the contract method 0xa3fba060.
  341. //
  342. // Solidity: function addNewRepository(bytes32 _newRepository, uint256 _majority, uint256 _mintingMethod, uint256 _burningMethod) returns()
  343. func (_KNWVotingContract *KNWVotingContractTransactor) AddNewRepository(opts *bind.TransactOpts, _newRepository [32]byte, _majority *big.Int, _mintingMethod *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
  344. return _KNWVotingContract.contract.Transact(opts, "addNewRepository", _newRepository, _majority, _mintingMethod, _burningMethod)
  345. }
  346. // AddNewRepository is a paid mutator transaction binding the contract method 0xa3fba060.
  347. //
  348. // Solidity: function addNewRepository(bytes32 _newRepository, uint256 _majority, uint256 _mintingMethod, uint256 _burningMethod) returns()
  349. func (_KNWVotingContract *KNWVotingContractSession) AddNewRepository(_newRepository [32]byte, _majority *big.Int, _mintingMethod *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
  350. return _KNWVotingContract.Contract.AddNewRepository(&_KNWVotingContract.TransactOpts, _newRepository, _majority, _mintingMethod, _burningMethod)
  351. }
  352. // AddNewRepository is a paid mutator transaction binding the contract method 0xa3fba060.
  353. //
  354. // Solidity: function addNewRepository(bytes32 _newRepository, uint256 _majority, uint256 _mintingMethod, uint256 _burningMethod) returns()
  355. func (_KNWVotingContract *KNWVotingContractTransactorSession) AddNewRepository(_newRepository [32]byte, _majority *big.Int, _mintingMethod *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
  356. return _KNWVotingContract.Contract.AddNewRepository(&_KNWVotingContract.TransactOpts, _newRepository, _majority, _mintingMethod, _burningMethod)
  357. }
  358. // CommitVote is a paid mutator transaction binding the contract method 0x7eb2ff52.
  359. //
  360. // Solidity: function commitVote(uint256 _pollID, address _address, bytes32 _secretHash) returns(uint256 numVotes)
  361. func (_KNWVotingContract *KNWVotingContractTransactor) CommitVote(opts *bind.TransactOpts, _pollID *big.Int, _address common.Address, _secretHash [32]byte) (*types.Transaction, error) {
  362. return _KNWVotingContract.contract.Transact(opts, "commitVote", _pollID, _address, _secretHash)
  363. }
  364. // CommitVote is a paid mutator transaction binding the contract method 0x7eb2ff52.
  365. //
  366. // Solidity: function commitVote(uint256 _pollID, address _address, bytes32 _secretHash) returns(uint256 numVotes)
  367. func (_KNWVotingContract *KNWVotingContractSession) CommitVote(_pollID *big.Int, _address common.Address, _secretHash [32]byte) (*types.Transaction, error) {
  368. return _KNWVotingContract.Contract.CommitVote(&_KNWVotingContract.TransactOpts, _pollID, _address, _secretHash)
  369. }
  370. // CommitVote is a paid mutator transaction binding the contract method 0x7eb2ff52.
  371. //
  372. // Solidity: function commitVote(uint256 _pollID, address _address, bytes32 _secretHash) returns(uint256 numVotes)
  373. func (_KNWVotingContract *KNWVotingContractTransactorSession) CommitVote(_pollID *big.Int, _address common.Address, _secretHash [32]byte) (*types.Transaction, error) {
  374. return _KNWVotingContract.Contract.CommitVote(&_KNWVotingContract.TransactOpts, _pollID, _address, _secretHash)
  375. }
  376. // ResolvePoll is a paid mutator transaction binding the contract method 0xe74fef37.
  377. //
  378. // Solidity: function resolvePoll(uint256 _pollID) returns(bool votePassed)
  379. func (_KNWVotingContract *KNWVotingContractTransactor) ResolvePoll(opts *bind.TransactOpts, _pollID *big.Int) (*types.Transaction, error) {
  380. return _KNWVotingContract.contract.Transact(opts, "resolvePoll", _pollID)
  381. }
  382. // ResolvePoll is a paid mutator transaction binding the contract method 0xe74fef37.
  383. //
  384. // Solidity: function resolvePoll(uint256 _pollID) returns(bool votePassed)
  385. func (_KNWVotingContract *KNWVotingContractSession) ResolvePoll(_pollID *big.Int) (*types.Transaction, error) {
  386. return _KNWVotingContract.Contract.ResolvePoll(&_KNWVotingContract.TransactOpts, _pollID)
  387. }
  388. // ResolvePoll is a paid mutator transaction binding the contract method 0xe74fef37.
  389. //
  390. // Solidity: function resolvePoll(uint256 _pollID) returns(bool votePassed)
  391. func (_KNWVotingContract *KNWVotingContractTransactorSession) ResolvePoll(_pollID *big.Int) (*types.Transaction, error) {
  392. return _KNWVotingContract.Contract.ResolvePoll(&_KNWVotingContract.TransactOpts, _pollID)
  393. }
  394. // RevealVote is a paid mutator transaction binding the contract method 0x34f2f2d2.
  395. //
  396. // Solidity: function revealVote(uint256 _pollID, address _address, uint256 _voteOption, uint256 _salt) returns()
  397. func (_KNWVotingContract *KNWVotingContractTransactor) RevealVote(opts *bind.TransactOpts, _pollID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
  398. return _KNWVotingContract.contract.Transact(opts, "revealVote", _pollID, _address, _voteOption, _salt)
  399. }
  400. // RevealVote is a paid mutator transaction binding the contract method 0x34f2f2d2.
  401. //
  402. // Solidity: function revealVote(uint256 _pollID, address _address, uint256 _voteOption, uint256 _salt) returns()
  403. func (_KNWVotingContract *KNWVotingContractSession) RevealVote(_pollID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
  404. return _KNWVotingContract.Contract.RevealVote(&_KNWVotingContract.TransactOpts, _pollID, _address, _voteOption, _salt)
  405. }
  406. // RevealVote is a paid mutator transaction binding the contract method 0x34f2f2d2.
  407. //
  408. // Solidity: function revealVote(uint256 _pollID, address _address, uint256 _voteOption, uint256 _salt) returns()
  409. func (_KNWVotingContract *KNWVotingContractTransactorSession) RevealVote(_pollID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
  410. return _KNWVotingContract.Contract.RevealVote(&_KNWVotingContract.TransactOpts, _pollID, _address, _voteOption, _salt)
  411. }
  412. // SetCoordinatorAddress is a paid mutator transaction binding the contract method 0xf354b838.
  413. //
  414. // Solidity: function setCoordinatorAddress(address _newCoordinatorAddress) returns()
  415. func (_KNWVotingContract *KNWVotingContractTransactor) SetCoordinatorAddress(opts *bind.TransactOpts, _newCoordinatorAddress common.Address) (*types.Transaction, error) {
  416. return _KNWVotingContract.contract.Transact(opts, "setCoordinatorAddress", _newCoordinatorAddress)
  417. }
  418. // SetCoordinatorAddress is a paid mutator transaction binding the contract method 0xf354b838.
  419. //
  420. // Solidity: function setCoordinatorAddress(address _newCoordinatorAddress) returns()
  421. func (_KNWVotingContract *KNWVotingContractSession) SetCoordinatorAddress(_newCoordinatorAddress common.Address) (*types.Transaction, error) {
  422. return _KNWVotingContract.Contract.SetCoordinatorAddress(&_KNWVotingContract.TransactOpts, _newCoordinatorAddress)
  423. }
  424. // SetCoordinatorAddress is a paid mutator transaction binding the contract method 0xf354b838.
  425. //
  426. // Solidity: function setCoordinatorAddress(address _newCoordinatorAddress) returns()
  427. func (_KNWVotingContract *KNWVotingContractTransactorSession) SetCoordinatorAddress(_newCoordinatorAddress common.Address) (*types.Transaction, error) {
  428. return _KNWVotingContract.Contract.SetCoordinatorAddress(&_KNWVotingContract.TransactOpts, _newCoordinatorAddress)
  429. }
  430. // SetTokenAddress is a paid mutator transaction binding the contract method 0x26a4e8d2.
  431. //
  432. // Solidity: function setTokenAddress(address _newKNWTokenAddress) returns()
  433. func (_KNWVotingContract *KNWVotingContractTransactor) SetTokenAddress(opts *bind.TransactOpts, _newKNWTokenAddress common.Address) (*types.Transaction, error) {
  434. return _KNWVotingContract.contract.Transact(opts, "setTokenAddress", _newKNWTokenAddress)
  435. }
  436. // SetTokenAddress is a paid mutator transaction binding the contract method 0x26a4e8d2.
  437. //
  438. // Solidity: function setTokenAddress(address _newKNWTokenAddress) returns()
  439. func (_KNWVotingContract *KNWVotingContractSession) SetTokenAddress(_newKNWTokenAddress common.Address) (*types.Transaction, error) {
  440. return _KNWVotingContract.Contract.SetTokenAddress(&_KNWVotingContract.TransactOpts, _newKNWTokenAddress)
  441. }
  442. // SetTokenAddress is a paid mutator transaction binding the contract method 0x26a4e8d2.
  443. //
  444. // Solidity: function setTokenAddress(address _newKNWTokenAddress) returns()
  445. func (_KNWVotingContract *KNWVotingContractTransactorSession) SetTokenAddress(_newKNWTokenAddress common.Address) (*types.Transaction, error) {
  446. return _KNWVotingContract.Contract.SetTokenAddress(&_KNWVotingContract.TransactOpts, _newKNWTokenAddress)
  447. }
  448. // StartPoll is a paid mutator transaction binding the contract method 0x9156cd07.
  449. //
  450. // Solidity: function startPoll(bytes32 _repository, address _address, string _knowledgeLabel, uint256 _commitDuration, uint256 _revealDuration, uint256 _proposersStake) returns(uint256 pollID)
  451. func (_KNWVotingContract *KNWVotingContractTransactor) StartPoll(opts *bind.TransactOpts, _repository [32]byte, _address common.Address, _knowledgeLabel string, _commitDuration *big.Int, _revealDuration *big.Int, _proposersStake *big.Int) (*types.Transaction, error) {
  452. return _KNWVotingContract.contract.Transact(opts, "startPoll", _repository, _address, _knowledgeLabel, _commitDuration, _revealDuration, _proposersStake)
  453. }
  454. // StartPoll is a paid mutator transaction binding the contract method 0x9156cd07.
  455. //
  456. // Solidity: function startPoll(bytes32 _repository, address _address, string _knowledgeLabel, uint256 _commitDuration, uint256 _revealDuration, uint256 _proposersStake) returns(uint256 pollID)
  457. func (_KNWVotingContract *KNWVotingContractSession) StartPoll(_repository [32]byte, _address common.Address, _knowledgeLabel string, _commitDuration *big.Int, _revealDuration *big.Int, _proposersStake *big.Int) (*types.Transaction, error) {
  458. return _KNWVotingContract.Contract.StartPoll(&_KNWVotingContract.TransactOpts, _repository, _address, _knowledgeLabel, _commitDuration, _revealDuration, _proposersStake)
  459. }
  460. // StartPoll is a paid mutator transaction binding the contract method 0x9156cd07.
  461. //
  462. // Solidity: function startPoll(bytes32 _repository, address _address, string _knowledgeLabel, uint256 _commitDuration, uint256 _revealDuration, uint256 _proposersStake) returns(uint256 pollID)
  463. func (_KNWVotingContract *KNWVotingContractTransactorSession) StartPoll(_repository [32]byte, _address common.Address, _knowledgeLabel string, _commitDuration *big.Int, _revealDuration *big.Int, _proposersStake *big.Int) (*types.Transaction, error) {
  464. return _KNWVotingContract.Contract.StartPoll(&_KNWVotingContract.TransactOpts, _repository, _address, _knowledgeLabel, _commitDuration, _revealDuration, _proposersStake)
  465. }
  466. // SafeMathABI is the input ABI used to generate the binding from.
  467. const SafeMathABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"a\",\"type\":\"uint256\"}],\"name\":\"sqrt\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]"
  468. // SafeMathBin is the compiled bytecode used for deploying new contracts.
  469. const SafeMathBin = `0x61016b610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106100575763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663677342ce811461005c575b600080fd5b610067600435610079565b60408051918252519081900360200190f35b6000808083151561008d5760009250610138565b6001840184106100fe57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f466c6177656420696e70757420666f7220737172740000000000000000000000604482015290519081900360640190fd5b505060026001830104825b80821015610134575080600281808681151561012157fe5b040181151561012c57fe5b049150610109565b8192505b50509190505600a165627a7a72305820ce9eba5c2c770e6489e8634ca0a14db23dee696aa56e1247aac6317c7eab01bd0029`
  470. // DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it.
  471. func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) {
  472. parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
  473. if err != nil {
  474. return common.Address{}, nil, nil, err
  475. }
  476. address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend)
  477. if err != nil {
  478. return common.Address{}, nil, nil, err
  479. }
  480. return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
  481. }
  482. // SafeMath is an auto generated Go binding around an Ethereum contract.
  483. type SafeMath struct {
  484. SafeMathCaller // Read-only binding to the contract
  485. SafeMathTransactor // Write-only binding to the contract
  486. SafeMathFilterer // Log filterer for contract events
  487. }
  488. // SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract.
  489. type SafeMathCaller struct {
  490. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  491. }
  492. // SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract.
  493. type SafeMathTransactor struct {
  494. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  495. }
  496. // SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  497. type SafeMathFilterer struct {
  498. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  499. }
  500. // SafeMathSession is an auto generated Go binding around an Ethereum contract,
  501. // with pre-set call and transact options.
  502. type SafeMathSession struct {
  503. Contract *SafeMath // Generic contract binding to set the session for
  504. CallOpts bind.CallOpts // Call options to use throughout this session
  505. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  506. }
  507. // SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  508. // with pre-set call options.
  509. type SafeMathCallerSession struct {
  510. Contract *SafeMathCaller // Generic contract caller binding to set the session for
  511. CallOpts bind.CallOpts // Call options to use throughout this session
  512. }
  513. // SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  514. // with pre-set transact options.
  515. type SafeMathTransactorSession struct {
  516. Contract *SafeMathTransactor // Generic contract transactor binding to set the session for
  517. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  518. }
  519. // SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract.
  520. type SafeMathRaw struct {
  521. Contract *SafeMath // Generic contract binding to access the raw methods on
  522. }
  523. // SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  524. type SafeMathCallerRaw struct {
  525. Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on
  526. }
  527. // SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  528. type SafeMathTransactorRaw struct {
  529. Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on
  530. }
  531. // NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract.
  532. func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) {
  533. contract, err := bindSafeMath(address, backend, backend, backend)
  534. if err != nil {
  535. return nil, err
  536. }
  537. return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
  538. }
  539. // NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract.
  540. func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) {
  541. contract, err := bindSafeMath(address, caller, nil, nil)
  542. if err != nil {
  543. return nil, err
  544. }
  545. return &SafeMathCaller{contract: contract}, nil
  546. }
  547. // NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract.
  548. func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) {
  549. contract, err := bindSafeMath(address, nil, transactor, nil)
  550. if err != nil {
  551. return nil, err
  552. }
  553. return &SafeMathTransactor{contract: contract}, nil
  554. }
  555. // NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract.
  556. func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) {
  557. contract, err := bindSafeMath(address, nil, nil, filterer)
  558. if err != nil {
  559. return nil, err
  560. }
  561. return &SafeMathFilterer{contract: contract}, nil
  562. }
  563. // bindSafeMath binds a generic wrapper to an already deployed contract.
  564. func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  565. parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
  566. if err != nil {
  567. return nil, err
  568. }
  569. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  570. }
  571. // Call invokes the (constant) contract method with params as input values and
  572. // sets the output to result. The result type might be a single field for simple
  573. // returns, a slice of interfaces for anonymous returns and a struct for named
  574. // returns.
  575. func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  576. return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...)
  577. }
  578. // Transfer initiates a plain transaction to move funds to the contract, calling
  579. // its default method if one is available.
  580. func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  581. return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts)
  582. }
  583. // Transact invokes the (paid) contract method with params as input values.
  584. func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  585. return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...)
  586. }
  587. // Call invokes the (constant) contract method with params as input values and
  588. // sets the output to result. The result type might be a single field for simple
  589. // returns, a slice of interfaces for anonymous returns and a struct for named
  590. // returns.
  591. func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  592. return _SafeMath.Contract.contract.Call(opts, result, method, params...)
  593. }
  594. // Transfer initiates a plain transaction to move funds to the contract, calling
  595. // its default method if one is available.
  596. func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  597. return _SafeMath.Contract.contract.Transfer(opts)
  598. }
  599. // Transact invokes the (paid) contract method with params as input values.
  600. func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  601. return _SafeMath.Contract.contract.Transact(opts, method, params...)
  602. }
  603. // Sqrt is a free data retrieval call binding the contract method 0x677342ce.
  604. //
  605. // Solidity: function sqrt(uint256 a) constant returns(uint256)
  606. func (_SafeMath *SafeMathCaller) Sqrt(opts *bind.CallOpts, a *big.Int) (*big.Int, error) {
  607. var (
  608. ret0 = new(*big.Int)
  609. )
  610. out := ret0
  611. err := _SafeMath.contract.Call(opts, out, "sqrt", a)
  612. return *ret0, err
  613. }
  614. // Sqrt is a free data retrieval call binding the contract method 0x677342ce.
  615. //
  616. // Solidity: function sqrt(uint256 a) constant returns(uint256)
  617. func (_SafeMath *SafeMathSession) Sqrt(a *big.Int) (*big.Int, error) {
  618. return _SafeMath.Contract.Sqrt(&_SafeMath.CallOpts, a)
  619. }
  620. // Sqrt is a free data retrieval call binding the contract method 0x677342ce.
  621. //
  622. // Solidity: function sqrt(uint256 a) constant returns(uint256)
  623. func (_SafeMath *SafeMathCallerSession) Sqrt(a *big.Int) (*big.Int, error) {
  624. return _SafeMath.Contract.Sqrt(&_SafeMath.CallOpts, a)
  625. }
  626. // DitCoordinatorABI is the input ABI used to generate the binding from.
  627. const DitCoordinatorABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"getKNWVoteIDFromProposalID\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_knowledgeLabelIndex\",\"type\":\"uint256\"},{\"name\":\"_voteCommitDuration\",\"type\":\"uint256\"},{\"name\":\"_voteOpenDuration\",\"type\":\"uint256\"}],\"name\":\"proposeCommit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"}],\"name\":\"getCurrentProposalID\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_voteOption\",\"type\":\"uint256\"},{\"name\":\"_voteSalt\",\"type\":\"uint256\"}],\"name\":\"openVoteOnProposal\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"isKYCValidator\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"repositories\",\"outputs\":[{\"name\":\"votingMajority\",\"type\":\"uint256\"},{\"name\":\"mintingMethod\",\"type\":\"uint256\"},{\"name\":\"burningMethod\",\"type\":\"uint256\"},{\"name\":\"currentProposalID\",\"type\":\"uint256\"},{\"name\":\"minVoteCommitDuration\",\"type\":\"uint256\"},{\"name\":\"maxVoteCommitDuration\",\"type\":\"uint256\"},{\"name\":\"minVoteOpenDuration\",\"type\":\"uint256\"},{\"name\":\"maxVoteOpenDuration\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"finalizeVote\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"revokeKYC\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalsOfRepository\",\"outputs\":[{\"name\":\"KNWVoteID\",\"type\":\"uint256\"},{\"name\":\"knowledgeLabel\",\"type\":\"string\"},{\"name\":\"proposer\",\"type\":\"address\"},{\"name\":\"isFinalized\",\"type\":\"bool\"},{\"name\":\"proposalAccepted\",\"type\":\"bool\"},{\"name\":\"individualStake\",\"type\":\"uint256\"},{\"name\":\"totalStake\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_label1\",\"type\":\"string\"},{\"name\":\"_label2\",\"type\":\"string\"},{\"name\":\"_label3\",\"type\":\"string\"},{\"name\":\"_voteSettings\",\"type\":\"uint256[7]\"}],\"name\":\"initRepository\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"getIndividualStake\",\"outputs\":[{\"name\":\"individualStake\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"removeKYCValidator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"proposalHasPassed\",\"outputs\":[{\"name\":\"hasPassed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_knowledgeLabelID\",\"type\":\"uint256\"}],\"name\":\"getKnowledgeLabels\",\"outputs\":[{\"name\":\"knowledgeLabel\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"KNWTokenAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_voteHash\",\"type\":\"bytes32\"}],\"name\":\"voteOnProposal\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"passedKYC\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"addKYCValidator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"}],\"name\":\"repositoryIsInitialized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"KNWVotingAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"passKYC\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_KNWTokenAddress\",\"type\":\"address\"},{\"name\":\"_KNWVotingAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"label\",\"type\":\"string\"}],\"name\":\"ProposeCommit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"label\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"stake\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"numberOfVotes\",\"type\":\"uint256\"}],\"name\":\"CommitVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"label\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"accept\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"numberOfVotes\",\"type\":\"uint256\"}],\"name\":\"OpenVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"label\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"accepted\",\"type\":\"bool\"}],\"name\":\"FinalizeVote\",\"type\":\"event\"}]"
  628. // DitCoordinatorBin is the compiled bytecode used for deploying new contracts.
  629. const DitCoordinatorBin = `0x608060405234801561001057600080fd5b506040516040806121f3833981016040528051602090910151600160a060020a038116158015906100495750600160a060020a03821615155b15156100dc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4b4e57566f74696e6720616e64204b4e57546f6b656e2061646472657373206360448201527f616e277420626520656d70747900000000000000000000000000000000000000606482015290519081900360840190fd5b60008054600160a060020a03928316600160a060020a031991821617808355600280548316918516919091179055600180549484169482169490941780855560038054909216931692909217909155338152600760205260409020805460ff191690911790556120a2806101516000396000f30060806040526004361061011c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306ee459681146101215780630aba86881461014e5780630bdc90e8146101645780630ee62ec01461017c5780631341f25c1461019d5780631f51fd71146101d25780632e71d0fb1461022b57806339ba645b146102465780633e029f631461026757806351f43c2414610335578063552edc9d1461037357806373b0dddd1461038e57806387c9203d146103af57806395332229146103ca578063985dbfc51461045a578063a34c299a1461048b578063ccd9aa681461049c578063d0c397ef146104bd578063ea6c6d0f146104de578063eb49fe94146104f6578063eb9310241461050b575b600080fd5b34801561012d57600080fd5b5061013c60043560243561052c565b60408051918252519081900360200190f35b610162600435602435604435606435610549565b005b34801561017057600080fd5b5061013c600435610c29565b34801561018857600080fd5b50610162600435602435604435606435610c3e565b3480156101a957600080fd5b506101be600160a060020a0360043516610e05565b604080519115158252519081900360200190f35b3480156101de57600080fd5b506101ea600435610e1a565b604080519889526020890197909752878701959095526060870193909352608086019190915260a085015260c084015260e083015251908190036101000190f35b34801561023757600080fd5b50610162600435602435610e62565b34801561025257600080fd5b50610162600160a060020a0360043516611373565b34801561027357600080fd5b506102826004356024356113b3565b60408051888152600160a060020a038716918101919091528415156060820152831515608082015260a0810183905260c0810182905260e0602080830182815289519284019290925288516101008401918a019080838360005b838110156102f45781810151838201526020016102dc565b50505050905090810190601f1680156103215780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b34801561034157600080fd5b506101be60048035906024803580820192908101359160443580820192908101359160643590810191013560846114a7565b34801561037f57600080fd5b5061013c6004356024356117f9565b34801561039a57600080fd5b50610162600160a060020a0360043516611819565b3480156103bb57600080fd5b506101be600435602435611859565b3480156103d657600080fd5b506103e5600435602435611913565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561041f578181015183820152602001610407565b50505050905090810190601f16801561044c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561046657600080fd5b5061046f6119c1565b60408051600160a060020a039092168252519081900360200190f35b6101626004356024356044356119d0565b3480156104a857600080fd5b506101be600160a060020a0360043516611d53565b3480156104c957600080fd5b50610162600160a060020a0360043516611d68565b3480156104ea57600080fd5b506101be600435611dab565b34801561050257600080fd5b5061046f611dc1565b34801561051757600080fd5b50610162600160a060020a0360043516611dd0565b600091825260056020908152604080842092845291905290205490565b3360008181526006602052604090205460ff16151561056757600080fd5b600034116105e5576040805160e560020a62461bcd02815260206004820152602860248201527f56616c7565206f6620746865207472616e73616374696f6e2063616e206e6f7460448201527f206265207a65726f000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600085815260046020526040812085600381106105fe57fe5b0154600260001961010060018416150201909116041161068d576040805160e560020a62461bcd028152602060048201526024808201527f4b6e6f776c656467652d4c6162656c20696e646578206973206e6f7420636f7260448201527f7265637400000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008581526004602052604090206007015483108015906106bf57506000858152600460205260409020600801548311155b1515610715576040805160e560020a62461bcd02815260206004820152601c60248201527f566f746520636f6d6d6974206475726174696f6e20696e76616c696400000000604482015290519081900360640190fd5b600085815260046020526040902060090154821080159061074757506000858152600460205260409020600a01548211155b151561079d576040805160e560020a62461bcd02815260206004820152601a60248201527f566f7465206f70656e206475726174696f6e20696e76616c6964000000000000604482015290519081900360640190fd5b6000858152600460205260409020600601546107c090600163ffffffff611e1316565b600086815260046020526040908190206006810192909255805160e0810190915260025490918291600160a060020a031690639156cd0790899033908a6003811061080757fe5b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff871602815260048101858152600160a060020a0385166024830152606482018d9052608482018c90523460a4830181905260c0604484019081529490930180546002610100600183161502600019019091160460c4840181905290948e948e9490939260e490910190879080156108e55780601f106108ba576101008083540402835291602001916108e5565b820191906000526020600020905b8154815290600101906020018083116108c857829003601f168201915b5050975050505050505050602060405180830381600087803b15801561090a57600080fd5b505af115801561091e573d6000803e3d6000fd5b505050506040513d602081101561093457600080fd5b505181526000878152600460209081526040909120910190866003811061095757fe5b01805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109dc5780601f106109b1576101008083540402835291602001916109dc565b820191906000526020600020905b8154815290600101906020018083116109bf57829003601f168201915b505050918352505033602080830191909152600060408084018290526060840182905234608085015260a09093018190528881526005825282812060048352838220600601548252825291909120825181558282015180519192610a4892600185019290910190611f25565b5060408281015160028301805460608601516080870151151575010000000000000000000000000000000000000000000275ff0000000000000000000000000000000000000000001991151560a060020a0274ff000000000000000000000000000000000000000019600160a060020a0390961673ffffffffffffffffffffffffffffffffffffffff199094169390931794909416919091171691909117905560a0830151600383015560c0909201516004918201556000878152600560209081528382208382528483206006015483529052919091200154610b31903463ffffffff611e1316565b6000868152600560209081526040808320600480845282852060068101805487529285529285208101959095559289905292905254339187907f171fe77c3addce776991159eb3eb73b14d9187ebd06c1c34ea12355a84ddbd83908860038110610b9757fe5b6040805160208082529390920180546002600019610100600184161502019091160493830184905292829182019084908015610c145780601f10610be957610100808354040283529160200191610c14565b820191906000526020600020905b815481529060010190602001808311610bf757829003601f168201915b50509250505060405180910390a45050505050565b60009081526004602052604090206006015490565b3360008181526006602052604090205460ff161515610c5c57600080fd5b60025460008681526005602090815260408083208884529091528082205481517f34f2f2d2000000000000000000000000000000000000000000000000000000008152600481019190915233602482015260448101879052606481018690529051600160a060020a03909316926334f2f2d29260848084019391929182900301818387803b158015610ced57600080fd5b505af1158015610d01573d6000803e3d6000fd5b505050600086815260056020818152604080842089855282528084203380865293810183529381902060018082018a9055905482518a8314948101859052928301819052606080845295820180546002600019948216156101000294909401169290920495830186905293955089948b947f864c0d6987266fd72e7e37f1fbc98b6a3794b7187dae454c67a2a626628a72ab94929390918190608082019086908015610dee5780601f10610dc357610100808354040283529160200191610dee565b820191906000526020600020905b815481529060010190602001808311610dd157829003601f168201915b505094505050505060405180910390a45050505050565b60076020526000908152604090205460ff1681565b600460205280600052604060002060009150905080600301549080600401549080600501549080600601549080600701549080600801549080600901549080600a0154905088565b3360008181526006602052604081205490919060ff161515610e8357600080fd5b60008481526005602081815260408084208785528252808420338552909201905290206002015460ff1615610f28576040805160e560020a62461bcd02815260206004820152602760248201527f45616368207061727469636970616e742063616e206f6e6c792066696e616c6960448201527f7a65206f6e636500000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000848152600560208181526040808420878552825280842033855290920190528120541180610f7c57506000848152600560209081526040808320868452909152902060020154600160a060020a031633145b1515610ff8576040805160e560020a62461bcd02815260206004820152603a60248201527f4f6e6c79207061727469636970616e7473206f662074686520766f746520617260448201527f652061626c6520746f207265736f6c76652074686520766f7465000000000000606482015290519081900360840190fd5b600084815260056020908152604080832086845290915290206002015460a060020a900460ff16151561120e57600254600085815260056020908152604080832087845282528083205481517fe74fef3700000000000000000000000000000000000000000000000000000000815260048101919091529051600160a060020a039094169363e74fef3793602480840194938390030190829087803b1580156110a057600080fd5b505af11580156110b4573d6000803e3d6000fd5b505050506040513d60208110156110ca57600080fd5b505160008581526005602090815260408083208784528252918290206002808201805474ff000000000000000000000000000000000000000019961515750100000000000000000000000000000000000000000090810275ff00000000000000000000000000000000000000000019909216919091179690961660a060020a1790819055845195900460ff16801515938601939093528385526001918201805492831615610100026000190190921604928401839052869388937f6bd2699645e0f6c5547bdf0d053280e48fef1ab21514bd02c88610b1279b942a93919081906060820190859080156111fe5780601f106111d3576101008083540402835291602001916111fe565b820191906000526020600020905b8154815290600101906020018083116111e157829003601f168201915b5050935050505060405180910390a35b600254600085815260056020818152604080842088855282528084208054338087529190940183528185206001015482517fce729fd200000000000000000000000000000000000000000000000000000000815260048101959095526024850152604484015251600160a060020a039094169363ce729fd2936064808501948390030190829087803b1580156112a357600080fd5b505af11580156112b7573d6000803e3d6000fd5b505050506040513d60208110156112cd57600080fd5b50519150600082111561130957604051339083156108fc029084906000818181858888f19350505050158015611307573d6000803e3d6000fd5b505b6000848152600560209081526040808320868452909152902060040154611336908363ffffffff611e9d16565b600094855260056020818152604080882096885295815285872060048101939093553387529101905250509020600201805460ff19166001179055565b3360008181526007602052604090205460ff16151561139157600080fd5b50600160a060020a03166000908152600660205260409020805460ff19169055565b60056020908152600092835260408084208252918352918190208054600180830180548551600293821615610100026000190190911692909204601f81018790048702830187019095528482529194929390928301828280156114575780601f1061142c57610100808354040283529160200191611457565b820191906000526020600020905b81548152906001019060200180831161143a57829003601f168201915b505050600284015460038501546004909501549394600160a060020a0382169460ff60a060020a840481169550750100000000000000000000000000000000000000000090930490921692509087565b3360008181526006602052604081205490919060ff1615156114c857600080fd5b891515611545576040805160e560020a62461bcd02815260206004820152602360248201527f5265706f7369746f72792064657363726970746f722063616e2774206265207a60448201527f65726f0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008a815260046020526040902060030154156115d2576040805160e560020a62461bcd02815260206004820152602760248201527f5265706f7369746f72792063616e206f6e6c7920626520696e697469616c697a60448201527f6564206f6e636500000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008811806115e15750600086115b806115ec5750600084115b1515611667576040805160e560020a62461bcd028152602060048201526024808201527f50726f76696465206174206c65617374206f6e65204b6e6f776c65646765204c60448201527f6162656c00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b604080516101a06020601f8c01819004028201810190925261018081018a8152909182916101208301918291908e908e908190870183828082843782019150505050505081526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437505050929093525050508152843560208083019190915285013560408083019190915285013560608201526000608082015260a00184600360209081029190910135825260808601358282015260a086013560408084019190915260c087013560609093019290925260008d815260049091522081516117959082906003611fa3565b506020820151600382015560408201516004820155606082015160058201556080820151600682015560a0820151600782015560c0820151600882015560e0820151600982015561010090910151600a909101555060019998505050505050505050565b600091825260056020908152604080842092845291905290206003015490565b3360008181526007602052604090205460ff16151561183757600080fd5b50600160a060020a03166000908152600760205260409020805460ff19169055565b600082815260056020908152604080832084845290915281206002015460a060020a900460ff1615156118d6576040805160e560020a62461bcd02815260206004820152601d60248201527f50726f706f73616c206861736e2774206265656e207265736f6c766564000000604482015290519081900360640190fd5b5060009182526005602090815260408084209284529190529020600201547501000000000000000000000000000000000000000000900460ff1690565b6000828152600460205260409020606090826003811061192f57fe5b01805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156119b45780601f10611989576101008083540402835291602001916119b4565b820191906000526020600020905b81548152906001019060200180831161199757829003601f168201915b5050505050905092915050565b600154600160a060020a031681565b3360008181526006602052604081205490919060ff1615156119f157600080fd5b60008581526005602090815260408083208784529091529020600301543414611a8a576040805160e560020a62461bcd02815260206004820152603960248201527f56616c7565206f6620746865207472616e73616374696f6e20646f65736e277460448201527f206d6174636820746865207265717569726564207374616b6500000000000000606482015290519081900360840190fd5b6000858152600560209081526040808320878452909152902060020154600160a060020a0316331415611b2d576040805160e560020a62461bcd02815260206004820152603160248201527f5468652070726f706f736572206973206e6f7420616c6c6f77656420746f207660448201527f6f746520696e20612070726f706f73616c000000000000000000000000000000606482015290519081900360840190fd5b6000858152600560209081526040808320878452909152902060040154611b5a903463ffffffff611e1316565b60008681526005602090815260408083208884528252808320600480820195909555600254905482517f7eb2ff5200000000000000000000000000000000000000000000000000000000815295860152336024860152604485018890529051600160a060020a0390911693637eb2ff529360648083019493928390030190829087803b158015611be957600080fd5b505af1158015611bfd573d6000803e3d6000fd5b505050506040513d6020811015611c1357600080fd5b5051915060008211611c95576040805160e560020a62461bcd02815260206004820152603360248201527f566f74696e6720636f6e74726163742072657475726e656420616e20696e766160448201527f6c696420616d6f756e74206f6620766f74657300000000000000000000000000606482015290519081900360840190fd5b600085815260056020818152604080842088855280835281852033808752948101845282862088905594899052825280513492810183905290810186905260608082526001948501805460026101009782161597909702600019011695909504908201819052929388938a937fa01eea487bb3ec75528c167ccf90452d4164ddda7b13c55b2a89751a8dc5fbc19390918991908190608082019086908015610dee5780601f10610dc357610100808354040283529160200191610dee565b60066020526000908152604090205460ff1681565b3360008181526007602052604090205460ff161515611d8657600080fd5b50600160a060020a03166000908152600760205260409020805460ff19166001179055565b6000908152600460205260408120600301541190565b600054600160a060020a031681565b3360008181526007602052604090205460ff161515611dee57600080fd5b50600160a060020a03166000908152600660205260409020805460ff19166001179055565b600082820183811015611e96576040805160e560020a62461bcd02815260206004820152602a60248201527f526573756c742068617320746f20626520626967676572207468616e20626f7460448201527f682073756d6d616e647300000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b60008083831115611f1e576040805160e560020a62461bcd02815260206004820152603560248201527f43616e27742073756274726163742061206e756d6265722066726f6d2061207360448201527f6d616c6c6572206f6e6520776974682075696e74730000000000000000000000606482015290519081900360840190fd5b5050900390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611f6657805160ff1916838001178555611f93565b82800160010185558215611f93579182015b82811115611f93578251825591602001919060010190611f78565b50611f9f929150611fef565b5090565b8260038101928215611fe3579160200282015b82811115611fe35782518051611fd3918491602090910190611f25565b5091602001919060010190611fb6565b50611f9f92915061200c565b61200991905b80821115611f9f5760008155600101611ff5565b90565b61200991905b80821115611f9f576000612026828261202f565b50600101612012565b50805460018160011615610100020316600290046000825580601f106120555750612073565b601f0160209004906000526020600020908101906120739190611fef565b505600a165627a7a72305820dfe23797f55902824dd698c2dd6d6a698dafbbb4e55266e33047a06088a7048b0029`
  630. // DeployDitCoordinator deploys a new Ethereum contract, binding an instance of DitCoordinator to it.
  631. func DeployDitCoordinator(auth *bind.TransactOpts, backend bind.ContractBackend, _KNWTokenAddress common.Address, _KNWVotingAddress common.Address) (common.Address, *types.Transaction, *DitCoordinator, error) {
  632. parsed, err := abi.JSON(strings.NewReader(DitCoordinatorABI))
  633. if err != nil {
  634. return common.Address{}, nil, nil, err
  635. }
  636. address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(DitCoordinatorBin), backend, _KNWTokenAddress, _KNWVotingAddress)
  637. if err != nil {
  638. return common.Address{}, nil, nil, err
  639. }
  640. return address, tx, &DitCoordinator{DitCoordinatorCaller: DitCoordinatorCaller{contract: contract}, DitCoordinatorTransactor: DitCoordinatorTransactor{contract: contract}, DitCoordinatorFilterer: DitCoordinatorFilterer{contract: contract}}, nil
  641. }
  642. // DitCoordinator is an auto generated Go binding around an Ethereum contract.
  643. type DitCoordinator struct {
  644. DitCoordinatorCaller // Read-only binding to the contract
  645. DitCoordinatorTransactor // Write-only binding to the contract
  646. DitCoordinatorFilterer // Log filterer for contract events
  647. }
  648. // DitCoordinatorCaller is an auto generated read-only Go binding around an Ethereum contract.
  649. type DitCoordinatorCaller struct {
  650. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  651. }
  652. // DitCoordinatorTransactor is an auto generated write-only Go binding around an Ethereum contract.
  653. type DitCoordinatorTransactor struct {
  654. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  655. }
  656. // DitCoordinatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  657. type DitCoordinatorFilterer struct {
  658. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  659. }
  660. // DitCoordinatorSession is an auto generated Go binding around an Ethereum contract,
  661. // with pre-set call and transact options.
  662. type DitCoordinatorSession struct {
  663. Contract *DitCoordinator // Generic contract binding to set the session for
  664. CallOpts bind.CallOpts // Call options to use throughout this session
  665. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  666. }
  667. // DitCoordinatorCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  668. // with pre-set call options.
  669. type DitCoordinatorCallerSession struct {
  670. Contract *DitCoordinatorCaller // Generic contract caller binding to set the session for
  671. CallOpts bind.CallOpts // Call options to use throughout this session
  672. }
  673. // DitCoordinatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  674. // with pre-set transact options.
  675. type DitCoordinatorTransactorSession struct {
  676. Contract *DitCoordinatorTransactor // Generic contract transactor binding to set the session for
  677. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  678. }
  679. // DitCoordinatorRaw is an auto generated low-level Go binding around an Ethereum contract.
  680. type DitCoordinatorRaw struct {
  681. Contract *DitCoordinator // Generic contract binding to access the raw methods on
  682. }
  683. // DitCoordinatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  684. type DitCoordinatorCallerRaw struct {
  685. Contract *DitCoordinatorCaller // Generic read-only contract binding to access the raw methods on
  686. }
  687. // DitCoordinatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  688. type DitCoordinatorTransactorRaw struct {
  689. Contract *DitCoordinatorTransactor // Generic write-only contract binding to access the raw methods on
  690. }
  691. // NewDitCoordinator creates a new instance of DitCoordinator, bound to a specific deployed contract.
  692. func NewDitCoordinator(address common.Address, backend bind.ContractBackend) (*DitCoordinator, error) {
  693. contract, err := bindDitCoordinator(address, backend, backend, backend)
  694. if err != nil {
  695. return nil, err
  696. }
  697. return &DitCoordinator{DitCoordinatorCaller: DitCoordinatorCaller{contract: contract}, DitCoordinatorTransactor: DitCoordinatorTransactor{contract: contract}, DitCoordinatorFilterer: DitCoordinatorFilterer{contract: contract}}, nil
  698. }
  699. // NewDitCoordinatorCaller creates a new read-only instance of DitCoordinator, bound to a specific deployed contract.
  700. func NewDitCoordinatorCaller(address common.Address, caller bind.ContractCaller) (*DitCoordinatorCaller, error) {
  701. contract, err := bindDitCoordinator(address, caller, nil, nil)
  702. if err != nil {
  703. return nil, err
  704. }
  705. return &DitCoordinatorCaller{contract: contract}, nil
  706. }
  707. // NewDitCoordinatorTransactor creates a new write-only instance of DitCoordinator, bound to a specific deployed contract.
  708. func NewDitCoordinatorTransactor(address common.Address, transactor bind.ContractTransactor) (*DitCoordinatorTransactor, error) {
  709. contract, err := bindDitCoordinator(address, nil, transactor, nil)
  710. if err != nil {
  711. return nil, err
  712. }
  713. return &DitCoordinatorTransactor{contract: contract}, nil
  714. }
  715. // NewDitCoordinatorFilterer creates a new log filterer instance of DitCoordinator, bound to a specific deployed contract.
  716. func NewDitCoordinatorFilterer(address common.Address, filterer bind.ContractFilterer) (*DitCoordinatorFilterer, error) {
  717. contract, err := bindDitCoordinator(address, nil, nil, filterer)
  718. if err != nil {
  719. return nil, err
  720. }
  721. return &DitCoordinatorFilterer{contract: contract}, nil
  722. }
  723. // bindDitCoordinator binds a generic wrapper to an already deployed contract.
  724. func bindDitCoordinator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  725. parsed, err := abi.JSON(strings.NewReader(DitCoordinatorABI))
  726. if err != nil {
  727. return nil, err
  728. }
  729. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  730. }
  731. // Call invokes the (constant) contract method with params as input values and
  732. // sets the output to result. The result type might be a single field for simple
  733. // returns, a slice of interfaces for anonymous returns and a struct for named
  734. // returns.
  735. func (_DitCoordinator *DitCoordinatorRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  736. return _DitCoordinator.Contract.DitCoordinatorCaller.contract.Call(opts, result, method, params...)
  737. }
  738. // Transfer initiates a plain transaction to move funds to the contract, calling
  739. // its default method if one is available.
  740. func (_DitCoordinator *DitCoordinatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  741. return _DitCoordinator.Contract.DitCoordinatorTransactor.contract.Transfer(opts)
  742. }
  743. // Transact invokes the (paid) contract method with params as input values.
  744. func (_DitCoordinator *DitCoordinatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  745. return _DitCoordinator.Contract.DitCoordinatorTransactor.contract.Transact(opts, method, params...)
  746. }
  747. // Call invokes the (constant) contract method with params as input values and
  748. // sets the output to result. The result type might be a single field for simple
  749. // returns, a slice of interfaces for anonymous returns and a struct for named
  750. // returns.
  751. func (_DitCoordinator *DitCoordinatorCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  752. return _DitCoordinator.Contract.contract.Call(opts, result, method, params...)
  753. }
  754. // Transfer initiates a plain transaction to move funds to the contract, calling
  755. // its default method if one is available.
  756. func (_DitCoordinator *DitCoordinatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  757. return _DitCoordinator.Contract.contract.Transfer(opts)
  758. }
  759. // Transact invokes the (paid) contract method with params as input values.
  760. func (_DitCoordinator *DitCoordinatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  761. return _DitCoordinator.Contract.contract.Transact(opts, method, params...)
  762. }
  763. // KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
  764. //
  765. // Solidity: function KNWTokenAddress() constant returns(address)
  766. func (_DitCoordinator *DitCoordinatorCaller) KNWTokenAddress(opts *bind.CallOpts) (common.Address, error) {
  767. var (
  768. ret0 = new(common.Address)
  769. )
  770. out := ret0
  771. err := _DitCoordinator.contract.Call(opts, out, "KNWTokenAddress")
  772. return *ret0, err
  773. }
  774. // KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
  775. //
  776. // Solidity: function KNWTokenAddress() constant returns(address)
  777. func (_DitCoordinator *DitCoordinatorSession) KNWTokenAddress() (common.Address, error) {
  778. return _DitCoordinator.Contract.KNWTokenAddress(&_DitCoordinator.CallOpts)
  779. }
  780. // KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
  781. //
  782. // Solidity: function KNWTokenAddress() constant returns(address)
  783. func (_DitCoordinator *DitCoordinatorCallerSession) KNWTokenAddress() (common.Address, error) {
  784. return _DitCoordinator.Contract.KNWTokenAddress(&_DitCoordinator.CallOpts)
  785. }
  786. // KNWVotingAddress is a free data retrieval call binding the contract method 0xeb49fe94.
  787. //
  788. // Solidity: function KNWVotingAddress() constant returns(address)
  789. func (_DitCoordinator *DitCoordinatorCaller) KNWVotingAddress(opts *bind.CallOpts) (common.Address, error) {
  790. var (
  791. ret0 = new(common.Address)
  792. )
  793. out := ret0
  794. err := _DitCoordinator.contract.Call(opts, out, "KNWVotingAddress")
  795. return *ret0, err
  796. }
  797. // KNWVotingAddress is a free data retrieval call binding the contract method 0xeb49fe94.
  798. //
  799. // Solidity: function KNWVotingAddress() constant returns(address)
  800. func (_DitCoordinator *DitCoordinatorSession) KNWVotingAddress() (common.Address, error) {
  801. return _DitCoordinator.Contract.KNWVotingAddress(&_DitCoordinator.CallOpts)
  802. }
  803. // KNWVotingAddress is a free data retrieval call binding the contract method 0xeb49fe94.
  804. //
  805. // Solidity: function KNWVotingAddress() constant returns(address)
  806. func (_DitCoordinator *DitCoordinatorCallerSession) KNWVotingAddress() (common.Address, error) {
  807. return _DitCoordinator.Contract.KNWVotingAddress(&_DitCoordinator.CallOpts)
  808. }
  809. // GetCurrentProposalID is a free data retrieval call binding the contract method 0x0bdc90e8.
  810. //
  811. // Solidity: function getCurrentProposalID(bytes32 _repository) constant returns(uint256)
  812. func (_DitCoordinator *DitCoordinatorCaller) GetCurrentProposalID(opts *bind.CallOpts, _repository [32]byte) (*big.Int, error) {
  813. var (
  814. ret0 = new(*big.Int)
  815. )
  816. out := ret0
  817. err := _DitCoordinator.contract.Call(opts, out, "getCurrentProposalID", _repository)
  818. return *ret0, err
  819. }
  820. // GetCurrentProposalID is a free data retrieval call binding the contract method 0x0bdc90e8.
  821. //
  822. // Solidity: function getCurrentProposalID(bytes32 _repository) constant returns(uint256)
  823. func (_DitCoordinator *DitCoordinatorSession) GetCurrentProposalID(_repository [32]byte) (*big.Int, error) {
  824. return _DitCoordinator.Contract.GetCurrentProposalID(&_DitCoordinator.CallOpts, _repository)
  825. }
  826. // GetCurrentProposalID is a free data retrieval call binding the contract method 0x0bdc90e8.
  827. //
  828. // Solidity: function getCurrentProposalID(bytes32 _repository) constant returns(uint256)
  829. func (_DitCoordinator *DitCoordinatorCallerSession) GetCurrentProposalID(_repository [32]byte) (*big.Int, error) {
  830. return _DitCoordinator.Contract.GetCurrentProposalID(&_DitCoordinator.CallOpts, _repository)
  831. }
  832. // GetIndividualStake is a free data retrieval call binding the contract method 0x552edc9d.
  833. //
  834. // Solidity: function getIndividualStake(bytes32 _repository, uint256 _proposalID) constant returns(uint256 individualStake)
  835. func (_DitCoordinator *DitCoordinatorCaller) GetIndividualStake(opts *bind.CallOpts, _repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
  836. var (
  837. ret0 = new(*big.Int)
  838. )
  839. out := ret0
  840. err := _DitCoordinator.contract.Call(opts, out, "getIndividualStake", _repository, _proposalID)
  841. return *ret0, err
  842. }
  843. // GetIndividualStake is a free data retrieval call binding the contract method 0x552edc9d.
  844. //
  845. // Solidity: function getIndividualStake(bytes32 _repository, uint256 _proposalID) constant returns(uint256 individualStake)
  846. func (_DitCoordinator *DitCoordinatorSession) GetIndividualStake(_repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
  847. return _DitCoordinator.Contract.GetIndividualStake(&_DitCoordinator.CallOpts, _repository, _proposalID)
  848. }
  849. // GetIndividualStake is a free data retrieval call binding the contract method 0x552edc9d.
  850. //
  851. // Solidity: function getIndividualStake(bytes32 _repository, uint256 _proposalID) constant returns(uint256 individualStake)
  852. func (_DitCoordinator *DitCoordinatorCallerSession) GetIndividualStake(_repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
  853. return _DitCoordinator.Contract.GetIndividualStake(&_DitCoordinator.CallOpts, _repository, _proposalID)
  854. }
  855. // GetKNWVoteIDFromProposalID is a free data retrieval call binding the contract method 0x06ee4596.
  856. //
  857. // Solidity: function getKNWVoteIDFromProposalID(bytes32 _repository, uint256 _proposalID) constant returns(uint256)
  858. func (_DitCoordinator *DitCoordinatorCaller) GetKNWVoteIDFromProposalID(opts *bind.CallOpts, _repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
  859. var (
  860. ret0 = new(*big.Int)
  861. )
  862. out := ret0
  863. err := _DitCoordinator.contract.Call(opts, out, "getKNWVoteIDFromProposalID", _repository, _proposalID)
  864. return *ret0, err
  865. }
  866. // GetKNWVoteIDFromProposalID is a free data retrieval call binding the contract method 0x06ee4596.
  867. //
  868. // Solidity: function getKNWVoteIDFromProposalID(bytes32 _repository, uint256 _proposalID) constant returns(uint256)
  869. func (_DitCoordinator *DitCoordinatorSession) GetKNWVoteIDFromProposalID(_repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
  870. return _DitCoordinator.Contract.GetKNWVoteIDFromProposalID(&_DitCoordinator.CallOpts, _repository, _proposalID)
  871. }
  872. // GetKNWVoteIDFromProposalID is a free data retrieval call binding the contract method 0x06ee4596.
  873. //
  874. // Solidity: function getKNWVoteIDFromProposalID(bytes32 _repository, uint256 _proposalID) constant returns(uint256)
  875. func (_DitCoordinator *DitCoordinatorCallerSession) GetKNWVoteIDFromProposalID(_repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
  876. return _DitCoordinator.Contract.GetKNWVoteIDFromProposalID(&_DitCoordinator.CallOpts, _repository, _proposalID)
  877. }
  878. // GetKnowledgeLabels is a free data retrieval call binding the contract method 0x95332229.
  879. //
  880. // Solidity: function getKnowledgeLabels(bytes32 _repository, uint256 _knowledgeLabelID) constant returns(string knowledgeLabel)
  881. func (_DitCoordinator *DitCoordinatorCaller) GetKnowledgeLabels(opts *bind.CallOpts, _repository [32]byte, _knowledgeLabelID *big.Int) (string, error) {
  882. var (
  883. ret0 = new(string)
  884. )
  885. out := ret0
  886. err := _DitCoordinator.contract.Call(opts, out, "getKnowledgeLabels", _repository, _knowledgeLabelID)
  887. return *ret0, err
  888. }
  889. // GetKnowledgeLabels is a free data retrieval call binding the contract method 0x95332229.
  890. //
  891. // Solidity: function getKnowledgeLabels(bytes32 _repository, uint256 _knowledgeLabelID) constant returns(string knowledgeLabel)
  892. func (_DitCoordinator *DitCoordinatorSession) GetKnowledgeLabels(_repository [32]byte, _knowledgeLabelID *big.Int) (string, error) {
  893. return _DitCoordinator.Contract.GetKnowledgeLabels(&_DitCoordinator.CallOpts, _repository, _knowledgeLabelID)
  894. }
  895. // GetKnowledgeLabels is a free data retrieval call binding the contract method 0x95332229.
  896. //
  897. // Solidity: function getKnowledgeLabels(bytes32 _repository, uint256 _knowledgeLabelID) constant returns(string knowledgeLabel)
  898. func (_DitCoordinator *DitCoordinatorCallerSession) GetKnowledgeLabels(_repository [32]byte, _knowledgeLabelID *big.Int) (string, error) {
  899. return _DitCoordinator.Contract.GetKnowledgeLabels(&_DitCoordinator.CallOpts, _repository, _knowledgeLabelID)
  900. }
  901. // IsKYCValidator is a free data retrieval call binding the contract method 0x1341f25c.
  902. //
  903. // Solidity: function isKYCValidator(address ) constant returns(bool)
  904. func (_DitCoordinator *DitCoordinatorCaller) IsKYCValidator(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
  905. var (
  906. ret0 = new(bool)
  907. )
  908. out := ret0
  909. err := _DitCoordinator.contract.Call(opts, out, "isKYCValidator", arg0)
  910. return *ret0, err
  911. }
  912. // IsKYCValidator is a free data retrieval call binding the contract method 0x1341f25c.
  913. //
  914. // Solidity: function isKYCValidator(address ) constant returns(bool)
  915. func (_DitCoordinator *DitCoordinatorSession) IsKYCValidator(arg0 common.Address) (bool, error) {
  916. return _DitCoordinator.Contract.IsKYCValidator(&_DitCoordinator.CallOpts, arg0)
  917. }
  918. // IsKYCValidator is a free data retrieval call binding the contract method 0x1341f25c.
  919. //
  920. // Solidity: function isKYCValidator(address ) constant returns(bool)
  921. func (_DitCoordinator *DitCoordinatorCallerSession) IsKYCValidator(arg0 common.Address) (bool, error) {
  922. return _DitCoordinator.Contract.IsKYCValidator(&_DitCoordinator.CallOpts, arg0)
  923. }
  924. // PassedKYC is a free data retrieval call binding the contract method 0xccd9aa68.
  925. //
  926. // Solidity: function passedKYC(address ) constant returns(bool)
  927. func (_DitCoordinator *DitCoordinatorCaller) PassedKYC(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
  928. var (
  929. ret0 = new(bool)
  930. )
  931. out := ret0
  932. err := _DitCoordinator.contract.Call(opts, out, "passedKYC", arg0)
  933. return *ret0, err
  934. }
  935. // PassedKYC is a free data retrieval call binding the contract method 0xccd9aa68.
  936. //
  937. // Solidity: function passedKYC(address ) constant returns(bool)
  938. func (_DitCoordinator *DitCoordinatorSession) PassedKYC(arg0 common.Address) (bool, error) {
  939. return _DitCoordinator.Contract.PassedKYC(&_DitCoordinator.CallOpts, arg0)
  940. }
  941. // PassedKYC is a free data retrieval call binding the contract method 0xccd9aa68.
  942. //
  943. // Solidity: function passedKYC(address ) constant returns(bool)
  944. func (_DitCoordinator *DitCoordinatorCallerSession) PassedKYC(arg0 common.Address) (bool, error) {
  945. return _DitCoordinator.Contract.PassedKYC(&_DitCoordinator.CallOpts, arg0)
  946. }
  947. // ProposalHasPassed is a free data retrieval call binding the contract method 0x87c9203d.
  948. //
  949. // Solidity: function proposalHasPassed(bytes32 _repository, uint256 _proposalID) constant returns(bool hasPassed)
  950. func (_DitCoordinator *DitCoordinatorCaller) ProposalHasPassed(opts *bind.CallOpts, _repository [32]byte, _proposalID *big.Int) (bool, error) {
  951. var (
  952. ret0 = new(bool)
  953. )
  954. out := ret0
  955. err := _DitCoordinator.contract.Call(opts, out, "proposalHasPassed", _repository, _proposalID)
  956. return *ret0, err
  957. }
  958. // ProposalHasPassed is a free data retrieval call binding the contract method 0x87c9203d.
  959. //
  960. // Solidity: function proposalHasPassed(bytes32 _repository, uint256 _proposalID) constant returns(bool hasPassed)
  961. func (_DitCoordinator *DitCoordinatorSession) ProposalHasPassed(_repository [32]byte, _proposalID *big.Int) (bool, error) {
  962. return _DitCoordinator.Contract.ProposalHasPassed(&_DitCoordinator.CallOpts, _repository, _proposalID)
  963. }
  964. // ProposalHasPassed is a free data retrieval call binding the contract method 0x87c9203d.
  965. //
  966. // Solidity: function proposalHasPassed(bytes32 _repository, uint256 _proposalID) constant returns(bool hasPassed)
  967. func (_DitCoordinator *DitCoordinatorCallerSession) ProposalHasPassed(_repository [32]byte, _proposalID *big.Int) (bool, error) {
  968. return _DitCoordinator.Contract.ProposalHasPassed(&_DitCoordinator.CallOpts, _repository, _proposalID)
  969. }
  970. // ProposalsOfRepository is a free data retrieval call binding the contract method 0x3e029f63.
  971. //
  972. // Solidity: function proposalsOfRepository(bytes32 , uint256 ) constant returns(uint256 KNWVoteID, string knowledgeLabel, address proposer, bool isFinalized, bool proposalAccepted, uint256 individualStake, uint256 totalStake)
  973. func (_DitCoordinator *DitCoordinatorCaller) ProposalsOfRepository(opts *bind.CallOpts, arg0 [32]byte, arg1 *big.Int) (struct {
  974. KNWVoteID *big.Int
  975. KnowledgeLabel string
  976. Proposer common.Address
  977. IsFinalized bool
  978. ProposalAccepted bool
  979. IndividualStake *big.Int
  980. TotalStake *big.Int
  981. }, error) {
  982. ret := new(struct {
  983. KNWVoteID *big.Int
  984. KnowledgeLabel string
  985. Proposer common.Address
  986. IsFinalized bool
  987. ProposalAccepted bool
  988. IndividualStake *big.Int
  989. TotalStake *big.Int
  990. })
  991. out := ret
  992. err := _DitCoordinator.contract.Call(opts, out, "proposalsOfRepository", arg0, arg1)
  993. return *ret, err
  994. }
  995. // ProposalsOfRepository is a free data retrieval call binding the contract method 0x3e029f63.
  996. //
  997. // Solidity: function proposalsOfRepository(bytes32 , uint256 ) constant returns(uint256 KNWVoteID, string knowledgeLabel, address proposer, bool isFinalized, bool proposalAccepted, uint256 individualStake, uint256 totalStake)
  998. func (_DitCoordinator *DitCoordinatorSession) ProposalsOfRepository(arg0 [32]byte, arg1 *big.Int) (struct {
  999. KNWVoteID *big.Int
  1000. KnowledgeLabel string
  1001. Proposer common.Address
  1002. IsFinalized bool
  1003. ProposalAccepted bool
  1004. IndividualStake *big.Int
  1005. TotalStake *big.Int
  1006. }, error) {
  1007. return _DitCoordinator.Contract.ProposalsOfRepository(&_DitCoordinator.CallOpts, arg0, arg1)
  1008. }
  1009. // ProposalsOfRepository is a free data retrieval call binding the contract method 0x3e029f63.
  1010. //
  1011. // Solidity: function proposalsOfRepository(bytes32 , uint256 ) constant returns(uint256 KNWVoteID, string knowledgeLabel, address proposer, bool isFinalized, bool proposalAccepted, uint256 individualStake, uint256 totalStake)
  1012. func (_DitCoordinator *DitCoordinatorCallerSession) ProposalsOfRepository(arg0 [32]byte, arg1 *big.Int) (struct {
  1013. KNWVoteID *big.Int
  1014. KnowledgeLabel string
  1015. Proposer common.Address
  1016. IsFinalized bool
  1017. ProposalAccepted bool
  1018. IndividualStake *big.Int
  1019. TotalStake *big.Int
  1020. }, error) {
  1021. return _DitCoordinator.Contract.ProposalsOfRepository(&_DitCoordinator.CallOpts, arg0, arg1)
  1022. }
  1023. // Repositories is a free data retrieval call binding the contract method 0x1f51fd71.
  1024. //
  1025. // Solidity: function repositories(bytes32 ) constant returns(uint256 votingMajority, uint256 mintingMethod, uint256 burningMethod, uint256 currentProposalID, uint256 minVoteCommitDuration, uint256 maxVoteCommitDuration, uint256 minVoteOpenDuration, uint256 maxVoteOpenDuration)
  1026. func (_DitCoordinator *DitCoordinatorCaller) Repositories(opts *bind.CallOpts, arg0 [32]byte) (struct {
  1027. VotingMajority *big.Int
  1028. MintingMethod *big.Int
  1029. BurningMethod *big.Int
  1030. CurrentProposalID *big.Int
  1031. MinVoteCommitDuration *big.Int
  1032. MaxVoteCommitDuration *big.Int
  1033. MinVoteOpenDuration *big.Int
  1034. MaxVoteOpenDuration *big.Int
  1035. }, error) {
  1036. ret := new(struct {
  1037. VotingMajority *big.Int
  1038. MintingMethod *big.Int
  1039. BurningMethod *big.Int
  1040. CurrentProposalID *big.Int
  1041. MinVoteCommitDuration *big.Int
  1042. MaxVoteCommitDuration *big.Int
  1043. MinVoteOpenDuration *big.Int
  1044. MaxVoteOpenDuration *big.Int
  1045. })
  1046. out := ret
  1047. err := _DitCoordinator.contract.Call(opts, out, "repositories", arg0)
  1048. return *ret, err
  1049. }
  1050. // Repositories is a free data retrieval call binding the contract method 0x1f51fd71.
  1051. //
  1052. // Solidity: function repositories(bytes32 ) constant returns(uint256 votingMajority, uint256 mintingMethod, uint256 burningMethod, uint256 currentProposalID, uint256 minVoteCommitDuration, uint256 maxVoteCommitDuration, uint256 minVoteOpenDuration, uint256 maxVoteOpenDuration)
  1053. func (_DitCoordinator *DitCoordinatorSession) Repositories(arg0 [32]byte) (struct {
  1054. VotingMajority *big.Int
  1055. MintingMethod *big.Int
  1056. BurningMethod *big.Int
  1057. CurrentProposalID *big.Int
  1058. MinVoteCommitDuration *big.Int
  1059. MaxVoteCommitDuration *big.Int
  1060. MinVoteOpenDuration *big.Int
  1061. MaxVoteOpenDuration *big.Int
  1062. }, error) {
  1063. return _DitCoordinator.Contract.Repositories(&_DitCoordinator.CallOpts, arg0)
  1064. }
  1065. // Repositories is a free data retrieval call binding the contract method 0x1f51fd71.
  1066. //
  1067. // Solidity: function repositories(bytes32 ) constant returns(uint256 votingMajority, uint256 mintingMethod, uint256 burningMethod, uint256 currentProposalID, uint256 minVoteCommitDuration, uint256 maxVoteCommitDuration, uint256 minVoteOpenDuration, uint256 maxVoteOpenDuration)
  1068. func (_DitCoordinator *DitCoordinatorCallerSession) Repositories(arg0 [32]byte) (struct {
  1069. VotingMajority *big.Int
  1070. MintingMethod *big.Int
  1071. BurningMethod *big.Int
  1072. CurrentProposalID *big.Int
  1073. MinVoteCommitDuration *big.Int
  1074. MaxVoteCommitDuration *big.Int
  1075. MinVoteOpenDuration *big.Int
  1076. MaxVoteOpenDuration *big.Int
  1077. }, error) {
  1078. return _DitCoordinator.Contract.Repositories(&_DitCoordinator.CallOpts, arg0)
  1079. }
  1080. // RepositoryIsInitialized is a free data retrieval call binding the contract method 0xea6c6d0f.
  1081. //
  1082. // Solidity: function repositoryIsInitialized(bytes32 _repository) constant returns(bool)
  1083. func (_DitCoordinator *DitCoordinatorCaller) RepositoryIsInitialized(opts *bind.CallOpts, _repository [32]byte) (bool, error) {
  1084. var (
  1085. ret0 = new(bool)
  1086. )
  1087. out := ret0
  1088. err := _DitCoordinator.contract.Call(opts, out, "repositoryIsInitialized", _repository)
  1089. return *ret0, err
  1090. }
  1091. // RepositoryIsInitialized is a free data retrieval call binding the contract method 0xea6c6d0f.
  1092. //
  1093. // Solidity: function repositoryIsInitialized(bytes32 _repository) constant returns(bool)
  1094. func (_DitCoordinator *DitCoordinatorSession) RepositoryIsInitialized(_repository [32]byte) (bool, error) {
  1095. return _DitCoordinator.Contract.RepositoryIsInitialized(&_DitCoordinator.CallOpts, _repository)
  1096. }
  1097. // RepositoryIsInitialized is a free data retrieval call binding the contract method 0xea6c6d0f.
  1098. //
  1099. // Solidity: function repositoryIsInitialized(bytes32 _repository) constant returns(bool)
  1100. func (_DitCoordinator *DitCoordinatorCallerSession) RepositoryIsInitialized(_repository [32]byte) (bool, error) {
  1101. return _DitCoordinator.Contract.RepositoryIsInitialized(&_DitCoordinator.CallOpts, _repository)
  1102. }
  1103. // AddKYCValidator is a paid mutator transaction binding the contract method 0xd0c397ef.
  1104. //
  1105. // Solidity: function addKYCValidator(address _address) returns()
  1106. func (_DitCoordinator *DitCoordinatorTransactor) AddKYCValidator(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) {
  1107. return _DitCoordinator.contract.Transact(opts, "addKYCValidator", _address)
  1108. }
  1109. // AddKYCValidator is a paid mutator transaction binding the contract method 0xd0c397ef.
  1110. //
  1111. // Solidity: function addKYCValidator(address _address) returns()
  1112. func (_DitCoordinator *DitCoordinatorSession) AddKYCValidator(_address common.Address) (*types.Transaction, error) {
  1113. return _DitCoordinator.Contract.AddKYCValidator(&_DitCoordinator.TransactOpts, _address)
  1114. }
  1115. // AddKYCValidator is a paid mutator transaction binding the contract method 0xd0c397ef.
  1116. //
  1117. // Solidity: function addKYCValidator(address _address) returns()
  1118. func (_DitCoordinator *DitCoordinatorTransactorSession) AddKYCValidator(_address common.Address) (*types.Transaction, error) {
  1119. return _DitCoordinator.Contract.AddKYCValidator(&_DitCoordinator.TransactOpts, _address)
  1120. }
  1121. // FinalizeVote is a paid mutator transaction binding the contract method 0x2e71d0fb.
  1122. //
  1123. // Solidity: function finalizeVote(bytes32 _repository, uint256 _proposalID) returns()
  1124. func (_DitCoordinator *DitCoordinatorTransactor) FinalizeVote(opts *bind.TransactOpts, _repository [32]byte, _proposalID *big.Int) (*types.Transaction, error) {
  1125. return _DitCoordinator.contract.Transact(opts, "finalizeVote", _repository, _proposalID)
  1126. }
  1127. // FinalizeVote is a paid mutator transaction binding the contract method 0x2e71d0fb.
  1128. //
  1129. // Solidity: function finalizeVote(bytes32 _repository, uint256 _proposalID) returns()
  1130. func (_DitCoordinator *DitCoordinatorSession) FinalizeVote(_repository [32]byte, _proposalID *big.Int) (*types.Transaction, error) {
  1131. return _DitCoordinator.Contract.FinalizeVote(&_DitCoordinator.TransactOpts, _repository, _proposalID)
  1132. }
  1133. // FinalizeVote is a paid mutator transaction binding the contract method 0x2e71d0fb.
  1134. //
  1135. // Solidity: function finalizeVote(bytes32 _repository, uint256 _proposalID) returns()
  1136. func (_DitCoordinator *DitCoordinatorTransactorSession) FinalizeVote(_repository [32]byte, _proposalID *big.Int) (*types.Transaction, error) {
  1137. return _DitCoordinator.Contract.FinalizeVote(&_DitCoordinator.TransactOpts, _repository, _proposalID)
  1138. }
  1139. // InitRepository is a paid mutator transaction binding the contract method 0x51f43c24.
  1140. //
  1141. // Solidity: function initRepository(bytes32 _repository, string _label1, string _label2, string _label3, uint256[7] _voteSettings) returns(bool)
  1142. func (_DitCoordinator *DitCoordinatorTransactor) InitRepository(opts *bind.TransactOpts, _repository [32]byte, _label1 string, _label2 string, _label3 string, _voteSettings [7]*big.Int) (*types.Transaction, error) {
  1143. return _DitCoordinator.contract.Transact(opts, "initRepository", _repository, _label1, _label2, _label3, _voteSettings)
  1144. }
  1145. // InitRepository is a paid mutator transaction binding the contract method 0x51f43c24.
  1146. //
  1147. // Solidity: function initRepository(bytes32 _repository, string _label1, string _label2, string _label3, uint256[7] _voteSettings) returns(bool)
  1148. func (_DitCoordinator *DitCoordinatorSession) InitRepository(_repository [32]byte, _label1 string, _label2 string, _label3 string, _voteSettings [7]*big.Int) (*types.Transaction, error) {
  1149. return _DitCoordinator.Contract.InitRepository(&_DitCoordinator.TransactOpts, _repository, _label1, _label2, _label3, _voteSettings)
  1150. }
  1151. // InitRepository is a paid mutator transaction binding the contract method 0x51f43c24.
  1152. //
  1153. // Solidity: function initRepository(bytes32 _repository, string _label1, string _label2, string _label3, uint256[7] _voteSettings) returns(bool)
  1154. func (_DitCoordinator *DitCoordinatorTransactorSession) InitRepository(_repository [32]byte, _label1 string, _label2 string, _label3 string, _voteSettings [7]*big.Int) (*types.Transaction, error) {
  1155. return _DitCoordinator.Contract.InitRepository(&_DitCoordinator.TransactOpts, _repository, _label1, _label2, _label3, _voteSettings)
  1156. }
  1157. // OpenVoteOnProposal is a paid mutator transaction binding the contract method 0x0ee62ec0.
  1158. //
  1159. // Solidity: function openVoteOnProposal(bytes32 _repository, uint256 _proposalID, uint256 _voteOption, uint256 _voteSalt) returns()
  1160. func (_DitCoordinator *DitCoordinatorTransactor) OpenVoteOnProposal(opts *bind.TransactOpts, _repository [32]byte, _proposalID *big.Int, _voteOption *big.Int, _voteSalt *big.Int) (*types.Transaction, error) {
  1161. return _DitCoordinator.contract.Transact(opts, "openVoteOnProposal", _repository, _proposalID, _voteOption, _voteSalt)
  1162. }
  1163. // OpenVoteOnProposal is a paid mutator transaction binding the contract method 0x0ee62ec0.
  1164. //
  1165. // Solidity: function openVoteOnProposal(bytes32 _repository, uint256 _proposalID, uint256 _voteOption, uint256 _voteSalt) returns()
  1166. func (_DitCoordinator *DitCoordinatorSession) OpenVoteOnProposal(_repository [32]byte, _proposalID *big.Int, _voteOption *big.Int, _voteSalt *big.Int) (*types.Transaction, error) {
  1167. return _DitCoordinator.Contract.OpenVoteOnProposal(&_DitCoordinator.TransactOpts, _repository, _proposalID, _voteOption, _voteSalt)
  1168. }
  1169. // OpenVoteOnProposal is a paid mutator transaction binding the contract method 0x0ee62ec0.
  1170. //
  1171. // Solidity: function openVoteOnProposal(bytes32 _repository, uint256 _proposalID, uint256 _voteOption, uint256 _voteSalt) returns()
  1172. func (_DitCoordinator *DitCoordinatorTransactorSession) OpenVoteOnProposal(_repository [32]byte, _proposalID *big.Int, _voteOption *big.Int, _voteSalt *big.Int) (*types.Transaction, error) {
  1173. return _DitCoordinator.Contract.OpenVoteOnProposal(&_DitCoordinator.TransactOpts, _repository, _proposalID, _voteOption, _voteSalt)
  1174. }
  1175. // PassKYC is a paid mutator transaction binding the contract method 0xeb931024.
  1176. //
  1177. // Solidity: function passKYC(address _address) returns()
  1178. func (_DitCoordinator *DitCoordinatorTransactor) PassKYC(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) {
  1179. return _DitCoordinator.contract.Transact(opts, "passKYC", _address)
  1180. }
  1181. // PassKYC is a paid mutator transaction binding the contract method 0xeb931024.
  1182. //
  1183. // Solidity: function passKYC(address _address) returns()
  1184. func (_DitCoordinator *DitCoordinatorSession) PassKYC(_address common.Address) (*types.Transaction, error) {
  1185. return _DitCoordinator.Contract.PassKYC(&_DitCoordinator.TransactOpts, _address)
  1186. }
  1187. // PassKYC is a paid mutator transaction binding the contract method 0xeb931024.
  1188. //
  1189. // Solidity: function passKYC(address _address) returns()
  1190. func (_DitCoordinator *DitCoordinatorTransactorSession) PassKYC(_address common.Address) (*types.Transaction, error) {
  1191. return _DitCoordinator.Contract.PassKYC(&_DitCoordinator.TransactOpts, _address)
  1192. }
  1193. // ProposeCommit is a paid mutator transaction binding the contract method 0x0aba8688.
  1194. //
  1195. // Solidity: function proposeCommit(bytes32 _repository, uint256 _knowledgeLabelIndex, uint256 _voteCommitDuration, uint256 _voteOpenDuration) returns()
  1196. func (_DitCoordinator *DitCoordinatorTransactor) ProposeCommit(opts *bind.TransactOpts, _repository [32]byte, _knowledgeLabelIndex *big.Int, _voteCommitDuration *big.Int, _voteOpenDuration *big.Int) (*types.Transaction, error) {
  1197. return _DitCoordinator.contract.Transact(opts, "proposeCommit", _repository, _knowledgeLabelIndex, _voteCommitDuration, _voteOpenDuration)
  1198. }
  1199. // ProposeCommit is a paid mutator transaction binding the contract method 0x0aba8688.
  1200. //
  1201. // Solidity: function proposeCommit(bytes32 _repository, uint256 _knowledgeLabelIndex, uint256 _voteCommitDuration, uint256 _voteOpenDuration) returns()
  1202. func (_DitCoordinator *DitCoordinatorSession) ProposeCommit(_repository [32]byte, _knowledgeLabelIndex *big.Int, _voteCommitDuration *big.Int, _voteOpenDuration *big.Int) (*types.Transaction, error) {
  1203. return _DitCoordinator.Contract.ProposeCommit(&_DitCoordinator.TransactOpts, _repository, _knowledgeLabelIndex, _voteCommitDuration, _voteOpenDuration)
  1204. }
  1205. // ProposeCommit is a paid mutator transaction binding the contract method 0x0aba8688.
  1206. //
  1207. // Solidity: function proposeCommit(bytes32 _repository, uint256 _knowledgeLabelIndex, uint256 _voteCommitDuration, uint256 _voteOpenDuration) returns()
  1208. func (_DitCoordinator *DitCoordinatorTransactorSession) ProposeCommit(_repository [32]byte, _knowledgeLabelIndex *big.Int, _voteCommitDuration *big.Int, _voteOpenDuration *big.Int) (*types.Transaction, error) {
  1209. return _DitCoordinator.Contract.ProposeCommit(&_DitCoordinator.TransactOpts, _repository, _knowledgeLabelIndex, _voteCommitDuration, _voteOpenDuration)
  1210. }
  1211. // RemoveKYCValidator is a paid mutator transaction binding the contract method 0x73b0dddd.
  1212. //
  1213. // Solidity: function removeKYCValidator(address _address) returns()
  1214. func (_DitCoordinator *DitCoordinatorTransactor) RemoveKYCValidator(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) {
  1215. return _DitCoordinator.contract.Transact(opts, "removeKYCValidator", _address)
  1216. }
  1217. // RemoveKYCValidator is a paid mutator transaction binding the contract method 0x73b0dddd.
  1218. //
  1219. // Solidity: function removeKYCValidator(address _address) returns()
  1220. func (_DitCoordinator *DitCoordinatorSession) RemoveKYCValidator(_address common.Address) (*types.Transaction, error) {
  1221. return _DitCoordinator.Contract.RemoveKYCValidator(&_DitCoordinator.TransactOpts, _address)
  1222. }
  1223. // RemoveKYCValidator is a paid mutator transaction binding the contract method 0x73b0dddd.
  1224. //
  1225. // Solidity: function removeKYCValidator(address _address) returns()
  1226. func (_DitCoordinator *DitCoordinatorTransactorSession) RemoveKYCValidator(_address common.Address) (*types.Transaction, error) {
  1227. return _DitCoordinator.Contract.RemoveKYCValidator(&_DitCoordinator.TransactOpts, _address)
  1228. }
  1229. // RevokeKYC is a paid mutator transaction binding the contract method 0x39ba645b.
  1230. //
  1231. // Solidity: function revokeKYC(address _address) returns()
  1232. func (_DitCoordinator *DitCoordinatorTransactor) RevokeKYC(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) {
  1233. return _DitCoordinator.contract.Transact(opts, "revokeKYC", _address)
  1234. }
  1235. // RevokeKYC is a paid mutator transaction binding the contract method 0x39ba645b.
  1236. //
  1237. // Solidity: function revokeKYC(address _address) returns()
  1238. func (_DitCoordinator *DitCoordinatorSession) RevokeKYC(_address common.Address) (*types.Transaction, error) {
  1239. return _DitCoordinator.Contract.RevokeKYC(&_DitCoordinator.TransactOpts, _address)
  1240. }
  1241. // RevokeKYC is a paid mutator transaction binding the contract method 0x39ba645b.
  1242. //
  1243. // Solidity: function revokeKYC(address _address) returns()
  1244. func (_DitCoordinator *DitCoordinatorTransactorSession) RevokeKYC(_address common.Address) (*types.Transaction, error) {
  1245. return _DitCoordinator.Contract.RevokeKYC(&_DitCoordinator.TransactOpts, _address)
  1246. }
  1247. // VoteOnProposal is a paid mutator transaction binding the contract method 0xa34c299a.
  1248. //
  1249. // Solidity: function voteOnProposal(bytes32 _repository, uint256 _proposalID, bytes32 _voteHash) returns()
  1250. func (_DitCoordinator *DitCoordinatorTransactor) VoteOnProposal(opts *bind.TransactOpts, _repository [32]byte, _proposalID *big.Int, _voteHash [32]byte) (*types.Transaction, error) {
  1251. return _DitCoordinator.contract.Transact(opts, "voteOnProposal", _repository, _proposalID, _voteHash)
  1252. }
  1253. // VoteOnProposal is a paid mutator transaction binding the contract method 0xa34c299a.
  1254. //
  1255. // Solidity: function voteOnProposal(bytes32 _repository, uint256 _proposalID, bytes32 _voteHash) returns()
  1256. func (_DitCoordinator *DitCoordinatorSession) VoteOnProposal(_repository [32]byte, _proposalID *big.Int, _voteHash [32]byte) (*types.Transaction, error) {
  1257. return _DitCoordinator.Contract.VoteOnProposal(&_DitCoordinator.TransactOpts, _repository, _proposalID, _voteHash)
  1258. }
  1259. // VoteOnProposal is a paid mutator transaction binding the contract method 0xa34c299a.
  1260. //
  1261. // Solidity: function voteOnProposal(bytes32 _repository, uint256 _proposalID, bytes32 _voteHash) returns()
  1262. func (_DitCoordinator *DitCoordinatorTransactorSession) VoteOnProposal(_repository [32]byte, _proposalID *big.Int, _voteHash [32]byte) (*types.Transaction, error) {
  1263. return _DitCoordinator.Contract.VoteOnProposal(&_DitCoordinator.TransactOpts, _repository, _proposalID, _voteHash)
  1264. }
  1265. // DitCoordinatorCommitVoteIterator is returned from FilterCommitVote and is used to iterate over the raw logs and unpacked data for CommitVote events raised by the DitCoordinator contract.
  1266. type DitCoordinatorCommitVoteIterator struct {
  1267. Event *DitCoordinatorCommitVote // Event containing the contract specifics and raw log
  1268. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1269. event string // Event name to use for unpacking event data
  1270. logs chan types.Log // Log channel receiving the found contract events
  1271. sub ethereum.Subscription // Subscription for errors, completion and termination
  1272. done bool // Whether the subscription completed delivering logs
  1273. fail error // Occurred error to stop iteration
  1274. }
  1275. // Next advances the iterator to the subsequent event, returning whether there
  1276. // are any more events found. In case of a retrieval or parsing error, false is
  1277. // returned and Error() can be queried for the exact failure.
  1278. func (it *DitCoordinatorCommitVoteIterator) Next() bool {
  1279. // If the iterator failed, stop iterating
  1280. if it.fail != nil {
  1281. return false
  1282. }
  1283. // If the iterator completed, deliver directly whatever's available
  1284. if it.done {
  1285. select {
  1286. case log := <-it.logs:
  1287. it.Event = new(DitCoordinatorCommitVote)
  1288. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1289. it.fail = err
  1290. return false
  1291. }
  1292. it.Event.Raw = log
  1293. return true
  1294. default:
  1295. return false
  1296. }
  1297. }
  1298. // Iterator still in progress, wait for either a data or an error event
  1299. select {
  1300. case log := <-it.logs:
  1301. it.Event = new(DitCoordinatorCommitVote)
  1302. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1303. it.fail = err
  1304. return false
  1305. }
  1306. it.Event.Raw = log
  1307. return true
  1308. case err := <-it.sub.Err():
  1309. it.done = true
  1310. it.fail = err
  1311. return it.Next()
  1312. }
  1313. }
  1314. // Error returns any retrieval or parsing error occurred during filtering.
  1315. func (it *DitCoordinatorCommitVoteIterator) Error() error {
  1316. return it.fail
  1317. }
  1318. // Close terminates the iteration process, releasing any pending underlying
  1319. // resources.
  1320. func (it *DitCoordinatorCommitVoteIterator) Close() error {
  1321. it.sub.Unsubscribe()
  1322. return nil
  1323. }
  1324. // DitCoordinatorCommitVote represents a CommitVote event raised by the DitCoordinator contract.
  1325. type DitCoordinatorCommitVote struct {
  1326. Repository [32]byte
  1327. Proposal *big.Int
  1328. Who common.Address
  1329. Label string
  1330. Stake *big.Int
  1331. NumberOfVotes *big.Int
  1332. Raw types.Log // Blockchain specific contextual infos
  1333. }
  1334. // FilterCommitVote is a free log retrieval operation binding the contract event 0xa01eea487bb3ec75528c167ccf90452d4164ddda7b13c55b2a89751a8dc5fbc1.
  1335. //
  1336. // Solidity: event CommitVote(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label, uint256 stake, uint256 numberOfVotes)
  1337. func (_DitCoordinator *DitCoordinatorFilterer) FilterCommitVote(opts *bind.FilterOpts, repository [][32]byte, proposal []*big.Int, who []common.Address) (*DitCoordinatorCommitVoteIterator, error) {
  1338. var repositoryRule []interface{}
  1339. for _, repositoryItem := range repository {
  1340. repositoryRule = append(repositoryRule, repositoryItem)
  1341. }
  1342. var proposalRule []interface{}
  1343. for _, proposalItem := range proposal {
  1344. proposalRule = append(proposalRule, proposalItem)
  1345. }
  1346. var whoRule []interface{}
  1347. for _, whoItem := range who {
  1348. whoRule = append(whoRule, whoItem)
  1349. }
  1350. logs, sub, err := _DitCoordinator.contract.FilterLogs(opts, "CommitVote", repositoryRule, proposalRule, whoRule)
  1351. if err != nil {
  1352. return nil, err
  1353. }
  1354. return &DitCoordinatorCommitVoteIterator{contract: _DitCoordinator.contract, event: "CommitVote", logs: logs, sub: sub}, nil
  1355. }
  1356. // WatchCommitVote is a free log subscription operation binding the contract event 0xa01eea487bb3ec75528c167ccf90452d4164ddda7b13c55b2a89751a8dc5fbc1.
  1357. //
  1358. // Solidity: event CommitVote(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label, uint256 stake, uint256 numberOfVotes)
  1359. func (_DitCoordinator *DitCoordinatorFilterer) WatchCommitVote(opts *bind.WatchOpts, sink chan<- *DitCoordinatorCommitVote, repository [][32]byte, proposal []*big.Int, who []common.Address) (event.Subscription, error) {
  1360. var repositoryRule []interface{}
  1361. for _, repositoryItem := range repository {
  1362. repositoryRule = append(repositoryRule, repositoryItem)
  1363. }
  1364. var proposalRule []interface{}
  1365. for _, proposalItem := range proposal {
  1366. proposalRule = append(proposalRule, proposalItem)
  1367. }
  1368. var whoRule []interface{}
  1369. for _, whoItem := range who {
  1370. whoRule = append(whoRule, whoItem)
  1371. }
  1372. logs, sub, err := _DitCoordinator.contract.WatchLogs(opts, "CommitVote", repositoryRule, proposalRule, whoRule)
  1373. if err != nil {
  1374. return nil, err
  1375. }
  1376. return event.NewSubscription(func(quit <-chan struct{}) error {
  1377. defer sub.Unsubscribe()
  1378. for {
  1379. select {
  1380. case log := <-logs:
  1381. // New log arrived, parse the event and forward to the user
  1382. event := new(DitCoordinatorCommitVote)
  1383. if err := _DitCoordinator.contract.UnpackLog(event, "CommitVote", log); err != nil {
  1384. return err
  1385. }
  1386. event.Raw = log
  1387. select {
  1388. case sink <- event:
  1389. case err := <-sub.Err():
  1390. return err
  1391. case <-quit:
  1392. return nil
  1393. }
  1394. case err := <-sub.Err():
  1395. return err
  1396. case <-quit:
  1397. return nil
  1398. }
  1399. }
  1400. }), nil
  1401. }
  1402. // DitCoordinatorFinalizeVoteIterator is returned from FilterFinalizeVote and is used to iterate over the raw logs and unpacked data for FinalizeVote events raised by the DitCoordinator contract.
  1403. type DitCoordinatorFinalizeVoteIterator struct {
  1404. Event *DitCoordinatorFinalizeVote // Event containing the contract specifics and raw log
  1405. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1406. event string // Event name to use for unpacking event data
  1407. logs chan types.Log // Log channel receiving the found contract events
  1408. sub ethereum.Subscription // Subscription for errors, completion and termination
  1409. done bool // Whether the subscription completed delivering logs
  1410. fail error // Occurred error to stop iteration
  1411. }
  1412. // Next advances the iterator to the subsequent event, returning whether there
  1413. // are any more events found. In case of a retrieval or parsing error, false is
  1414. // returned and Error() can be queried for the exact failure.
  1415. func (it *DitCoordinatorFinalizeVoteIterator) Next() bool {
  1416. // If the iterator failed, stop iterating
  1417. if it.fail != nil {
  1418. return false
  1419. }
  1420. // If the iterator completed, deliver directly whatever's available
  1421. if it.done {
  1422. select {
  1423. case log := <-it.logs:
  1424. it.Event = new(DitCoordinatorFinalizeVote)
  1425. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1426. it.fail = err
  1427. return false
  1428. }
  1429. it.Event.Raw = log
  1430. return true
  1431. default:
  1432. return false
  1433. }
  1434. }
  1435. // Iterator still in progress, wait for either a data or an error event
  1436. select {
  1437. case log := <-it.logs:
  1438. it.Event = new(DitCoordinatorFinalizeVote)
  1439. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1440. it.fail = err
  1441. return false
  1442. }
  1443. it.Event.Raw = log
  1444. return true
  1445. case err := <-it.sub.Err():
  1446. it.done = true
  1447. it.fail = err
  1448. return it.Next()
  1449. }
  1450. }
  1451. // Error returns any retrieval or parsing error occurred during filtering.
  1452. func (it *DitCoordinatorFinalizeVoteIterator) Error() error {
  1453. return it.fail
  1454. }
  1455. // Close terminates the iteration process, releasing any pending underlying
  1456. // resources.
  1457. func (it *DitCoordinatorFinalizeVoteIterator) Close() error {
  1458. it.sub.Unsubscribe()
  1459. return nil
  1460. }
  1461. // DitCoordinatorFinalizeVote represents a FinalizeVote event raised by the DitCoordinator contract.
  1462. type DitCoordinatorFinalizeVote struct {
  1463. Repository [32]byte
  1464. Proposal *big.Int
  1465. Label string
  1466. Accepted bool
  1467. Raw types.Log // Blockchain specific contextual infos
  1468. }
  1469. // FilterFinalizeVote is a free log retrieval operation binding the contract event 0x6bd2699645e0f6c5547bdf0d053280e48fef1ab21514bd02c88610b1279b942a.
  1470. //
  1471. // Solidity: event FinalizeVote(bytes32 indexed repository, uint256 indexed proposal, string label, bool accepted)
  1472. func (_DitCoordinator *DitCoordinatorFilterer) FilterFinalizeVote(opts *bind.FilterOpts, repository [][32]byte, proposal []*big.Int) (*DitCoordinatorFinalizeVoteIterator, error) {
  1473. var repositoryRule []interface{}
  1474. for _, repositoryItem := range repository {
  1475. repositoryRule = append(repositoryRule, repositoryItem)
  1476. }
  1477. var proposalRule []interface{}
  1478. for _, proposalItem := range proposal {
  1479. proposalRule = append(proposalRule, proposalItem)
  1480. }
  1481. logs, sub, err := _DitCoordinator.contract.FilterLogs(opts, "FinalizeVote", repositoryRule, proposalRule)
  1482. if err != nil {
  1483. return nil, err
  1484. }
  1485. return &DitCoordinatorFinalizeVoteIterator{contract: _DitCoordinator.contract, event: "FinalizeVote", logs: logs, sub: sub}, nil
  1486. }
  1487. // WatchFinalizeVote is a free log subscription operation binding the contract event 0x6bd2699645e0f6c5547bdf0d053280e48fef1ab21514bd02c88610b1279b942a.
  1488. //
  1489. // Solidity: event FinalizeVote(bytes32 indexed repository, uint256 indexed proposal, string label, bool accepted)
  1490. func (_DitCoordinator *DitCoordinatorFilterer) WatchFinalizeVote(opts *bind.WatchOpts, sink chan<- *DitCoordinatorFinalizeVote, repository [][32]byte, proposal []*big.Int) (event.Subscription, error) {
  1491. var repositoryRule []interface{}
  1492. for _, repositoryItem := range repository {
  1493. repositoryRule = append(repositoryRule, repositoryItem)
  1494. }
  1495. var proposalRule []interface{}
  1496. for _, proposalItem := range proposal {
  1497. proposalRule = append(proposalRule, proposalItem)
  1498. }
  1499. logs, sub, err := _DitCoordinator.contract.WatchLogs(opts, "FinalizeVote", repositoryRule, proposalRule)
  1500. if err != nil {
  1501. return nil, err
  1502. }
  1503. return event.NewSubscription(func(quit <-chan struct{}) error {
  1504. defer sub.Unsubscribe()
  1505. for {
  1506. select {
  1507. case log := <-logs:
  1508. // New log arrived, parse the event and forward to the user
  1509. event := new(DitCoordinatorFinalizeVote)
  1510. if err := _DitCoordinator.contract.UnpackLog(event, "FinalizeVote", log); err != nil {
  1511. return err
  1512. }
  1513. event.Raw = log
  1514. select {
  1515. case sink <- event:
  1516. case err := <-sub.Err():
  1517. return err
  1518. case <-quit:
  1519. return nil
  1520. }
  1521. case err := <-sub.Err():
  1522. return err
  1523. case <-quit:
  1524. return nil
  1525. }
  1526. }
  1527. }), nil
  1528. }
  1529. // DitCoordinatorOpenVoteIterator is returned from FilterOpenVote and is used to iterate over the raw logs and unpacked data for OpenVote events raised by the DitCoordinator contract.
  1530. type DitCoordinatorOpenVoteIterator struct {
  1531. Event *DitCoordinatorOpenVote // Event containing the contract specifics and raw log
  1532. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1533. event string // Event name to use for unpacking event data
  1534. logs chan types.Log // Log channel receiving the found contract events
  1535. sub ethereum.Subscription // Subscription for errors, completion and termination
  1536. done bool // Whether the subscription completed delivering logs
  1537. fail error // Occurred error to stop iteration
  1538. }
  1539. // Next advances the iterator to the subsequent event, returning whether there
  1540. // are any more events found. In case of a retrieval or parsing error, false is
  1541. // returned and Error() can be queried for the exact failure.
  1542. func (it *DitCoordinatorOpenVoteIterator) Next() bool {
  1543. // If the iterator failed, stop iterating
  1544. if it.fail != nil {
  1545. return false
  1546. }
  1547. // If the iterator completed, deliver directly whatever's available
  1548. if it.done {
  1549. select {
  1550. case log := <-it.logs:
  1551. it.Event = new(DitCoordinatorOpenVote)
  1552. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1553. it.fail = err
  1554. return false
  1555. }
  1556. it.Event.Raw = log
  1557. return true
  1558. default:
  1559. return false
  1560. }
  1561. }
  1562. // Iterator still in progress, wait for either a data or an error event
  1563. select {
  1564. case log := <-it.logs:
  1565. it.Event = new(DitCoordinatorOpenVote)
  1566. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1567. it.fail = err
  1568. return false
  1569. }
  1570. it.Event.Raw = log
  1571. return true
  1572. case err := <-it.sub.Err():
  1573. it.done = true
  1574. it.fail = err
  1575. return it.Next()
  1576. }
  1577. }
  1578. // Error returns any retrieval or parsing error occurred during filtering.
  1579. func (it *DitCoordinatorOpenVoteIterator) Error() error {
  1580. return it.fail
  1581. }
  1582. // Close terminates the iteration process, releasing any pending underlying
  1583. // resources.
  1584. func (it *DitCoordinatorOpenVoteIterator) Close() error {
  1585. it.sub.Unsubscribe()
  1586. return nil
  1587. }
  1588. // DitCoordinatorOpenVote represents a OpenVote event raised by the DitCoordinator contract.
  1589. type DitCoordinatorOpenVote struct {
  1590. Repository [32]byte
  1591. Proposal *big.Int
  1592. Who common.Address
  1593. Label string
  1594. Accept bool
  1595. NumberOfVotes *big.Int
  1596. Raw types.Log // Blockchain specific contextual infos
  1597. }
  1598. // FilterOpenVote is a free log retrieval operation binding the contract event 0x864c0d6987266fd72e7e37f1fbc98b6a3794b7187dae454c67a2a626628a72ab.
  1599. //
  1600. // Solidity: event OpenVote(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label, bool accept, uint256 numberOfVotes)
  1601. func (_DitCoordinator *DitCoordinatorFilterer) FilterOpenVote(opts *bind.FilterOpts, repository [][32]byte, proposal []*big.Int, who []common.Address) (*DitCoordinatorOpenVoteIterator, error) {
  1602. var repositoryRule []interface{}
  1603. for _, repositoryItem := range repository {
  1604. repositoryRule = append(repositoryRule, repositoryItem)
  1605. }
  1606. var proposalRule []interface{}
  1607. for _, proposalItem := range proposal {
  1608. proposalRule = append(proposalRule, proposalItem)
  1609. }
  1610. var whoRule []interface{}
  1611. for _, whoItem := range who {
  1612. whoRule = append(whoRule, whoItem)
  1613. }
  1614. logs, sub, err := _DitCoordinator.contract.FilterLogs(opts, "OpenVote", repositoryRule, proposalRule, whoRule)
  1615. if err != nil {
  1616. return nil, err
  1617. }
  1618. return &DitCoordinatorOpenVoteIterator{contract: _DitCoordinator.contract, event: "OpenVote", logs: logs, sub: sub}, nil
  1619. }
  1620. // WatchOpenVote is a free log subscription operation binding the contract event 0x864c0d6987266fd72e7e37f1fbc98b6a3794b7187dae454c67a2a626628a72ab.
  1621. //
  1622. // Solidity: event OpenVote(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label, bool accept, uint256 numberOfVotes)
  1623. func (_DitCoordinator *DitCoordinatorFilterer) WatchOpenVote(opts *bind.WatchOpts, sink chan<- *DitCoordinatorOpenVote, repository [][32]byte, proposal []*big.Int, who []common.Address) (event.Subscription, error) {
  1624. var repositoryRule []interface{}
  1625. for _, repositoryItem := range repository {
  1626. repositoryRule = append(repositoryRule, repositoryItem)
  1627. }
  1628. var proposalRule []interface{}
  1629. for _, proposalItem := range proposal {
  1630. proposalRule = append(proposalRule, proposalItem)
  1631. }
  1632. var whoRule []interface{}
  1633. for _, whoItem := range who {
  1634. whoRule = append(whoRule, whoItem)
  1635. }
  1636. logs, sub, err := _DitCoordinator.contract.WatchLogs(opts, "OpenVote", repositoryRule, proposalRule, whoRule)
  1637. if err != nil {
  1638. return nil, err
  1639. }
  1640. return event.NewSubscription(func(quit <-chan struct{}) error {
  1641. defer sub.Unsubscribe()
  1642. for {
  1643. select {
  1644. case log := <-logs:
  1645. // New log arrived, parse the event and forward to the user
  1646. event := new(DitCoordinatorOpenVote)
  1647. if err := _DitCoordinator.contract.UnpackLog(event, "OpenVote", log); err != nil {
  1648. return err
  1649. }
  1650. event.Raw = log
  1651. select {
  1652. case sink <- event:
  1653. case err := <-sub.Err():
  1654. return err
  1655. case <-quit:
  1656. return nil
  1657. }
  1658. case err := <-sub.Err():
  1659. return err
  1660. case <-quit:
  1661. return nil
  1662. }
  1663. }
  1664. }), nil
  1665. }
  1666. // DitCoordinatorProposeCommitIterator is returned from FilterProposeCommit and is used to iterate over the raw logs and unpacked data for ProposeCommit events raised by the DitCoordinator contract.
  1667. type DitCoordinatorProposeCommitIterator struct {
  1668. Event *DitCoordinatorProposeCommit // Event containing the contract specifics and raw log
  1669. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1670. event string // Event name to use for unpacking event data
  1671. logs chan types.Log // Log channel receiving the found contract events
  1672. sub ethereum.Subscription // Subscription for errors, completion and termination
  1673. done bool // Whether the subscription completed delivering logs
  1674. fail error // Occurred error to stop iteration
  1675. }
  1676. // Next advances the iterator to the subsequent event, returning whether there
  1677. // are any more events found. In case of a retrieval or parsing error, false is
  1678. // returned and Error() can be queried for the exact failure.
  1679. func (it *DitCoordinatorProposeCommitIterator) Next() bool {
  1680. // If the iterator failed, stop iterating
  1681. if it.fail != nil {
  1682. return false
  1683. }
  1684. // If the iterator completed, deliver directly whatever's available
  1685. if it.done {
  1686. select {
  1687. case log := <-it.logs:
  1688. it.Event = new(DitCoordinatorProposeCommit)
  1689. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1690. it.fail = err
  1691. return false
  1692. }
  1693. it.Event.Raw = log
  1694. return true
  1695. default:
  1696. return false
  1697. }
  1698. }
  1699. // Iterator still in progress, wait for either a data or an error event
  1700. select {
  1701. case log := <-it.logs:
  1702. it.Event = new(DitCoordinatorProposeCommit)
  1703. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1704. it.fail = err
  1705. return false
  1706. }
  1707. it.Event.Raw = log
  1708. return true
  1709. case err := <-it.sub.Err():
  1710. it.done = true
  1711. it.fail = err
  1712. return it.Next()
  1713. }
  1714. }
  1715. // Error returns any retrieval or parsing error occurred during filtering.
  1716. func (it *DitCoordinatorProposeCommitIterator) Error() error {
  1717. return it.fail
  1718. }
  1719. // Close terminates the iteration process, releasing any pending underlying
  1720. // resources.
  1721. func (it *DitCoordinatorProposeCommitIterator) Close() error {
  1722. it.sub.Unsubscribe()
  1723. return nil
  1724. }
  1725. // DitCoordinatorProposeCommit represents a ProposeCommit event raised by the DitCoordinator contract.
  1726. type DitCoordinatorProposeCommit struct {
  1727. Repository [32]byte
  1728. Proposal *big.Int
  1729. Who common.Address
  1730. Label string
  1731. Raw types.Log // Blockchain specific contextual infos
  1732. }
  1733. // FilterProposeCommit is a free log retrieval operation binding the contract event 0x171fe77c3addce776991159eb3eb73b14d9187ebd06c1c34ea12355a84ddbd83.
  1734. //
  1735. // Solidity: event ProposeCommit(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label)
  1736. func (_DitCoordinator *DitCoordinatorFilterer) FilterProposeCommit(opts *bind.FilterOpts, repository [][32]byte, proposal []*big.Int, who []common.Address) (*DitCoordinatorProposeCommitIterator, error) {
  1737. var repositoryRule []interface{}
  1738. for _, repositoryItem := range repository {
  1739. repositoryRule = append(repositoryRule, repositoryItem)
  1740. }
  1741. var proposalRule []interface{}
  1742. for _, proposalItem := range proposal {
  1743. proposalRule = append(proposalRule, proposalItem)
  1744. }
  1745. var whoRule []interface{}
  1746. for _, whoItem := range who {
  1747. whoRule = append(whoRule, whoItem)
  1748. }
  1749. logs, sub, err := _DitCoordinator.contract.FilterLogs(opts, "ProposeCommit", repositoryRule, proposalRule, whoRule)
  1750. if err != nil {
  1751. return nil, err
  1752. }
  1753. return &DitCoordinatorProposeCommitIterator{contract: _DitCoordinator.contract, event: "ProposeCommit", logs: logs, sub: sub}, nil
  1754. }
  1755. // WatchProposeCommit is a free log subscription operation binding the contract event 0x171fe77c3addce776991159eb3eb73b14d9187ebd06c1c34ea12355a84ddbd83.
  1756. //
  1757. // Solidity: event ProposeCommit(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label)
  1758. func (_DitCoordinator *DitCoordinatorFilterer) WatchProposeCommit(opts *bind.WatchOpts, sink chan<- *DitCoordinatorProposeCommit, repository [][32]byte, proposal []*big.Int, who []common.Address) (event.Subscription, error) {
  1759. var repositoryRule []interface{}
  1760. for _, repositoryItem := range repository {
  1761. repositoryRule = append(repositoryRule, repositoryItem)
  1762. }
  1763. var proposalRule []interface{}
  1764. for _, proposalItem := range proposal {
  1765. proposalRule = append(proposalRule, proposalItem)
  1766. }
  1767. var whoRule []interface{}
  1768. for _, whoItem := range who {
  1769. whoRule = append(whoRule, whoItem)
  1770. }
  1771. logs, sub, err := _DitCoordinator.contract.WatchLogs(opts, "ProposeCommit", repositoryRule, proposalRule, whoRule)
  1772. if err != nil {
  1773. return nil, err
  1774. }
  1775. return event.NewSubscription(func(quit <-chan struct{}) error {
  1776. defer sub.Unsubscribe()
  1777. for {
  1778. select {
  1779. case log := <-logs:
  1780. // New log arrived, parse the event and forward to the user
  1781. event := new(DitCoordinatorProposeCommit)
  1782. if err := _DitCoordinator.contract.UnpackLog(event, "ProposeCommit", log); err != nil {
  1783. return err
  1784. }
  1785. event.Raw = log
  1786. select {
  1787. case sink <- event:
  1788. case err := <-sub.Err():
  1789. return err
  1790. case <-quit:
  1791. return nil
  1792. }
  1793. case err := <-sub.Err():
  1794. return err
  1795. case <-quit:
  1796. return nil
  1797. }
  1798. }
  1799. }), nil
  1800. }