ditDemoCoordinator.go 139 KB

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