KNWVoting.go 102 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408
  1. // Code generated - DO NOT EDIT.
  2. // This file is a generated binding and any manual changes will be lost.
  3. package KNWVoting
  4. import (
  5. "math/big"
  6. "strings"
  7. ethereum "github.com/ethereum/go-ethereum"
  8. "github.com/ethereum/go-ethereum/accounts/abi"
  9. "github.com/ethereum/go-ethereum/accounts/abi/bind"
  10. "github.com/ethereum/go-ethereum/common"
  11. "github.com/ethereum/go-ethereum/core/types"
  12. "github.com/ethereum/go-ethereum/event"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var (
  16. _ = big.NewInt
  17. _ = strings.NewReader
  18. _ = ethereum.NotFound
  19. _ = abi.U256
  20. _ = bind.Bind
  21. _ = common.Big1
  22. _ = types.BloomLookup
  23. _ = event.NewSubscription
  24. )
  25. // KNWTokenContractABI is the input ABI used to generate the binding from.
  26. const KNWTokenContractABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"_account\",\"type\":\"address\"},{\"name\":\"_label\",\"type\":\"string\"}],\"name\":\"freeBalanceOfLabel\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_account\",\"type\":\"address\"},{\"name\":\"_label\",\"type\":\"string\"}],\"name\":\"lockTokens\",\"outputs\":[{\"name\":\"numberOfTokens\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_account\",\"type\":\"address\"},{\"name\":\"_label\",\"type\":\"string\"},{\"name\":\"_winningPercentage\",\"type\":\"uint256\"},{\"name\":\"_mintingMethod\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_account\",\"type\":\"address\"},{\"name\":\"_label\",\"type\":\"string\"},{\"name\":\"_numberOfTokens\",\"type\":\"uint256\"},{\"name\":\"_winningPercentage\",\"type\":\"uint256\"},{\"name\":\"_burningMethod\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_account\",\"type\":\"address\"},{\"name\":\"_label\",\"type\":\"string\"}],\"name\":\"balanceOfLabel\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_account\",\"type\":\"address\"},{\"name\":\"_label\",\"type\":\"string\"},{\"name\":\"_numberOfTokens\",\"type\":\"uint256\"}],\"name\":\"unlockTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
  27. // KNWTokenContractBin is the compiled bytecode used for deploying new contracts.
  28. const KNWTokenContractBin = `0x`
  29. // DeployKNWTokenContract deploys a new Ethereum contract, binding an instance of KNWTokenContract to it.
  30. func DeployKNWTokenContract(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *KNWTokenContract, error) {
  31. parsed, err := abi.JSON(strings.NewReader(KNWTokenContractABI))
  32. if err != nil {
  33. return common.Address{}, nil, nil, err
  34. }
  35. address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(KNWTokenContractBin), backend)
  36. if err != nil {
  37. return common.Address{}, nil, nil, err
  38. }
  39. return address, tx, &KNWTokenContract{KNWTokenContractCaller: KNWTokenContractCaller{contract: contract}, KNWTokenContractTransactor: KNWTokenContractTransactor{contract: contract}, KNWTokenContractFilterer: KNWTokenContractFilterer{contract: contract}}, nil
  40. }
  41. // KNWTokenContract is an auto generated Go binding around an Ethereum contract.
  42. type KNWTokenContract struct {
  43. KNWTokenContractCaller // Read-only binding to the contract
  44. KNWTokenContractTransactor // Write-only binding to the contract
  45. KNWTokenContractFilterer // Log filterer for contract events
  46. }
  47. // KNWTokenContractCaller is an auto generated read-only Go binding around an Ethereum contract.
  48. type KNWTokenContractCaller struct {
  49. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  50. }
  51. // KNWTokenContractTransactor is an auto generated write-only Go binding around an Ethereum contract.
  52. type KNWTokenContractTransactor struct {
  53. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  54. }
  55. // KNWTokenContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  56. type KNWTokenContractFilterer struct {
  57. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  58. }
  59. // KNWTokenContractSession is an auto generated Go binding around an Ethereum contract,
  60. // with pre-set call and transact options.
  61. type KNWTokenContractSession struct {
  62. Contract *KNWTokenContract // Generic contract binding to set the session for
  63. CallOpts bind.CallOpts // Call options to use throughout this session
  64. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  65. }
  66. // KNWTokenContractCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  67. // with pre-set call options.
  68. type KNWTokenContractCallerSession struct {
  69. Contract *KNWTokenContractCaller // Generic contract caller binding to set the session for
  70. CallOpts bind.CallOpts // Call options to use throughout this session
  71. }
  72. // KNWTokenContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  73. // with pre-set transact options.
  74. type KNWTokenContractTransactorSession struct {
  75. Contract *KNWTokenContractTransactor // Generic contract transactor binding to set the session for
  76. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  77. }
  78. // KNWTokenContractRaw is an auto generated low-level Go binding around an Ethereum contract.
  79. type KNWTokenContractRaw struct {
  80. Contract *KNWTokenContract // Generic contract binding to access the raw methods on
  81. }
  82. // KNWTokenContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  83. type KNWTokenContractCallerRaw struct {
  84. Contract *KNWTokenContractCaller // Generic read-only contract binding to access the raw methods on
  85. }
  86. // KNWTokenContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  87. type KNWTokenContractTransactorRaw struct {
  88. Contract *KNWTokenContractTransactor // Generic write-only contract binding to access the raw methods on
  89. }
  90. // NewKNWTokenContract creates a new instance of KNWTokenContract, bound to a specific deployed contract.
  91. func NewKNWTokenContract(address common.Address, backend bind.ContractBackend) (*KNWTokenContract, error) {
  92. contract, err := bindKNWTokenContract(address, backend, backend, backend)
  93. if err != nil {
  94. return nil, err
  95. }
  96. return &KNWTokenContract{KNWTokenContractCaller: KNWTokenContractCaller{contract: contract}, KNWTokenContractTransactor: KNWTokenContractTransactor{contract: contract}, KNWTokenContractFilterer: KNWTokenContractFilterer{contract: contract}}, nil
  97. }
  98. // NewKNWTokenContractCaller creates a new read-only instance of KNWTokenContract, bound to a specific deployed contract.
  99. func NewKNWTokenContractCaller(address common.Address, caller bind.ContractCaller) (*KNWTokenContractCaller, error) {
  100. contract, err := bindKNWTokenContract(address, caller, nil, nil)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return &KNWTokenContractCaller{contract: contract}, nil
  105. }
  106. // NewKNWTokenContractTransactor creates a new write-only instance of KNWTokenContract, bound to a specific deployed contract.
  107. func NewKNWTokenContractTransactor(address common.Address, transactor bind.ContractTransactor) (*KNWTokenContractTransactor, error) {
  108. contract, err := bindKNWTokenContract(address, nil, transactor, nil)
  109. if err != nil {
  110. return nil, err
  111. }
  112. return &KNWTokenContractTransactor{contract: contract}, nil
  113. }
  114. // NewKNWTokenContractFilterer creates a new log filterer instance of KNWTokenContract, bound to a specific deployed contract.
  115. func NewKNWTokenContractFilterer(address common.Address, filterer bind.ContractFilterer) (*KNWTokenContractFilterer, error) {
  116. contract, err := bindKNWTokenContract(address, nil, nil, filterer)
  117. if err != nil {
  118. return nil, err
  119. }
  120. return &KNWTokenContractFilterer{contract: contract}, nil
  121. }
  122. // bindKNWTokenContract binds a generic wrapper to an already deployed contract.
  123. func bindKNWTokenContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  124. parsed, err := abi.JSON(strings.NewReader(KNWTokenContractABI))
  125. if err != nil {
  126. return nil, err
  127. }
  128. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  129. }
  130. // Call invokes the (constant) contract method with params as input values and
  131. // sets the output to result. The result type might be a single field for simple
  132. // returns, a slice of interfaces for anonymous returns and a struct for named
  133. // returns.
  134. func (_KNWTokenContract *KNWTokenContractRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  135. return _KNWTokenContract.Contract.KNWTokenContractCaller.contract.Call(opts, result, method, params...)
  136. }
  137. // Transfer initiates a plain transaction to move funds to the contract, calling
  138. // its default method if one is available.
  139. func (_KNWTokenContract *KNWTokenContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  140. return _KNWTokenContract.Contract.KNWTokenContractTransactor.contract.Transfer(opts)
  141. }
  142. // Transact invokes the (paid) contract method with params as input values.
  143. func (_KNWTokenContract *KNWTokenContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  144. return _KNWTokenContract.Contract.KNWTokenContractTransactor.contract.Transact(opts, method, params...)
  145. }
  146. // Call invokes the (constant) contract method with params as input values and
  147. // sets the output to result. The result type might be a single field for simple
  148. // returns, a slice of interfaces for anonymous returns and a struct for named
  149. // returns.
  150. func (_KNWTokenContract *KNWTokenContractCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  151. return _KNWTokenContract.Contract.contract.Call(opts, result, method, params...)
  152. }
  153. // Transfer initiates a plain transaction to move funds to the contract, calling
  154. // its default method if one is available.
  155. func (_KNWTokenContract *KNWTokenContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  156. return _KNWTokenContract.Contract.contract.Transfer(opts)
  157. }
  158. // Transact invokes the (paid) contract method with params as input values.
  159. func (_KNWTokenContract *KNWTokenContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  160. return _KNWTokenContract.Contract.contract.Transact(opts, method, params...)
  161. }
  162. // BalanceOfLabel is a free data retrieval call binding the contract method 0xb88c0f98.
  163. //
  164. // Solidity: function balanceOfLabel(_account address, _label string) constant returns(uint256)
  165. func (_KNWTokenContract *KNWTokenContractCaller) BalanceOfLabel(opts *bind.CallOpts, _account common.Address, _label string) (*big.Int, error) {
  166. var (
  167. ret0 = new(*big.Int)
  168. )
  169. out := ret0
  170. err := _KNWTokenContract.contract.Call(opts, out, "balanceOfLabel", _account, _label)
  171. return *ret0, err
  172. }
  173. // BalanceOfLabel is a free data retrieval call binding the contract method 0xb88c0f98.
  174. //
  175. // Solidity: function balanceOfLabel(_account address, _label string) constant returns(uint256)
  176. func (_KNWTokenContract *KNWTokenContractSession) BalanceOfLabel(_account common.Address, _label string) (*big.Int, error) {
  177. return _KNWTokenContract.Contract.BalanceOfLabel(&_KNWTokenContract.CallOpts, _account, _label)
  178. }
  179. // BalanceOfLabel is a free data retrieval call binding the contract method 0xb88c0f98.
  180. //
  181. // Solidity: function balanceOfLabel(_account address, _label string) constant returns(uint256)
  182. func (_KNWTokenContract *KNWTokenContractCallerSession) BalanceOfLabel(_account common.Address, _label string) (*big.Int, error) {
  183. return _KNWTokenContract.Contract.BalanceOfLabel(&_KNWTokenContract.CallOpts, _account, _label)
  184. }
  185. // FreeBalanceOfLabel is a free data retrieval call binding the contract method 0x06970f1c.
  186. //
  187. // Solidity: function freeBalanceOfLabel(_account address, _label string) constant returns(uint256)
  188. func (_KNWTokenContract *KNWTokenContractCaller) FreeBalanceOfLabel(opts *bind.CallOpts, _account common.Address, _label string) (*big.Int, error) {
  189. var (
  190. ret0 = new(*big.Int)
  191. )
  192. out := ret0
  193. err := _KNWTokenContract.contract.Call(opts, out, "freeBalanceOfLabel", _account, _label)
  194. return *ret0, err
  195. }
  196. // FreeBalanceOfLabel is a free data retrieval call binding the contract method 0x06970f1c.
  197. //
  198. // Solidity: function freeBalanceOfLabel(_account address, _label string) constant returns(uint256)
  199. func (_KNWTokenContract *KNWTokenContractSession) FreeBalanceOfLabel(_account common.Address, _label string) (*big.Int, error) {
  200. return _KNWTokenContract.Contract.FreeBalanceOfLabel(&_KNWTokenContract.CallOpts, _account, _label)
  201. }
  202. // FreeBalanceOfLabel is a free data retrieval call binding the contract method 0x06970f1c.
  203. //
  204. // Solidity: function freeBalanceOfLabel(_account address, _label string) constant returns(uint256)
  205. func (_KNWTokenContract *KNWTokenContractCallerSession) FreeBalanceOfLabel(_account common.Address, _label string) (*big.Int, error) {
  206. return _KNWTokenContract.Contract.FreeBalanceOfLabel(&_KNWTokenContract.CallOpts, _account, _label)
  207. }
  208. // Burn is a paid mutator transaction binding the contract method 0x994dd93a.
  209. //
  210. // Solidity: function burn(_account address, _label string, _numberOfTokens uint256, _winningPercentage uint256, _burningMethod uint256) returns()
  211. func (_KNWTokenContract *KNWTokenContractTransactor) Burn(opts *bind.TransactOpts, _account common.Address, _label string, _numberOfTokens *big.Int, _winningPercentage *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
  212. return _KNWTokenContract.contract.Transact(opts, "burn", _account, _label, _numberOfTokens, _winningPercentage, _burningMethod)
  213. }
  214. // Burn is a paid mutator transaction binding the contract method 0x994dd93a.
  215. //
  216. // Solidity: function burn(_account address, _label string, _numberOfTokens uint256, _winningPercentage uint256, _burningMethod uint256) returns()
  217. func (_KNWTokenContract *KNWTokenContractSession) Burn(_account common.Address, _label string, _numberOfTokens *big.Int, _winningPercentage *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
  218. return _KNWTokenContract.Contract.Burn(&_KNWTokenContract.TransactOpts, _account, _label, _numberOfTokens, _winningPercentage, _burningMethod)
  219. }
  220. // Burn is a paid mutator transaction binding the contract method 0x994dd93a.
  221. //
  222. // Solidity: function burn(_account address, _label string, _numberOfTokens uint256, _winningPercentage uint256, _burningMethod uint256) returns()
  223. func (_KNWTokenContract *KNWTokenContractTransactorSession) Burn(_account common.Address, _label string, _numberOfTokens *big.Int, _winningPercentage *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
  224. return _KNWTokenContract.Contract.Burn(&_KNWTokenContract.TransactOpts, _account, _label, _numberOfTokens, _winningPercentage, _burningMethod)
  225. }
  226. // LockTokens is a paid mutator transaction binding the contract method 0x1d3316d0.
  227. //
  228. // Solidity: function lockTokens(_account address, _label string) returns(numberOfTokens uint256)
  229. func (_KNWTokenContract *KNWTokenContractTransactor) LockTokens(opts *bind.TransactOpts, _account common.Address, _label string) (*types.Transaction, error) {
  230. return _KNWTokenContract.contract.Transact(opts, "lockTokens", _account, _label)
  231. }
  232. // LockTokens is a paid mutator transaction binding the contract method 0x1d3316d0.
  233. //
  234. // Solidity: function lockTokens(_account address, _label string) returns(numberOfTokens uint256)
  235. func (_KNWTokenContract *KNWTokenContractSession) LockTokens(_account common.Address, _label string) (*types.Transaction, error) {
  236. return _KNWTokenContract.Contract.LockTokens(&_KNWTokenContract.TransactOpts, _account, _label)
  237. }
  238. // LockTokens is a paid mutator transaction binding the contract method 0x1d3316d0.
  239. //
  240. // Solidity: function lockTokens(_account address, _label string) returns(numberOfTokens uint256)
  241. func (_KNWTokenContract *KNWTokenContractTransactorSession) LockTokens(_account common.Address, _label string) (*types.Transaction, error) {
  242. return _KNWTokenContract.Contract.LockTokens(&_KNWTokenContract.TransactOpts, _account, _label)
  243. }
  244. // Mint is a paid mutator transaction binding the contract method 0x4a5dc3aa.
  245. //
  246. // Solidity: function mint(_account address, _label string, _winningPercentage uint256, _mintingMethod uint256) returns()
  247. func (_KNWTokenContract *KNWTokenContractTransactor) Mint(opts *bind.TransactOpts, _account common.Address, _label string, _winningPercentage *big.Int, _mintingMethod *big.Int) (*types.Transaction, error) {
  248. return _KNWTokenContract.contract.Transact(opts, "mint", _account, _label, _winningPercentage, _mintingMethod)
  249. }
  250. // Mint is a paid mutator transaction binding the contract method 0x4a5dc3aa.
  251. //
  252. // Solidity: function mint(_account address, _label string, _winningPercentage uint256, _mintingMethod uint256) returns()
  253. func (_KNWTokenContract *KNWTokenContractSession) Mint(_account common.Address, _label string, _winningPercentage *big.Int, _mintingMethod *big.Int) (*types.Transaction, error) {
  254. return _KNWTokenContract.Contract.Mint(&_KNWTokenContract.TransactOpts, _account, _label, _winningPercentage, _mintingMethod)
  255. }
  256. // Mint is a paid mutator transaction binding the contract method 0x4a5dc3aa.
  257. //
  258. // Solidity: function mint(_account address, _label string, _winningPercentage uint256, _mintingMethod uint256) returns()
  259. func (_KNWTokenContract *KNWTokenContractTransactorSession) Mint(_account common.Address, _label string, _winningPercentage *big.Int, _mintingMethod *big.Int) (*types.Transaction, error) {
  260. return _KNWTokenContract.Contract.Mint(&_KNWTokenContract.TransactOpts, _account, _label, _winningPercentage, _mintingMethod)
  261. }
  262. // UnlockTokens is a paid mutator transaction binding the contract method 0xd950df34.
  263. //
  264. // Solidity: function unlockTokens(_account address, _label string, _numberOfTokens uint256) returns()
  265. func (_KNWTokenContract *KNWTokenContractTransactor) UnlockTokens(opts *bind.TransactOpts, _account common.Address, _label string, _numberOfTokens *big.Int) (*types.Transaction, error) {
  266. return _KNWTokenContract.contract.Transact(opts, "unlockTokens", _account, _label, _numberOfTokens)
  267. }
  268. // UnlockTokens is a paid mutator transaction binding the contract method 0xd950df34.
  269. //
  270. // Solidity: function unlockTokens(_account address, _label string, _numberOfTokens uint256) returns()
  271. func (_KNWTokenContract *KNWTokenContractSession) UnlockTokens(_account common.Address, _label string, _numberOfTokens *big.Int) (*types.Transaction, error) {
  272. return _KNWTokenContract.Contract.UnlockTokens(&_KNWTokenContract.TransactOpts, _account, _label, _numberOfTokens)
  273. }
  274. // UnlockTokens is a paid mutator transaction binding the contract method 0xd950df34.
  275. //
  276. // Solidity: function unlockTokens(_account address, _label string, _numberOfTokens uint256) returns()
  277. func (_KNWTokenContract *KNWTokenContractTransactorSession) UnlockTokens(_account common.Address, _label string, _numberOfTokens *big.Int) (*types.Transaction, error) {
  278. return _KNWTokenContract.Contract.UnlockTokens(&_KNWTokenContract.TransactOpts, _account, _label, _numberOfTokens)
  279. }
  280. // KNWVotingABI is the input ABI used to generate the binding from.
  281. const KNWVotingABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"INITIAL_POLL_NONCE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"getNumKNW\",\"outputs\":[{\"name\":\"numKNW\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"revealPeriodActive\",\"outputs\":[{\"name\":\"active\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"isPassed\",\"outputs\":[{\"name\":\"passed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"pollMap\",\"outputs\":[{\"name\":\"repository\",\"type\":\"bytes32\"},{\"name\":\"knowledgeLabel\",\"type\":\"string\"},{\"name\":\"commitEndDate\",\"type\":\"uint256\"},{\"name\":\"revealEndDate\",\"type\":\"uint256\"},{\"name\":\"voteQuorum\",\"type\":\"uint256\"},{\"name\":\"votesFor\",\"type\":\"uint256\"},{\"name\":\"votesAgainst\",\"type\":\"uint256\"},{\"name\":\"votesUnrevealed\",\"type\":\"uint256\"},{\"name\":\"winningPercentage\",\"type\":\"uint256\"},{\"name\":\"participantsFor\",\"type\":\"uint256\"},{\"name\":\"participantsAgainst\",\"type\":\"uint256\"},{\"name\":\"participantsUnrevealed\",\"type\":\"uint256\"},{\"name\":\"isResolved\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"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\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"didCommit\",\"outputs\":[{\"name\":\"committed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"stakeMap\",\"outputs\":[{\"name\":\"proposersStake\",\"type\":\"uint256\"},{\"name\":\"proposersReward\",\"type\":\"uint256\"},{\"name\":\"returnPool\",\"type\":\"uint256\"},{\"name\":\"rewardPool\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"pollExists\",\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"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\":true,\"inputs\":[],\"name\":\"ditCoordinatorAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pollNonce\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"_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\":\"commitPeriodActive\",\"outputs\":[{\"name\":\"active\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"didReveal\",\"outputs\":[{\"name\":\"revealed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"getGrossStake\",\"outputs\":[{\"name\":\"grossStake\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"isResolved\",\"outputs\":[{\"name\":\"resolved\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"},{\"name\":\"_voteOption\",\"type\":\"uint256\"},{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"resolveVote\",\"outputs\":[{\"name\":\"reward\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"getNumVotes\",\"outputs\":[{\"name\":\"numVotes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_terminationDate\",\"type\":\"uint256\"}],\"name\":\"isExpired\",\"outputs\":[{\"name\":\"expired\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"getNetStake\",\"outputs\":[{\"name\":\"netStake\",\"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\":true,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"pollEnded\",\"outputs\":[{\"name\":\"ended\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newCoordinatorAddress\",\"type\":\"address\"}],\"name\":\"setCoordinatorAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]"
  282. // KNWVotingBin is the compiled bytecode used for deploying new contracts.
  283. const KNWVotingBin = `0x608060405234801561001057600080fd5b50600060045561302d806100256000396000f3006080604052600436106101455763ffffffff60e060020a6000350416632173a10f811461014a57806326a4e8d21461017157806334f2f2d21461019457806337071611146101be578063441c77c0146101e2578063494031831461020e5780636148fed5146102265780637eb2ff52146103165780637f97e8361461033d57806388a0c9291461036157806388d21ff31461039f5780639156cd07146103b757806393b17b8e146103f157806397508f3614610422578063985dbfc514610437578063a3fba0601461044c578063a4439dc51461046d578063aa7ca46414610485578063c3eb9708146104a9578063cc4e1954146104c1578063ce729fd2146104d9578063d8476fec14610500578063d9548e5314610524578063dcfde0921461053c578063e74fef3714610554578063ee6848301461056c578063f354b83814610584575b600080fd5b34801561015657600080fd5b5061015f6105a5565b60408051918252519081900360200190f35b34801561017d57600080fd5b50610192600160a060020a03600435166105aa565b005b3480156101a057600080fd5b50610192600435600160a060020a03602435166044356064356106a9565b3480156101ca57600080fd5b5061015f600160a060020a0360043516602435610b74565b3480156101ee57600080fd5b506101fa600435610ba2565b604080519115158252519081900360200190f35b34801561021a57600080fd5b506101fa600435610c25565b34801561023257600080fd5b5061023e600435610deb565b604051808e60001916600019168152602001806020018d81526020018c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018581526020018481526020018315151515815260200182810382528e818151815260200191508051906020019080838360005b838110156102cf5781810151838201526020016102b7565b50505050905090810190601f1680156102fc5780820380516001836020036101000a031916815260200191505b509e50505050505050505050505050505060405180910390f35b34801561032257600080fd5b5061015f600435600160a060020a0360243516604435610ee1565b34801561034957600080fd5b506101fa600160a060020a03600435166024356113bd565b34801561036d57600080fd5b5061037960043561143b565b604080519485526020850193909352838301919091526060830152519081900360800190f35b3480156103ab57600080fd5b506101fa600435611462565b3480156103c357600080fd5b5061015f600480359060248035600160a060020a03169160443591820191013560643560843560a435611477565b3480156103fd57600080fd5b506104066118fd565b60408051600160a060020a039092168252519081900360200190f35b34801561042e57600080fd5b5061015f61190c565b34801561044357600080fd5b50610406611912565b34801561045857600080fd5b50610192600435602435604435606435611921565b34801561047957600080fd5b506101fa6004356119c8565b34801561049157600080fd5b506101fa600160a060020a0360043516602435611a32565b3480156104b557600080fd5b5061015f600435611ab5565b3480156104cd57600080fd5b506101fa600435611ac7565b3480156104e557600080fd5b5061015f600435602435600160a060020a0360443516611adf565b34801561050c57600080fd5b5061015f600160a060020a0360043516602435612440565b34801561053057600080fd5b506101fa60043561246e565b34801561054857600080fd5b5061015f600435612473565b34801561056057600080fd5b506101fa6004356124f8565b34801561057857600080fd5b506101fa600435612980565b34801561059057600080fd5b50610192600160a060020a03600435166129ea565b600081565b600160a060020a038116158015906105cb5750600154600160a060020a0316155b151561066d576040805160e560020a62461bcd02815260206004820152604e60248201527f4b4e57546f6b656e20616464726573732063616e206f6e6c792062652073657460448201527f2069662069742773206e6f7420656d70747920616e64206861736e277420616c60648201527f7265616479206265656e20736574000000000000000000000000000000000000608482015290519081900360a40190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03938416179182905560028054929093169116179055565b600080543390600160a060020a03168114610710576040805160e560020a62461bcd02815260206004820152602d6024820152600080516020612fa28339815191526044820152600080516020612fe2833981519152606482015290519081900360840190fd5b61071986610ba2565b151561076f576040805160e560020a62461bcd02815260206004820152601e60248201527f52657665616c20706572696f642068617320746f206265206163746976650000604482015290519081900360640190fd5b6000868152600560209081526040808320600160a060020a0389168452600d0190915290205460ff161515610814576040805160e560020a62461bcd02815260206004820152602760248201527f5061727469636970616e742068617320746f2068617665206120766f7465206360448201527f6f6d6d6974656400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000868152600560209081526040808320600160a060020a0389168452600d01909152902054610100900460ff16156108bd576040805160e560020a62461bcd02815260206004820152602260248201527f43616e27742072657665616c206120766f7465206d6f7265207468616e206f6e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000868152600560209081526040808320600160a060020a0389168452600d01825291829020600301548251808301889052808401879052835180820385018152606090910193849052805191939092909182918401908083835b602083106109375780518252601f199092019160209182019101610918565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600019161415156109e5576040805160e560020a62461bcd02815260206004820152603660248201527f43686f69636520616e642053616c74206861766520746f20626520746865207360448201527f616d6520617320696e2074686520766f74656861736800000000000000000000606482015290519081900360840190fd5b6000868152600560208181526040808420600160a060020a038a168552600d8101835290842060020154938a905291905260070154909250610a2d908363ffffffff612adc16565b60008781526005602052604090206007810191909155600b0154610a5890600163ffffffff612adc16565b6000878152600560205260409020600b01556001841415610ada5760008681526005602081905260409091200154610a96908363ffffffff612b6b16565b60008781526005602081905260409091209081019190915560090154610ac390600163ffffffff612b6b16565b600087815260056020526040902060090155610b3a565b600086815260056020526040902060060154610afc908363ffffffff612b6b16565b60008781526005602052604090206006810191909155600a0154610b2790600163ffffffff612b6b16565b6000878152600560205260409020600a01555b505050600092835250600560209081526040808420600160a060020a039093168452600d90920190529020805461ff001916610100179055565b6000908152600560209081526040808320600160a060020a03949094168352600d9093019052206001015490565b6000610bad82611462565b1515610bf1576040805160e560020a62461bcd0281526020600482015260116024820152600080516020612fc2833981519152604482015290519081900360640190fd5b600082815260056020526040902060030154610c0c9061246e565b158015610c1f5750610c1d826119c8565b155b92915050565b6000610c2f612e98565b610c3883612980565b1515610c8e576040805160e560020a62461bcd02815260206004820152601660248201527f506f6c6c2068617320746f206861766520656e64656400000000000000000000604482015290519081900360640190fd5b60008381526005602090815260409182902082516101a08101845281548152600180830180548651600260001994831615610100029490940190911692909204601f8101869004860283018601909652858252919492938581019391929190830182828015610d3e5780601f10610d1357610100808354040283529160200191610d3e565b820191906000526020600020905b815481529060010190602001808311610d2157829003601f168201915b505050505081526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c820160009054906101000a900460ff16151515158152505090508060c001518160a00151018160800151028160a001516064021191505b50919050565b6005602090815260009182526040918290208054600180830180548651600293821615610100026000190190911692909204601f810186900486028301860190965285825291949293909290830182828015610e885780601f10610e5d57610100808354040283529160200191610e88565b820191906000526020600020905b815481529060010190602001808311610e6b57829003601f168201915b50505050509080600201549080600301549080600401549080600501549080600601549080600701549080600801549080600901549080600a01549080600b01549080600c0160009054906101000a900460ff1690508d565b60008054819081903390600160a060020a03168114610f4c576040805160e560020a62461bcd02815260206004820152602d6024820152600080516020612fa28339815191526044820152600080516020612fe2833981519152606482015290519081900360840190fd5b861515610fa3576040805160e560020a62461bcd02815260206004820152601460248201527f706f6c6c49442063616e2774206265207a65726f000000000000000000000000604482015290519081900360640190fd5b610fac876119c8565b1515611002576040805160e560020a62461bcd02815260206004820152601e60248201527f436f6d6d697420706572696f642068617320746f206265206163746976650000604482015290519081900360640190fd5b61100c86886113bd565b15611061576040805160e560020a62461bcd02815260206004820152601f60248201527f43616e277420636f6d6d6974206d6f7265207468616e206f6e6520766f746500604482015290519081900360640190fd5b8415156110b8576040805160e560020a62461bcd02815260206004820152601b60248201527f43616e277420766f746520776974682061207a65726f20686173680000000000604482015290519081900360640190fd5b6000878152600660209081526040808320546002805460059094529382902082517f1d3316d0000000000000000000000000000000000000000000000000000000008152600160a060020a038c81166004830190815260248301958652600193840180546000199581161561010002959095019094169790970460448301819052939a5090941694631d3316d0948c949293919291606490910190849080156111a25780601f10611177576101008083540402835291602001916111a2565b820191906000526020600020905b81548152906001019060200180831161118557829003601f168201915b50509350505050602060405180830381600087803b1580156111c357600080fd5b505af11580156111d7573d6000803e3d6000fd5b505050506040513d60208110156111ed57600080fd5b50516000888152600560209081526040808320600160a060020a038b168452600d01909152902060010181905592506112318364e8d4a5100063ffffffff612bf516565b73__libraries/SafeMath.sol:SafeMath_______63677342ce90916040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561128457600080fd5b505af4158015611298573d6000803e3d6000fd5b505050506040513d60208110156112ae57600080fd5b505191506112c98366038d7ea4c6800063ffffffff612bf516565b82106112e9576112e68366038d7ea4c6800063ffffffff612bf516565b91505b61131b61130e6103e8611302858863ffffffff612c6316565b9063ffffffff612bf516565b859063ffffffff612b6b16565b6000888152600560208181526040808420600160a060020a038c168552600d8101835290842060028101869055600381018b9055805460ff19166001179055928b90525260070154909450611376908563ffffffff612b6b16565b60008881526005602052604090206007810191909155600b01546113a190600163ffffffff612b6b16565b6000888152600560205260409020600b01555050509392505050565b60006113c882611462565b151561140c576040805160e560020a62461bcd0281526020600482015260116024820152600080516020612fc2833981519152604482015290519081900360640190fd5b506000908152600560209081526040808320600160a060020a03949094168352600d9093019052205460ff1690565b60066020526000908152604090208054600182015460028301546003909301549192909184565b60008115801590610c1f575050600454101590565b600080548190819081903390600160a060020a031681146114e4576040805160e560020a62461bcd02815260206004820152602d6024820152600080516020612fa28339815191526044820152600080516020612fe2833981519152606482015290519081900360840190fd5b6004546114f890600163ffffffff612b6b16565b60045561150b428963ffffffff612b6b16565b935061151d848863ffffffff612b6b16565b604080516101a0810182528e815281516020601f8e018190048102820181019093528c815292955091818301918d908d90819084018382808284378201915050505050508152602001858152602001848152602001600360008f60001916600019168152602001908152602001600020600201548152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525060056000600454815260200190815260200160002060008201518160000190600019169055602082015181600101908051906020019061160f929190612f06565b5060408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b015561018082015181600c0160006101000a81548160ff02191690831515021790555090505060806040519081016040528087815260200160008152602001600081526020016000815250600660006004548152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301559050506001600560006004548152602001908152602001600020600d0160008d600160a060020a0316600160a060020a0316815260200190815260200160002060000160026101000a81548160ff021916908315150217905550600260009054906101000a9004600160a060020a0316600160a060020a0316631d3316d08c6005600060045481526020019081526020016000206001016040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a03168152602001806020018281038252838181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156118485780601f1061181d57610100808354040283529160200191611848565b820191906000526020600020905b81548152906001019060200180831161182b57829003601f168201915b50509350505050602060405180830381600087803b15801561186957600080fd5b505af115801561187d573d6000803e3d6000fd5b505050506040513d602081101561189357600080fd5b8101908080519060200190929190505050915081600560006004548152602001908152602001600020600d0160008d600160a060020a0316600160a060020a0316815260200190815260200160002060010181905550600454945050505050979650505050505050565b600054600160a060020a031681565b60045481565b600154600160a060020a031681565b600054600160a060020a031633146119a9576040805160e560020a62461bcd02815260206004820152602560248201527f4f6e6c792074686520646974436f6f7264696e61746f722063616e2063616c6c60448201527f2074686973000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000938452600360205260409093206002810192909255600182015555565b60006119d382611462565b1515611a17576040805160e560020a62461bcd0281526020600482015260116024820152600080516020612fc2833981519152604482015290519081900360640190fd5b600082815260056020526040902060020154610c1d9061246e565b6000611a3d82611462565b1515611a81576040805160e560020a62461bcd0281526020600482015260116024820152600080516020612fc2833981519152604482015290519081900360640190fd5b506000908152600560209081526040808320600160a060020a03949094168352600d90930190522054610100900460ff1690565b60009081526006602052604090205490565b6000908152600560205260409020600c015460ff1690565b600080548190819081903390600160a060020a03168114611b4c576040805160e560020a62461bcd02815260206004820152602d6024820152600080516020612fa28339815191526044820152600080516020612fe2833981519152606482015290519081900360840190fd5b6000888152600560205260409020600c81015490945060ff161515611bbb576040805160e560020a62461bcd02815260206004820152601760248201527f506f6c6c2068617320746f206265207265736f6c766564000000000000000000604482015290519081900360640190fd5b600160a060020a0386166000908152600d850160205260408120600101541115611d045760028054600160a060020a038881166000818152600d890160205260409081902060019081015491517fd950df3400000000000000000000000000000000000000000000000000000000815260048101938452604481018390526060602482019081528b830180546000199481161561010002949094019093169790970460648201819052949095169563d950df34958d9592949260849091019085908015611cc95780601f10611c9e57610100808354040283529160200191611cc9565b820191906000526020600020905b815481529060010190602001808311611cac57829003601f168201915b5050945050505050600060405180830381600087803b158015611ceb57600080fd5b505af1158015611cff573d6000803e3d6000fd5b505050505b611d0d88610c25565b925082611d1b576000611d1e565b60015b600160a060020a0387166000908152600d8601602052604090205460ff918216891493506201000090041615612000578215611e895760028054600886015486546000908152600360205260409081902060019081015491517f4a5dc3aa000000000000000000000000000000000000000000000000000000008152600160a060020a038c81166004830190815260448301869052606483018590526080602484019081528c8501805495861615610100026000190190951698909804608484018190529190961696634a5dc3aa968e96949593909260a49091019086908015611e495780601f10611e1e57610100808354040283529160200191611e49565b820191906000526020600020905b815481529060010190602001808311611e2c57829003601f168201915b505095505050505050600060405180830381600087803b158015611e6c57600080fd5b505af1158015611e80573d6000803e3d6000fd5b50505050611fe7565b6000888152600660205260409020600101541515611fe75760028054600160a060020a038881166000818152600d89016020908152604080832060019081015460088d01548d5486526003909452938290205491517f994dd93a0000000000000000000000000000000000000000000000000000000081526004810195865260448101859052606481018490526084810183905260a0602482019081528d830180549384161561010002600019019093169990990460a48201819052969097169763994dd93a978f9792969260c49091019087908015611faa5780601f10611f7f57610100808354040283529160200191611faa565b820191906000526020600020905b815481529060010190602001808311611f8d57829003601f168201915b50509650505050505050600060405180830381600087803b158015611fce57600080fd5b505af1158015611fe2573d6000803e3d6000fd5b505050505b6000888152600660205260409020600101549450612435565b61200a8689611a32565b156122d05782158015612024575083600601548460050154145b1561203c5761203588836001612cdc565b94506122cb565b61204888836000612cdc565b945081156121855760028054600886015486546000908152600360205260409081902060019081015491517f4a5dc3aa000000000000000000000000000000000000000000000000000000008152600160a060020a038c81166004830190815260448301869052606483018590526080602484019081528c8501805495861615610100026000190190951698909804608484018190529190961696634a5dc3aa968e96949593909260a490910190869080156121455780601f1061211a57610100808354040283529160200191612145565b820191906000526020600020905b81548152906001019060200180831161212857829003601f168201915b505095505050505050600060405180830381600087803b15801561216857600080fd5b505af115801561217c573d6000803e3d6000fd5b505050506122cb565b60028054600160a060020a038881166000818152600d89016020908152604080832060019081015460088d01548d5486526003909452938290205491517f994dd93a0000000000000000000000000000000000000000000000000000000081526004810195865260448101859052606481018490526084810183905260a0602482019081528d830180549384161561010002600019019093169990990460a48201819052969097169763994dd93a978f9792969260c4909101908790801561228e5780601f106122635761010080835404028352916020019161228e565b820191906000526020600020905b81548152906001019060200180831161227157829003601f168201915b50509650505050505050600060405180830381600087803b1580156122b257600080fd5b505af11580156122c6573d6000803e3d6000fd5b505050505b612435565b6122da8689611a32565b1580156122ec57506122ec86896113bd565b156123e5576122fd88600080612cdc565b60028054600160a060020a038981166000818152600d8a016020908152604080832060019081015460088e01548e5486526003909452938290205491517f994dd93a0000000000000000000000000000000000000000000000000000000081526004810195865260448101859052606481018490526084810183905260a0602482019081528e830180549384161561010002600019019093169990990460a48201819052999e50959096169763994dd93a978f979694959394929392909160c4909101908790801561228e5780601f106122635761010080835404028352916020019161228e565b6040805160e560020a62461bcd02815260206004820152601d60248201527f4e6f742061207061727469636970616e74206f662074686520766f7465000000604482015290519081900360640190fd5b505050509392505050565b6000908152600560209081526040808320600160a060020a03949094168352600d9093019052206002015490565b421190565b6000818152600560205260408120600b8101546009820154600a9092015483926124b392916124a79163ffffffff612b6b16565b9063ffffffff612b6b16565b905060008111156124e4576000838152600660205260409020546124dd908263ffffffff612bf516565b9150610de5565b505060009081526006602052604090205490565b6000805481908190819081903390600160a060020a03168114612567576040805160e560020a62461bcd02815260206004820152602d6024820152600080516020612fa28339815191526044820152600080516020612fe2833981519152606482015290519081900360840190fd5b61257087612980565b15156125c6576040805160e560020a62461bcd02815260206004820152601660248201527f506f6c6c2068617320746f206861766520656e64656400000000000000000000604482015290519081900360640190fd5b600087815260056020819052604090912060068101549101546125ee9163ffffffff612b6b16565b6000888152600560205260409020600b8101546009820154600a909201549297506126259290916124a7919063ffffffff612b6b16565b935083151561266a57600087815260066020908152604080832080546001918201556005909252822060088101839055600c01805460ff191690911790559550612976565b6000878152600660205260409020546126b9906126ac90612691908763ffffffff612bf516565b60008a8152600660205260409020549063ffffffff612adc16565b859063ffffffff612c6316565b60008881526006602052604081206002019190915592506126d987610c25565b95508515612758576000878152600560208190526040909120015461270b90869061130290606463ffffffff612c6316565b60008881526005602052604090206008810191909155600b810154600a9091015461273b9163ffffffff612b6b16565b60008881526006602052604090208054600190910155925061281b565b60008781526005602081905260409091206006810154910154146127ec5760008781526005602052604090206006015461279f90869061130290606463ffffffff612c6316565b60008881526005602052604090206008810191909155600b8101546009909101546127cf9163ffffffff612b6b16565b60008881526006602052604090208054600390910155925061281b565b600087815260056020908152604080832060326008820155600b01546006909252909120805460019091015592505b60008781526006602052604081206002015411156128ad5760008781526006602052604090206002015461289a9061287c906126ac90612861908863ffffffff612bf516565b60008b8152600660205260409020549063ffffffff612adc16565b6000898152600660205260409020600301549063ffffffff612b6b16565b6000888152600660205260409020600301555b6000878152600560209081526040808320600c01805460ff191660019081179091556006909252822001541115612976576129146128f660016124a7878763ffffffff612adc16565b6000898152600660205260409020600301549063ffffffff612bf516565b600088815260066020526040902060010154909250612939908363ffffffff612b6b16565b6000888152600660205260409020600181019190915560030154612963908363ffffffff612adc16565b6000888152600660205260409020600301555b5050505050919050565b600061298b82611462565b15156129cf576040805160e560020a62461bcd0281526020600482015260116024820152600080516020612fc2833981519152604482015290519081900360640190fd5b600082815260056020526040902060030154610c1f9061246e565b600160a060020a03811615801590612a0b5750600054600160a060020a0316155b1515612aad576040805160e560020a62461bcd02815260206004820152605460248201527f646974436f6f7264696e61746f7220616464726573732063616e206f6e6c792060448201527f6265207365742069662069742773206e6f7420656d70747920616e642068617360648201527f6e277420616c7265616479206265656e20736574000000000000000000000000608482015290519081900360a40190fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008083831115612b5d576040805160e560020a62461bcd02815260206004820152603560248201527f43616e27742073756274726163742061206e756d6265722066726f6d2061207360448201527f6d616c6c6572206f6e6520776974682075696e74730000000000000000000000606482015290519081900360840190fd5b5050808203805b5092915050565b600082820183811015612bee576040805160e560020a62461bcd02815260206004820152602a60248201527f526573756c742068617320746f20626520626967676572207468616e20626f7460448201527f682073756d6d616e647300000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b600080808311612c4f576040805160e560020a62461bcd02815260206004820152601460248201527f43616e277420646976696465206279207a65726f000000000000000000000000604482015290519081900360640190fd5b8284811515612c5a57fe5b04949350505050565b600080831515612c765760009150612b64565b50828202828482811515612c8657fe5b0414612bee576040805160e560020a62461bcd02815260206004820152601f60248201527f466c6177656420696e70757420666f72206d756c7469706c69636174696f6e00604482015290519081900360640190fd5b6000838152600560205260408120600b8101546009820154600a909201548392839283928392612d1692916124a79163ffffffff612b6b16565b935060009250851515612dd457600088815260066020526040902060020154612d45908563ffffffff612bf516565b91508192508615612dcf57506000612d5c88610c25565b15612d795750600087815260056020526040902060090154612d8d565b506000878152600560205260409020600a01545b600088815260066020526040902060030154612dcc90612db3908363ffffffff612bf516565b6124a7612dbf8b612473565b869063ffffffff612b6b16565b92505b612e8c565b60008881526006602090815260408083205460059092528220600b0154909450118015612e1157506000888152600560205260409020600b015484115b15612e8c576000888152600560205260409020600b0154612e8990612e6e90612e4190879063ffffffff612adc16565b60008b8152600660209081526040808320546005909252909120600b01546113029163ffffffff612c6316565b60008a8152600660205260409020549063ffffffff612b6b16565b92505b50909695505050505050565b6101a0604051908101604052806000801916815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612f4757805160ff1916838001178555612f74565b82800160010185558215612f74579182015b82811115612f74578251825591602001919060010190612f59565b50612f80929150612f84565b5090565b612f9e91905b80821115612f805760008155600101612f8a565b9056004f6e6c792074686520646974436f6f7264696e61746f7220697320616c6c6f77506f6c6c2068617320746f20657869737400000000000000000000000000000020746f2063616c6c207468697300000000000000000000000000000000000000a165627a7a72305820f01d5213a58d0d103188d6e8797f20b9210bc59435438fa8355bf6977c88e0140029`
  284. // DeployKNWVoting deploys a new Ethereum contract, binding an instance of KNWVoting to it.
  285. func DeployKNWVoting(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *KNWVoting, error) {
  286. parsed, err := abi.JSON(strings.NewReader(KNWVotingABI))
  287. if err != nil {
  288. return common.Address{}, nil, nil, err
  289. }
  290. address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(KNWVotingBin), backend)
  291. if err != nil {
  292. return common.Address{}, nil, nil, err
  293. }
  294. return address, tx, &KNWVoting{KNWVotingCaller: KNWVotingCaller{contract: contract}, KNWVotingTransactor: KNWVotingTransactor{contract: contract}, KNWVotingFilterer: KNWVotingFilterer{contract: contract}}, nil
  295. }
  296. // KNWVoting is an auto generated Go binding around an Ethereum contract.
  297. type KNWVoting struct {
  298. KNWVotingCaller // Read-only binding to the contract
  299. KNWVotingTransactor // Write-only binding to the contract
  300. KNWVotingFilterer // Log filterer for contract events
  301. }
  302. // KNWVotingCaller is an auto generated read-only Go binding around an Ethereum contract.
  303. type KNWVotingCaller struct {
  304. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  305. }
  306. // KNWVotingTransactor is an auto generated write-only Go binding around an Ethereum contract.
  307. type KNWVotingTransactor struct {
  308. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  309. }
  310. // KNWVotingFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  311. type KNWVotingFilterer struct {
  312. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  313. }
  314. // KNWVotingSession is an auto generated Go binding around an Ethereum contract,
  315. // with pre-set call and transact options.
  316. type KNWVotingSession struct {
  317. Contract *KNWVoting // Generic contract binding to set the session for
  318. CallOpts bind.CallOpts // Call options to use throughout this session
  319. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  320. }
  321. // KNWVotingCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  322. // with pre-set call options.
  323. type KNWVotingCallerSession struct {
  324. Contract *KNWVotingCaller // Generic contract caller binding to set the session for
  325. CallOpts bind.CallOpts // Call options to use throughout this session
  326. }
  327. // KNWVotingTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  328. // with pre-set transact options.
  329. type KNWVotingTransactorSession struct {
  330. Contract *KNWVotingTransactor // Generic contract transactor binding to set the session for
  331. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  332. }
  333. // KNWVotingRaw is an auto generated low-level Go binding around an Ethereum contract.
  334. type KNWVotingRaw struct {
  335. Contract *KNWVoting // Generic contract binding to access the raw methods on
  336. }
  337. // KNWVotingCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  338. type KNWVotingCallerRaw struct {
  339. Contract *KNWVotingCaller // Generic read-only contract binding to access the raw methods on
  340. }
  341. // KNWVotingTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  342. type KNWVotingTransactorRaw struct {
  343. Contract *KNWVotingTransactor // Generic write-only contract binding to access the raw methods on
  344. }
  345. // NewKNWVoting creates a new instance of KNWVoting, bound to a specific deployed contract.
  346. func NewKNWVoting(address common.Address, backend bind.ContractBackend) (*KNWVoting, error) {
  347. contract, err := bindKNWVoting(address, backend, backend, backend)
  348. if err != nil {
  349. return nil, err
  350. }
  351. return &KNWVoting{KNWVotingCaller: KNWVotingCaller{contract: contract}, KNWVotingTransactor: KNWVotingTransactor{contract: contract}, KNWVotingFilterer: KNWVotingFilterer{contract: contract}}, nil
  352. }
  353. // NewKNWVotingCaller creates a new read-only instance of KNWVoting, bound to a specific deployed contract.
  354. func NewKNWVotingCaller(address common.Address, caller bind.ContractCaller) (*KNWVotingCaller, error) {
  355. contract, err := bindKNWVoting(address, caller, nil, nil)
  356. if err != nil {
  357. return nil, err
  358. }
  359. return &KNWVotingCaller{contract: contract}, nil
  360. }
  361. // NewKNWVotingTransactor creates a new write-only instance of KNWVoting, bound to a specific deployed contract.
  362. func NewKNWVotingTransactor(address common.Address, transactor bind.ContractTransactor) (*KNWVotingTransactor, error) {
  363. contract, err := bindKNWVoting(address, nil, transactor, nil)
  364. if err != nil {
  365. return nil, err
  366. }
  367. return &KNWVotingTransactor{contract: contract}, nil
  368. }
  369. // NewKNWVotingFilterer creates a new log filterer instance of KNWVoting, bound to a specific deployed contract.
  370. func NewKNWVotingFilterer(address common.Address, filterer bind.ContractFilterer) (*KNWVotingFilterer, error) {
  371. contract, err := bindKNWVoting(address, nil, nil, filterer)
  372. if err != nil {
  373. return nil, err
  374. }
  375. return &KNWVotingFilterer{contract: contract}, nil
  376. }
  377. // bindKNWVoting binds a generic wrapper to an already deployed contract.
  378. func bindKNWVoting(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  379. parsed, err := abi.JSON(strings.NewReader(KNWVotingABI))
  380. if err != nil {
  381. return nil, err
  382. }
  383. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  384. }
  385. // Call invokes the (constant) contract method with params as input values and
  386. // sets the output to result. The result type might be a single field for simple
  387. // returns, a slice of interfaces for anonymous returns and a struct for named
  388. // returns.
  389. func (_KNWVoting *KNWVotingRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  390. return _KNWVoting.Contract.KNWVotingCaller.contract.Call(opts, result, method, params...)
  391. }
  392. // Transfer initiates a plain transaction to move funds to the contract, calling
  393. // its default method if one is available.
  394. func (_KNWVoting *KNWVotingRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  395. return _KNWVoting.Contract.KNWVotingTransactor.contract.Transfer(opts)
  396. }
  397. // Transact invokes the (paid) contract method with params as input values.
  398. func (_KNWVoting *KNWVotingRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  399. return _KNWVoting.Contract.KNWVotingTransactor.contract.Transact(opts, method, params...)
  400. }
  401. // Call invokes the (constant) contract method with params as input values and
  402. // sets the output to result. The result type might be a single field for simple
  403. // returns, a slice of interfaces for anonymous returns and a struct for named
  404. // returns.
  405. func (_KNWVoting *KNWVotingCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  406. return _KNWVoting.Contract.contract.Call(opts, result, method, params...)
  407. }
  408. // Transfer initiates a plain transaction to move funds to the contract, calling
  409. // its default method if one is available.
  410. func (_KNWVoting *KNWVotingTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  411. return _KNWVoting.Contract.contract.Transfer(opts)
  412. }
  413. // Transact invokes the (paid) contract method with params as input values.
  414. func (_KNWVoting *KNWVotingTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  415. return _KNWVoting.Contract.contract.Transact(opts, method, params...)
  416. }
  417. // INITIALPOLLNONCE is a free data retrieval call binding the contract method 0x2173a10f.
  418. //
  419. // Solidity: function INITIAL_POLL_NONCE() constant returns(uint256)
  420. func (_KNWVoting *KNWVotingCaller) INITIALPOLLNONCE(opts *bind.CallOpts) (*big.Int, error) {
  421. var (
  422. ret0 = new(*big.Int)
  423. )
  424. out := ret0
  425. err := _KNWVoting.contract.Call(opts, out, "INITIAL_POLL_NONCE")
  426. return *ret0, err
  427. }
  428. // INITIALPOLLNONCE is a free data retrieval call binding the contract method 0x2173a10f.
  429. //
  430. // Solidity: function INITIAL_POLL_NONCE() constant returns(uint256)
  431. func (_KNWVoting *KNWVotingSession) INITIALPOLLNONCE() (*big.Int, error) {
  432. return _KNWVoting.Contract.INITIALPOLLNONCE(&_KNWVoting.CallOpts)
  433. }
  434. // INITIALPOLLNONCE is a free data retrieval call binding the contract method 0x2173a10f.
  435. //
  436. // Solidity: function INITIAL_POLL_NONCE() constant returns(uint256)
  437. func (_KNWVoting *KNWVotingCallerSession) INITIALPOLLNONCE() (*big.Int, error) {
  438. return _KNWVoting.Contract.INITIALPOLLNONCE(&_KNWVoting.CallOpts)
  439. }
  440. // KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
  441. //
  442. // Solidity: function KNWTokenAddress() constant returns(address)
  443. func (_KNWVoting *KNWVotingCaller) KNWTokenAddress(opts *bind.CallOpts) (common.Address, error) {
  444. var (
  445. ret0 = new(common.Address)
  446. )
  447. out := ret0
  448. err := _KNWVoting.contract.Call(opts, out, "KNWTokenAddress")
  449. return *ret0, err
  450. }
  451. // KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
  452. //
  453. // Solidity: function KNWTokenAddress() constant returns(address)
  454. func (_KNWVoting *KNWVotingSession) KNWTokenAddress() (common.Address, error) {
  455. return _KNWVoting.Contract.KNWTokenAddress(&_KNWVoting.CallOpts)
  456. }
  457. // KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
  458. //
  459. // Solidity: function KNWTokenAddress() constant returns(address)
  460. func (_KNWVoting *KNWVotingCallerSession) KNWTokenAddress() (common.Address, error) {
  461. return _KNWVoting.Contract.KNWTokenAddress(&_KNWVoting.CallOpts)
  462. }
  463. // CommitPeriodActive is a free data retrieval call binding the contract method 0xa4439dc5.
  464. //
  465. // Solidity: function commitPeriodActive(_pollID uint256) constant returns(active bool)
  466. func (_KNWVoting *KNWVotingCaller) CommitPeriodActive(opts *bind.CallOpts, _pollID *big.Int) (bool, error) {
  467. var (
  468. ret0 = new(bool)
  469. )
  470. out := ret0
  471. err := _KNWVoting.contract.Call(opts, out, "commitPeriodActive", _pollID)
  472. return *ret0, err
  473. }
  474. // CommitPeriodActive is a free data retrieval call binding the contract method 0xa4439dc5.
  475. //
  476. // Solidity: function commitPeriodActive(_pollID uint256) constant returns(active bool)
  477. func (_KNWVoting *KNWVotingSession) CommitPeriodActive(_pollID *big.Int) (bool, error) {
  478. return _KNWVoting.Contract.CommitPeriodActive(&_KNWVoting.CallOpts, _pollID)
  479. }
  480. // CommitPeriodActive is a free data retrieval call binding the contract method 0xa4439dc5.
  481. //
  482. // Solidity: function commitPeriodActive(_pollID uint256) constant returns(active bool)
  483. func (_KNWVoting *KNWVotingCallerSession) CommitPeriodActive(_pollID *big.Int) (bool, error) {
  484. return _KNWVoting.Contract.CommitPeriodActive(&_KNWVoting.CallOpts, _pollID)
  485. }
  486. // DidCommit is a free data retrieval call binding the contract method 0x7f97e836.
  487. //
  488. // Solidity: function didCommit(_address address, _pollID uint256) constant returns(committed bool)
  489. func (_KNWVoting *KNWVotingCaller) DidCommit(opts *bind.CallOpts, _address common.Address, _pollID *big.Int) (bool, error) {
  490. var (
  491. ret0 = new(bool)
  492. )
  493. out := ret0
  494. err := _KNWVoting.contract.Call(opts, out, "didCommit", _address, _pollID)
  495. return *ret0, err
  496. }
  497. // DidCommit is a free data retrieval call binding the contract method 0x7f97e836.
  498. //
  499. // Solidity: function didCommit(_address address, _pollID uint256) constant returns(committed bool)
  500. func (_KNWVoting *KNWVotingSession) DidCommit(_address common.Address, _pollID *big.Int) (bool, error) {
  501. return _KNWVoting.Contract.DidCommit(&_KNWVoting.CallOpts, _address, _pollID)
  502. }
  503. // DidCommit is a free data retrieval call binding the contract method 0x7f97e836.
  504. //
  505. // Solidity: function didCommit(_address address, _pollID uint256) constant returns(committed bool)
  506. func (_KNWVoting *KNWVotingCallerSession) DidCommit(_address common.Address, _pollID *big.Int) (bool, error) {
  507. return _KNWVoting.Contract.DidCommit(&_KNWVoting.CallOpts, _address, _pollID)
  508. }
  509. // DidReveal is a free data retrieval call binding the contract method 0xaa7ca464.
  510. //
  511. // Solidity: function didReveal(_address address, _pollID uint256) constant returns(revealed bool)
  512. func (_KNWVoting *KNWVotingCaller) DidReveal(opts *bind.CallOpts, _address common.Address, _pollID *big.Int) (bool, error) {
  513. var (
  514. ret0 = new(bool)
  515. )
  516. out := ret0
  517. err := _KNWVoting.contract.Call(opts, out, "didReveal", _address, _pollID)
  518. return *ret0, err
  519. }
  520. // DidReveal is a free data retrieval call binding the contract method 0xaa7ca464.
  521. //
  522. // Solidity: function didReveal(_address address, _pollID uint256) constant returns(revealed bool)
  523. func (_KNWVoting *KNWVotingSession) DidReveal(_address common.Address, _pollID *big.Int) (bool, error) {
  524. return _KNWVoting.Contract.DidReveal(&_KNWVoting.CallOpts, _address, _pollID)
  525. }
  526. // DidReveal is a free data retrieval call binding the contract method 0xaa7ca464.
  527. //
  528. // Solidity: function didReveal(_address address, _pollID uint256) constant returns(revealed bool)
  529. func (_KNWVoting *KNWVotingCallerSession) DidReveal(_address common.Address, _pollID *big.Int) (bool, error) {
  530. return _KNWVoting.Contract.DidReveal(&_KNWVoting.CallOpts, _address, _pollID)
  531. }
  532. // DitCoordinatorAddress is a free data retrieval call binding the contract method 0x93b17b8e.
  533. //
  534. // Solidity: function ditCoordinatorAddress() constant returns(address)
  535. func (_KNWVoting *KNWVotingCaller) DitCoordinatorAddress(opts *bind.CallOpts) (common.Address, error) {
  536. var (
  537. ret0 = new(common.Address)
  538. )
  539. out := ret0
  540. err := _KNWVoting.contract.Call(opts, out, "ditCoordinatorAddress")
  541. return *ret0, err
  542. }
  543. // DitCoordinatorAddress is a free data retrieval call binding the contract method 0x93b17b8e.
  544. //
  545. // Solidity: function ditCoordinatorAddress() constant returns(address)
  546. func (_KNWVoting *KNWVotingSession) DitCoordinatorAddress() (common.Address, error) {
  547. return _KNWVoting.Contract.DitCoordinatorAddress(&_KNWVoting.CallOpts)
  548. }
  549. // DitCoordinatorAddress is a free data retrieval call binding the contract method 0x93b17b8e.
  550. //
  551. // Solidity: function ditCoordinatorAddress() constant returns(address)
  552. func (_KNWVoting *KNWVotingCallerSession) DitCoordinatorAddress() (common.Address, error) {
  553. return _KNWVoting.Contract.DitCoordinatorAddress(&_KNWVoting.CallOpts)
  554. }
  555. // GetGrossStake is a free data retrieval call binding the contract method 0xc3eb9708.
  556. //
  557. // Solidity: function getGrossStake(_pollID uint256) constant returns(grossStake uint256)
  558. func (_KNWVoting *KNWVotingCaller) GetGrossStake(opts *bind.CallOpts, _pollID *big.Int) (*big.Int, error) {
  559. var (
  560. ret0 = new(*big.Int)
  561. )
  562. out := ret0
  563. err := _KNWVoting.contract.Call(opts, out, "getGrossStake", _pollID)
  564. return *ret0, err
  565. }
  566. // GetGrossStake is a free data retrieval call binding the contract method 0xc3eb9708.
  567. //
  568. // Solidity: function getGrossStake(_pollID uint256) constant returns(grossStake uint256)
  569. func (_KNWVoting *KNWVotingSession) GetGrossStake(_pollID *big.Int) (*big.Int, error) {
  570. return _KNWVoting.Contract.GetGrossStake(&_KNWVoting.CallOpts, _pollID)
  571. }
  572. // GetGrossStake is a free data retrieval call binding the contract method 0xc3eb9708.
  573. //
  574. // Solidity: function getGrossStake(_pollID uint256) constant returns(grossStake uint256)
  575. func (_KNWVoting *KNWVotingCallerSession) GetGrossStake(_pollID *big.Int) (*big.Int, error) {
  576. return _KNWVoting.Contract.GetGrossStake(&_KNWVoting.CallOpts, _pollID)
  577. }
  578. // GetNetStake is a free data retrieval call binding the contract method 0xdcfde092.
  579. //
  580. // Solidity: function getNetStake(_pollID uint256) constant returns(netStake uint256)
  581. func (_KNWVoting *KNWVotingCaller) GetNetStake(opts *bind.CallOpts, _pollID *big.Int) (*big.Int, error) {
  582. var (
  583. ret0 = new(*big.Int)
  584. )
  585. out := ret0
  586. err := _KNWVoting.contract.Call(opts, out, "getNetStake", _pollID)
  587. return *ret0, err
  588. }
  589. // GetNetStake is a free data retrieval call binding the contract method 0xdcfde092.
  590. //
  591. // Solidity: function getNetStake(_pollID uint256) constant returns(netStake uint256)
  592. func (_KNWVoting *KNWVotingSession) GetNetStake(_pollID *big.Int) (*big.Int, error) {
  593. return _KNWVoting.Contract.GetNetStake(&_KNWVoting.CallOpts, _pollID)
  594. }
  595. // GetNetStake is a free data retrieval call binding the contract method 0xdcfde092.
  596. //
  597. // Solidity: function getNetStake(_pollID uint256) constant returns(netStake uint256)
  598. func (_KNWVoting *KNWVotingCallerSession) GetNetStake(_pollID *big.Int) (*big.Int, error) {
  599. return _KNWVoting.Contract.GetNetStake(&_KNWVoting.CallOpts, _pollID)
  600. }
  601. // GetNumKNW is a free data retrieval call binding the contract method 0x37071611.
  602. //
  603. // Solidity: function getNumKNW(_address address, _pollID uint256) constant returns(numKNW uint256)
  604. func (_KNWVoting *KNWVotingCaller) GetNumKNW(opts *bind.CallOpts, _address common.Address, _pollID *big.Int) (*big.Int, error) {
  605. var (
  606. ret0 = new(*big.Int)
  607. )
  608. out := ret0
  609. err := _KNWVoting.contract.Call(opts, out, "getNumKNW", _address, _pollID)
  610. return *ret0, err
  611. }
  612. // GetNumKNW is a free data retrieval call binding the contract method 0x37071611.
  613. //
  614. // Solidity: function getNumKNW(_address address, _pollID uint256) constant returns(numKNW uint256)
  615. func (_KNWVoting *KNWVotingSession) GetNumKNW(_address common.Address, _pollID *big.Int) (*big.Int, error) {
  616. return _KNWVoting.Contract.GetNumKNW(&_KNWVoting.CallOpts, _address, _pollID)
  617. }
  618. // GetNumKNW is a free data retrieval call binding the contract method 0x37071611.
  619. //
  620. // Solidity: function getNumKNW(_address address, _pollID uint256) constant returns(numKNW uint256)
  621. func (_KNWVoting *KNWVotingCallerSession) GetNumKNW(_address common.Address, _pollID *big.Int) (*big.Int, error) {
  622. return _KNWVoting.Contract.GetNumKNW(&_KNWVoting.CallOpts, _address, _pollID)
  623. }
  624. // GetNumVotes is a free data retrieval call binding the contract method 0xd8476fec.
  625. //
  626. // Solidity: function getNumVotes(_address address, _pollID uint256) constant returns(numVotes uint256)
  627. func (_KNWVoting *KNWVotingCaller) GetNumVotes(opts *bind.CallOpts, _address common.Address, _pollID *big.Int) (*big.Int, error) {
  628. var (
  629. ret0 = new(*big.Int)
  630. )
  631. out := ret0
  632. err := _KNWVoting.contract.Call(opts, out, "getNumVotes", _address, _pollID)
  633. return *ret0, err
  634. }
  635. // GetNumVotes is a free data retrieval call binding the contract method 0xd8476fec.
  636. //
  637. // Solidity: function getNumVotes(_address address, _pollID uint256) constant returns(numVotes uint256)
  638. func (_KNWVoting *KNWVotingSession) GetNumVotes(_address common.Address, _pollID *big.Int) (*big.Int, error) {
  639. return _KNWVoting.Contract.GetNumVotes(&_KNWVoting.CallOpts, _address, _pollID)
  640. }
  641. // GetNumVotes is a free data retrieval call binding the contract method 0xd8476fec.
  642. //
  643. // Solidity: function getNumVotes(_address address, _pollID uint256) constant returns(numVotes uint256)
  644. func (_KNWVoting *KNWVotingCallerSession) GetNumVotes(_address common.Address, _pollID *big.Int) (*big.Int, error) {
  645. return _KNWVoting.Contract.GetNumVotes(&_KNWVoting.CallOpts, _address, _pollID)
  646. }
  647. // IsExpired is a free data retrieval call binding the contract method 0xd9548e53.
  648. //
  649. // Solidity: function isExpired(_terminationDate uint256) constant returns(expired bool)
  650. func (_KNWVoting *KNWVotingCaller) IsExpired(opts *bind.CallOpts, _terminationDate *big.Int) (bool, error) {
  651. var (
  652. ret0 = new(bool)
  653. )
  654. out := ret0
  655. err := _KNWVoting.contract.Call(opts, out, "isExpired", _terminationDate)
  656. return *ret0, err
  657. }
  658. // IsExpired is a free data retrieval call binding the contract method 0xd9548e53.
  659. //
  660. // Solidity: function isExpired(_terminationDate uint256) constant returns(expired bool)
  661. func (_KNWVoting *KNWVotingSession) IsExpired(_terminationDate *big.Int) (bool, error) {
  662. return _KNWVoting.Contract.IsExpired(&_KNWVoting.CallOpts, _terminationDate)
  663. }
  664. // IsExpired is a free data retrieval call binding the contract method 0xd9548e53.
  665. //
  666. // Solidity: function isExpired(_terminationDate uint256) constant returns(expired bool)
  667. func (_KNWVoting *KNWVotingCallerSession) IsExpired(_terminationDate *big.Int) (bool, error) {
  668. return _KNWVoting.Contract.IsExpired(&_KNWVoting.CallOpts, _terminationDate)
  669. }
  670. // IsPassed is a free data retrieval call binding the contract method 0x49403183.
  671. //
  672. // Solidity: function isPassed(_pollID uint256) constant returns(passed bool)
  673. func (_KNWVoting *KNWVotingCaller) IsPassed(opts *bind.CallOpts, _pollID *big.Int) (bool, error) {
  674. var (
  675. ret0 = new(bool)
  676. )
  677. out := ret0
  678. err := _KNWVoting.contract.Call(opts, out, "isPassed", _pollID)
  679. return *ret0, err
  680. }
  681. // IsPassed is a free data retrieval call binding the contract method 0x49403183.
  682. //
  683. // Solidity: function isPassed(_pollID uint256) constant returns(passed bool)
  684. func (_KNWVoting *KNWVotingSession) IsPassed(_pollID *big.Int) (bool, error) {
  685. return _KNWVoting.Contract.IsPassed(&_KNWVoting.CallOpts, _pollID)
  686. }
  687. // IsPassed is a free data retrieval call binding the contract method 0x49403183.
  688. //
  689. // Solidity: function isPassed(_pollID uint256) constant returns(passed bool)
  690. func (_KNWVoting *KNWVotingCallerSession) IsPassed(_pollID *big.Int) (bool, error) {
  691. return _KNWVoting.Contract.IsPassed(&_KNWVoting.CallOpts, _pollID)
  692. }
  693. // IsResolved is a free data retrieval call binding the contract method 0xcc4e1954.
  694. //
  695. // Solidity: function isResolved(_pollID uint256) constant returns(resolved bool)
  696. func (_KNWVoting *KNWVotingCaller) IsResolved(opts *bind.CallOpts, _pollID *big.Int) (bool, error) {
  697. var (
  698. ret0 = new(bool)
  699. )
  700. out := ret0
  701. err := _KNWVoting.contract.Call(opts, out, "isResolved", _pollID)
  702. return *ret0, err
  703. }
  704. // IsResolved is a free data retrieval call binding the contract method 0xcc4e1954.
  705. //
  706. // Solidity: function isResolved(_pollID uint256) constant returns(resolved bool)
  707. func (_KNWVoting *KNWVotingSession) IsResolved(_pollID *big.Int) (bool, error) {
  708. return _KNWVoting.Contract.IsResolved(&_KNWVoting.CallOpts, _pollID)
  709. }
  710. // IsResolved is a free data retrieval call binding the contract method 0xcc4e1954.
  711. //
  712. // Solidity: function isResolved(_pollID uint256) constant returns(resolved bool)
  713. func (_KNWVoting *KNWVotingCallerSession) IsResolved(_pollID *big.Int) (bool, error) {
  714. return _KNWVoting.Contract.IsResolved(&_KNWVoting.CallOpts, _pollID)
  715. }
  716. // PollEnded is a free data retrieval call binding the contract method 0xee684830.
  717. //
  718. // Solidity: function pollEnded(_pollID uint256) constant returns(ended bool)
  719. func (_KNWVoting *KNWVotingCaller) PollEnded(opts *bind.CallOpts, _pollID *big.Int) (bool, error) {
  720. var (
  721. ret0 = new(bool)
  722. )
  723. out := ret0
  724. err := _KNWVoting.contract.Call(opts, out, "pollEnded", _pollID)
  725. return *ret0, err
  726. }
  727. // PollEnded is a free data retrieval call binding the contract method 0xee684830.
  728. //
  729. // Solidity: function pollEnded(_pollID uint256) constant returns(ended bool)
  730. func (_KNWVoting *KNWVotingSession) PollEnded(_pollID *big.Int) (bool, error) {
  731. return _KNWVoting.Contract.PollEnded(&_KNWVoting.CallOpts, _pollID)
  732. }
  733. // PollEnded is a free data retrieval call binding the contract method 0xee684830.
  734. //
  735. // Solidity: function pollEnded(_pollID uint256) constant returns(ended bool)
  736. func (_KNWVoting *KNWVotingCallerSession) PollEnded(_pollID *big.Int) (bool, error) {
  737. return _KNWVoting.Contract.PollEnded(&_KNWVoting.CallOpts, _pollID)
  738. }
  739. // PollExists is a free data retrieval call binding the contract method 0x88d21ff3.
  740. //
  741. // Solidity: function pollExists(_pollID uint256) constant returns(exists bool)
  742. func (_KNWVoting *KNWVotingCaller) PollExists(opts *bind.CallOpts, _pollID *big.Int) (bool, error) {
  743. var (
  744. ret0 = new(bool)
  745. )
  746. out := ret0
  747. err := _KNWVoting.contract.Call(opts, out, "pollExists", _pollID)
  748. return *ret0, err
  749. }
  750. // PollExists is a free data retrieval call binding the contract method 0x88d21ff3.
  751. //
  752. // Solidity: function pollExists(_pollID uint256) constant returns(exists bool)
  753. func (_KNWVoting *KNWVotingSession) PollExists(_pollID *big.Int) (bool, error) {
  754. return _KNWVoting.Contract.PollExists(&_KNWVoting.CallOpts, _pollID)
  755. }
  756. // PollExists is a free data retrieval call binding the contract method 0x88d21ff3.
  757. //
  758. // Solidity: function pollExists(_pollID uint256) constant returns(exists bool)
  759. func (_KNWVoting *KNWVotingCallerSession) PollExists(_pollID *big.Int) (bool, error) {
  760. return _KNWVoting.Contract.PollExists(&_KNWVoting.CallOpts, _pollID)
  761. }
  762. // PollMap is a free data retrieval call binding the contract method 0x6148fed5.
  763. //
  764. // Solidity: function pollMap( uint256) constant returns(repository bytes32, knowledgeLabel string, commitEndDate uint256, revealEndDate uint256, voteQuorum uint256, votesFor uint256, votesAgainst uint256, votesUnrevealed uint256, winningPercentage uint256, participantsFor uint256, participantsAgainst uint256, participantsUnrevealed uint256, isResolved bool)
  765. func (_KNWVoting *KNWVotingCaller) PollMap(opts *bind.CallOpts, arg0 *big.Int) (struct {
  766. Repository [32]byte
  767. KnowledgeLabel string
  768. CommitEndDate *big.Int
  769. RevealEndDate *big.Int
  770. VoteQuorum *big.Int
  771. VotesFor *big.Int
  772. VotesAgainst *big.Int
  773. VotesUnrevealed *big.Int
  774. WinningPercentage *big.Int
  775. ParticipantsFor *big.Int
  776. ParticipantsAgainst *big.Int
  777. ParticipantsUnrevealed *big.Int
  778. IsResolved bool
  779. }, error) {
  780. ret := new(struct {
  781. Repository [32]byte
  782. KnowledgeLabel string
  783. CommitEndDate *big.Int
  784. RevealEndDate *big.Int
  785. VoteQuorum *big.Int
  786. VotesFor *big.Int
  787. VotesAgainst *big.Int
  788. VotesUnrevealed *big.Int
  789. WinningPercentage *big.Int
  790. ParticipantsFor *big.Int
  791. ParticipantsAgainst *big.Int
  792. ParticipantsUnrevealed *big.Int
  793. IsResolved bool
  794. })
  795. out := ret
  796. err := _KNWVoting.contract.Call(opts, out, "pollMap", arg0)
  797. return *ret, err
  798. }
  799. // PollMap is a free data retrieval call binding the contract method 0x6148fed5.
  800. //
  801. // Solidity: function pollMap( uint256) constant returns(repository bytes32, knowledgeLabel string, commitEndDate uint256, revealEndDate uint256, voteQuorum uint256, votesFor uint256, votesAgainst uint256, votesUnrevealed uint256, winningPercentage uint256, participantsFor uint256, participantsAgainst uint256, participantsUnrevealed uint256, isResolved bool)
  802. func (_KNWVoting *KNWVotingSession) PollMap(arg0 *big.Int) (struct {
  803. Repository [32]byte
  804. KnowledgeLabel string
  805. CommitEndDate *big.Int
  806. RevealEndDate *big.Int
  807. VoteQuorum *big.Int
  808. VotesFor *big.Int
  809. VotesAgainst *big.Int
  810. VotesUnrevealed *big.Int
  811. WinningPercentage *big.Int
  812. ParticipantsFor *big.Int
  813. ParticipantsAgainst *big.Int
  814. ParticipantsUnrevealed *big.Int
  815. IsResolved bool
  816. }, error) {
  817. return _KNWVoting.Contract.PollMap(&_KNWVoting.CallOpts, arg0)
  818. }
  819. // PollMap is a free data retrieval call binding the contract method 0x6148fed5.
  820. //
  821. // Solidity: function pollMap( uint256) constant returns(repository bytes32, knowledgeLabel string, commitEndDate uint256, revealEndDate uint256, voteQuorum uint256, votesFor uint256, votesAgainst uint256, votesUnrevealed uint256, winningPercentage uint256, participantsFor uint256, participantsAgainst uint256, participantsUnrevealed uint256, isResolved bool)
  822. func (_KNWVoting *KNWVotingCallerSession) PollMap(arg0 *big.Int) (struct {
  823. Repository [32]byte
  824. KnowledgeLabel string
  825. CommitEndDate *big.Int
  826. RevealEndDate *big.Int
  827. VoteQuorum *big.Int
  828. VotesFor *big.Int
  829. VotesAgainst *big.Int
  830. VotesUnrevealed *big.Int
  831. WinningPercentage *big.Int
  832. ParticipantsFor *big.Int
  833. ParticipantsAgainst *big.Int
  834. ParticipantsUnrevealed *big.Int
  835. IsResolved bool
  836. }, error) {
  837. return _KNWVoting.Contract.PollMap(&_KNWVoting.CallOpts, arg0)
  838. }
  839. // PollNonce is a free data retrieval call binding the contract method 0x97508f36.
  840. //
  841. // Solidity: function pollNonce() constant returns(uint256)
  842. func (_KNWVoting *KNWVotingCaller) PollNonce(opts *bind.CallOpts) (*big.Int, error) {
  843. var (
  844. ret0 = new(*big.Int)
  845. )
  846. out := ret0
  847. err := _KNWVoting.contract.Call(opts, out, "pollNonce")
  848. return *ret0, err
  849. }
  850. // PollNonce is a free data retrieval call binding the contract method 0x97508f36.
  851. //
  852. // Solidity: function pollNonce() constant returns(uint256)
  853. func (_KNWVoting *KNWVotingSession) PollNonce() (*big.Int, error) {
  854. return _KNWVoting.Contract.PollNonce(&_KNWVoting.CallOpts)
  855. }
  856. // PollNonce is a free data retrieval call binding the contract method 0x97508f36.
  857. //
  858. // Solidity: function pollNonce() constant returns(uint256)
  859. func (_KNWVoting *KNWVotingCallerSession) PollNonce() (*big.Int, error) {
  860. return _KNWVoting.Contract.PollNonce(&_KNWVoting.CallOpts)
  861. }
  862. // RevealPeriodActive is a free data retrieval call binding the contract method 0x441c77c0.
  863. //
  864. // Solidity: function revealPeriodActive(_pollID uint256) constant returns(active bool)
  865. func (_KNWVoting *KNWVotingCaller) RevealPeriodActive(opts *bind.CallOpts, _pollID *big.Int) (bool, error) {
  866. var (
  867. ret0 = new(bool)
  868. )
  869. out := ret0
  870. err := _KNWVoting.contract.Call(opts, out, "revealPeriodActive", _pollID)
  871. return *ret0, err
  872. }
  873. // RevealPeriodActive is a free data retrieval call binding the contract method 0x441c77c0.
  874. //
  875. // Solidity: function revealPeriodActive(_pollID uint256) constant returns(active bool)
  876. func (_KNWVoting *KNWVotingSession) RevealPeriodActive(_pollID *big.Int) (bool, error) {
  877. return _KNWVoting.Contract.RevealPeriodActive(&_KNWVoting.CallOpts, _pollID)
  878. }
  879. // RevealPeriodActive is a free data retrieval call binding the contract method 0x441c77c0.
  880. //
  881. // Solidity: function revealPeriodActive(_pollID uint256) constant returns(active bool)
  882. func (_KNWVoting *KNWVotingCallerSession) RevealPeriodActive(_pollID *big.Int) (bool, error) {
  883. return _KNWVoting.Contract.RevealPeriodActive(&_KNWVoting.CallOpts, _pollID)
  884. }
  885. // StakeMap is a free data retrieval call binding the contract method 0x88a0c929.
  886. //
  887. // Solidity: function stakeMap( uint256) constant returns(proposersStake uint256, proposersReward uint256, returnPool uint256, rewardPool uint256)
  888. func (_KNWVoting *KNWVotingCaller) StakeMap(opts *bind.CallOpts, arg0 *big.Int) (struct {
  889. ProposersStake *big.Int
  890. ProposersReward *big.Int
  891. ReturnPool *big.Int
  892. RewardPool *big.Int
  893. }, error) {
  894. ret := new(struct {
  895. ProposersStake *big.Int
  896. ProposersReward *big.Int
  897. ReturnPool *big.Int
  898. RewardPool *big.Int
  899. })
  900. out := ret
  901. err := _KNWVoting.contract.Call(opts, out, "stakeMap", arg0)
  902. return *ret, err
  903. }
  904. // StakeMap is a free data retrieval call binding the contract method 0x88a0c929.
  905. //
  906. // Solidity: function stakeMap( uint256) constant returns(proposersStake uint256, proposersReward uint256, returnPool uint256, rewardPool uint256)
  907. func (_KNWVoting *KNWVotingSession) StakeMap(arg0 *big.Int) (struct {
  908. ProposersStake *big.Int
  909. ProposersReward *big.Int
  910. ReturnPool *big.Int
  911. RewardPool *big.Int
  912. }, error) {
  913. return _KNWVoting.Contract.StakeMap(&_KNWVoting.CallOpts, arg0)
  914. }
  915. // StakeMap is a free data retrieval call binding the contract method 0x88a0c929.
  916. //
  917. // Solidity: function stakeMap( uint256) constant returns(proposersStake uint256, proposersReward uint256, returnPool uint256, rewardPool uint256)
  918. func (_KNWVoting *KNWVotingCallerSession) StakeMap(arg0 *big.Int) (struct {
  919. ProposersStake *big.Int
  920. ProposersReward *big.Int
  921. ReturnPool *big.Int
  922. RewardPool *big.Int
  923. }, error) {
  924. return _KNWVoting.Contract.StakeMap(&_KNWVoting.CallOpts, arg0)
  925. }
  926. // AddNewRepository is a paid mutator transaction binding the contract method 0xa3fba060.
  927. //
  928. // Solidity: function addNewRepository(_newRepository bytes32, _majority uint256, _mintingMethod uint256, _burningMethod uint256) returns()
  929. func (_KNWVoting *KNWVotingTransactor) AddNewRepository(opts *bind.TransactOpts, _newRepository [32]byte, _majority *big.Int, _mintingMethod *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
  930. return _KNWVoting.contract.Transact(opts, "addNewRepository", _newRepository, _majority, _mintingMethod, _burningMethod)
  931. }
  932. // AddNewRepository is a paid mutator transaction binding the contract method 0xa3fba060.
  933. //
  934. // Solidity: function addNewRepository(_newRepository bytes32, _majority uint256, _mintingMethod uint256, _burningMethod uint256) returns()
  935. func (_KNWVoting *KNWVotingSession) AddNewRepository(_newRepository [32]byte, _majority *big.Int, _mintingMethod *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
  936. return _KNWVoting.Contract.AddNewRepository(&_KNWVoting.TransactOpts, _newRepository, _majority, _mintingMethod, _burningMethod)
  937. }
  938. // AddNewRepository is a paid mutator transaction binding the contract method 0xa3fba060.
  939. //
  940. // Solidity: function addNewRepository(_newRepository bytes32, _majority uint256, _mintingMethod uint256, _burningMethod uint256) returns()
  941. func (_KNWVoting *KNWVotingTransactorSession) AddNewRepository(_newRepository [32]byte, _majority *big.Int, _mintingMethod *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
  942. return _KNWVoting.Contract.AddNewRepository(&_KNWVoting.TransactOpts, _newRepository, _majority, _mintingMethod, _burningMethod)
  943. }
  944. // CommitVote is a paid mutator transaction binding the contract method 0x7eb2ff52.
  945. //
  946. // Solidity: function commitVote(_pollID uint256, _address address, _secretHash bytes32) returns(numVotes uint256)
  947. func (_KNWVoting *KNWVotingTransactor) CommitVote(opts *bind.TransactOpts, _pollID *big.Int, _address common.Address, _secretHash [32]byte) (*types.Transaction, error) {
  948. return _KNWVoting.contract.Transact(opts, "commitVote", _pollID, _address, _secretHash)
  949. }
  950. // CommitVote is a paid mutator transaction binding the contract method 0x7eb2ff52.
  951. //
  952. // Solidity: function commitVote(_pollID uint256, _address address, _secretHash bytes32) returns(numVotes uint256)
  953. func (_KNWVoting *KNWVotingSession) CommitVote(_pollID *big.Int, _address common.Address, _secretHash [32]byte) (*types.Transaction, error) {
  954. return _KNWVoting.Contract.CommitVote(&_KNWVoting.TransactOpts, _pollID, _address, _secretHash)
  955. }
  956. // CommitVote is a paid mutator transaction binding the contract method 0x7eb2ff52.
  957. //
  958. // Solidity: function commitVote(_pollID uint256, _address address, _secretHash bytes32) returns(numVotes uint256)
  959. func (_KNWVoting *KNWVotingTransactorSession) CommitVote(_pollID *big.Int, _address common.Address, _secretHash [32]byte) (*types.Transaction, error) {
  960. return _KNWVoting.Contract.CommitVote(&_KNWVoting.TransactOpts, _pollID, _address, _secretHash)
  961. }
  962. // ResolvePoll is a paid mutator transaction binding the contract method 0xe74fef37.
  963. //
  964. // Solidity: function resolvePoll(_pollID uint256) returns(votePassed bool)
  965. func (_KNWVoting *KNWVotingTransactor) ResolvePoll(opts *bind.TransactOpts, _pollID *big.Int) (*types.Transaction, error) {
  966. return _KNWVoting.contract.Transact(opts, "resolvePoll", _pollID)
  967. }
  968. // ResolvePoll is a paid mutator transaction binding the contract method 0xe74fef37.
  969. //
  970. // Solidity: function resolvePoll(_pollID uint256) returns(votePassed bool)
  971. func (_KNWVoting *KNWVotingSession) ResolvePoll(_pollID *big.Int) (*types.Transaction, error) {
  972. return _KNWVoting.Contract.ResolvePoll(&_KNWVoting.TransactOpts, _pollID)
  973. }
  974. // ResolvePoll is a paid mutator transaction binding the contract method 0xe74fef37.
  975. //
  976. // Solidity: function resolvePoll(_pollID uint256) returns(votePassed bool)
  977. func (_KNWVoting *KNWVotingTransactorSession) ResolvePoll(_pollID *big.Int) (*types.Transaction, error) {
  978. return _KNWVoting.Contract.ResolvePoll(&_KNWVoting.TransactOpts, _pollID)
  979. }
  980. // ResolveVote is a paid mutator transaction binding the contract method 0xce729fd2.
  981. //
  982. // Solidity: function resolveVote(_pollID uint256, _voteOption uint256, _address address) returns(reward uint256)
  983. func (_KNWVoting *KNWVotingTransactor) ResolveVote(opts *bind.TransactOpts, _pollID *big.Int, _voteOption *big.Int, _address common.Address) (*types.Transaction, error) {
  984. return _KNWVoting.contract.Transact(opts, "resolveVote", _pollID, _voteOption, _address)
  985. }
  986. // ResolveVote is a paid mutator transaction binding the contract method 0xce729fd2.
  987. //
  988. // Solidity: function resolveVote(_pollID uint256, _voteOption uint256, _address address) returns(reward uint256)
  989. func (_KNWVoting *KNWVotingSession) ResolveVote(_pollID *big.Int, _voteOption *big.Int, _address common.Address) (*types.Transaction, error) {
  990. return _KNWVoting.Contract.ResolveVote(&_KNWVoting.TransactOpts, _pollID, _voteOption, _address)
  991. }
  992. // ResolveVote is a paid mutator transaction binding the contract method 0xce729fd2.
  993. //
  994. // Solidity: function resolveVote(_pollID uint256, _voteOption uint256, _address address) returns(reward uint256)
  995. func (_KNWVoting *KNWVotingTransactorSession) ResolveVote(_pollID *big.Int, _voteOption *big.Int, _address common.Address) (*types.Transaction, error) {
  996. return _KNWVoting.Contract.ResolveVote(&_KNWVoting.TransactOpts, _pollID, _voteOption, _address)
  997. }
  998. // RevealVote is a paid mutator transaction binding the contract method 0x34f2f2d2.
  999. //
  1000. // Solidity: function revealVote(_pollID uint256, _address address, _voteOption uint256, _salt uint256) returns()
  1001. func (_KNWVoting *KNWVotingTransactor) RevealVote(opts *bind.TransactOpts, _pollID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
  1002. return _KNWVoting.contract.Transact(opts, "revealVote", _pollID, _address, _voteOption, _salt)
  1003. }
  1004. // RevealVote is a paid mutator transaction binding the contract method 0x34f2f2d2.
  1005. //
  1006. // Solidity: function revealVote(_pollID uint256, _address address, _voteOption uint256, _salt uint256) returns()
  1007. func (_KNWVoting *KNWVotingSession) RevealVote(_pollID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
  1008. return _KNWVoting.Contract.RevealVote(&_KNWVoting.TransactOpts, _pollID, _address, _voteOption, _salt)
  1009. }
  1010. // RevealVote is a paid mutator transaction binding the contract method 0x34f2f2d2.
  1011. //
  1012. // Solidity: function revealVote(_pollID uint256, _address address, _voteOption uint256, _salt uint256) returns()
  1013. func (_KNWVoting *KNWVotingTransactorSession) RevealVote(_pollID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
  1014. return _KNWVoting.Contract.RevealVote(&_KNWVoting.TransactOpts, _pollID, _address, _voteOption, _salt)
  1015. }
  1016. // SetCoordinatorAddress is a paid mutator transaction binding the contract method 0xf354b838.
  1017. //
  1018. // Solidity: function setCoordinatorAddress(_newCoordinatorAddress address) returns()
  1019. func (_KNWVoting *KNWVotingTransactor) SetCoordinatorAddress(opts *bind.TransactOpts, _newCoordinatorAddress common.Address) (*types.Transaction, error) {
  1020. return _KNWVoting.contract.Transact(opts, "setCoordinatorAddress", _newCoordinatorAddress)
  1021. }
  1022. // SetCoordinatorAddress is a paid mutator transaction binding the contract method 0xf354b838.
  1023. //
  1024. // Solidity: function setCoordinatorAddress(_newCoordinatorAddress address) returns()
  1025. func (_KNWVoting *KNWVotingSession) SetCoordinatorAddress(_newCoordinatorAddress common.Address) (*types.Transaction, error) {
  1026. return _KNWVoting.Contract.SetCoordinatorAddress(&_KNWVoting.TransactOpts, _newCoordinatorAddress)
  1027. }
  1028. // SetCoordinatorAddress is a paid mutator transaction binding the contract method 0xf354b838.
  1029. //
  1030. // Solidity: function setCoordinatorAddress(_newCoordinatorAddress address) returns()
  1031. func (_KNWVoting *KNWVotingTransactorSession) SetCoordinatorAddress(_newCoordinatorAddress common.Address) (*types.Transaction, error) {
  1032. return _KNWVoting.Contract.SetCoordinatorAddress(&_KNWVoting.TransactOpts, _newCoordinatorAddress)
  1033. }
  1034. // SetTokenAddress is a paid mutator transaction binding the contract method 0x26a4e8d2.
  1035. //
  1036. // Solidity: function setTokenAddress(_newKNWTokenAddress address) returns()
  1037. func (_KNWVoting *KNWVotingTransactor) SetTokenAddress(opts *bind.TransactOpts, _newKNWTokenAddress common.Address) (*types.Transaction, error) {
  1038. return _KNWVoting.contract.Transact(opts, "setTokenAddress", _newKNWTokenAddress)
  1039. }
  1040. // SetTokenAddress is a paid mutator transaction binding the contract method 0x26a4e8d2.
  1041. //
  1042. // Solidity: function setTokenAddress(_newKNWTokenAddress address) returns()
  1043. func (_KNWVoting *KNWVotingSession) SetTokenAddress(_newKNWTokenAddress common.Address) (*types.Transaction, error) {
  1044. return _KNWVoting.Contract.SetTokenAddress(&_KNWVoting.TransactOpts, _newKNWTokenAddress)
  1045. }
  1046. // SetTokenAddress is a paid mutator transaction binding the contract method 0x26a4e8d2.
  1047. //
  1048. // Solidity: function setTokenAddress(_newKNWTokenAddress address) returns()
  1049. func (_KNWVoting *KNWVotingTransactorSession) SetTokenAddress(_newKNWTokenAddress common.Address) (*types.Transaction, error) {
  1050. return _KNWVoting.Contract.SetTokenAddress(&_KNWVoting.TransactOpts, _newKNWTokenAddress)
  1051. }
  1052. // StartPoll is a paid mutator transaction binding the contract method 0x9156cd07.
  1053. //
  1054. // Solidity: function startPoll(_repository bytes32, _address address, _knowledgeLabel string, _commitDuration uint256, _revealDuration uint256, _proposersStake uint256) returns(pollID uint256)
  1055. func (_KNWVoting *KNWVotingTransactor) StartPoll(opts *bind.TransactOpts, _repository [32]byte, _address common.Address, _knowledgeLabel string, _commitDuration *big.Int, _revealDuration *big.Int, _proposersStake *big.Int) (*types.Transaction, error) {
  1056. return _KNWVoting.contract.Transact(opts, "startPoll", _repository, _address, _knowledgeLabel, _commitDuration, _revealDuration, _proposersStake)
  1057. }
  1058. // StartPoll is a paid mutator transaction binding the contract method 0x9156cd07.
  1059. //
  1060. // Solidity: function startPoll(_repository bytes32, _address address, _knowledgeLabel string, _commitDuration uint256, _revealDuration uint256, _proposersStake uint256) returns(pollID uint256)
  1061. func (_KNWVoting *KNWVotingSession) StartPoll(_repository [32]byte, _address common.Address, _knowledgeLabel string, _commitDuration *big.Int, _revealDuration *big.Int, _proposersStake *big.Int) (*types.Transaction, error) {
  1062. return _KNWVoting.Contract.StartPoll(&_KNWVoting.TransactOpts, _repository, _address, _knowledgeLabel, _commitDuration, _revealDuration, _proposersStake)
  1063. }
  1064. // StartPoll is a paid mutator transaction binding the contract method 0x9156cd07.
  1065. //
  1066. // Solidity: function startPoll(_repository bytes32, _address address, _knowledgeLabel string, _commitDuration uint256, _revealDuration uint256, _proposersStake uint256) returns(pollID uint256)
  1067. func (_KNWVoting *KNWVotingTransactorSession) StartPoll(_repository [32]byte, _address common.Address, _knowledgeLabel string, _commitDuration *big.Int, _revealDuration *big.Int, _proposersStake *big.Int) (*types.Transaction, error) {
  1068. return _KNWVoting.Contract.StartPoll(&_KNWVoting.TransactOpts, _repository, _address, _knowledgeLabel, _commitDuration, _revealDuration, _proposersStake)
  1069. }
  1070. // SafeMathABI is the input ABI used to generate the binding from.
  1071. const SafeMathABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"a\",\"type\":\"uint256\"}],\"name\":\"sqrt\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]"
  1072. // SafeMathBin is the compiled bytecode used for deploying new contracts.
  1073. const SafeMathBin = `0x61016b610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106100575763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663677342ce811461005c575b600080fd5b610067600435610079565b60408051918252519081900360200190f35b6000808083151561008d5760009250610138565b6001840184106100fe57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f466c6177656420696e70757420666f7220737172740000000000000000000000604482015290519081900360640190fd5b505060026001830104825b80821015610134575080600281808681151561012157fe5b040181151561012c57fe5b049150610109565b8192505b50509190505600a165627a7a72305820ce9eba5c2c770e6489e8634ca0a14db23dee696aa56e1247aac6317c7eab01bd0029`
  1074. // DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it.
  1075. func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) {
  1076. parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
  1077. if err != nil {
  1078. return common.Address{}, nil, nil, err
  1079. }
  1080. address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend)
  1081. if err != nil {
  1082. return common.Address{}, nil, nil, err
  1083. }
  1084. return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
  1085. }
  1086. // SafeMath is an auto generated Go binding around an Ethereum contract.
  1087. type SafeMath struct {
  1088. SafeMathCaller // Read-only binding to the contract
  1089. SafeMathTransactor // Write-only binding to the contract
  1090. SafeMathFilterer // Log filterer for contract events
  1091. }
  1092. // SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract.
  1093. type SafeMathCaller struct {
  1094. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  1095. }
  1096. // SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract.
  1097. type SafeMathTransactor struct {
  1098. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  1099. }
  1100. // SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  1101. type SafeMathFilterer struct {
  1102. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  1103. }
  1104. // SafeMathSession is an auto generated Go binding around an Ethereum contract,
  1105. // with pre-set call and transact options.
  1106. type SafeMathSession struct {
  1107. Contract *SafeMath // Generic contract binding to set the session for
  1108. CallOpts bind.CallOpts // Call options to use throughout this session
  1109. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  1110. }
  1111. // SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  1112. // with pre-set call options.
  1113. type SafeMathCallerSession struct {
  1114. Contract *SafeMathCaller // Generic contract caller binding to set the session for
  1115. CallOpts bind.CallOpts // Call options to use throughout this session
  1116. }
  1117. // SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  1118. // with pre-set transact options.
  1119. type SafeMathTransactorSession struct {
  1120. Contract *SafeMathTransactor // Generic contract transactor binding to set the session for
  1121. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  1122. }
  1123. // SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract.
  1124. type SafeMathRaw struct {
  1125. Contract *SafeMath // Generic contract binding to access the raw methods on
  1126. }
  1127. // SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  1128. type SafeMathCallerRaw struct {
  1129. Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on
  1130. }
  1131. // SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  1132. type SafeMathTransactorRaw struct {
  1133. Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on
  1134. }
  1135. // NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract.
  1136. func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) {
  1137. contract, err := bindSafeMath(address, backend, backend, backend)
  1138. if err != nil {
  1139. return nil, err
  1140. }
  1141. return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
  1142. }
  1143. // NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract.
  1144. func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) {
  1145. contract, err := bindSafeMath(address, caller, nil, nil)
  1146. if err != nil {
  1147. return nil, err
  1148. }
  1149. return &SafeMathCaller{contract: contract}, nil
  1150. }
  1151. // NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract.
  1152. func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) {
  1153. contract, err := bindSafeMath(address, nil, transactor, nil)
  1154. if err != nil {
  1155. return nil, err
  1156. }
  1157. return &SafeMathTransactor{contract: contract}, nil
  1158. }
  1159. // NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract.
  1160. func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) {
  1161. contract, err := bindSafeMath(address, nil, nil, filterer)
  1162. if err != nil {
  1163. return nil, err
  1164. }
  1165. return &SafeMathFilterer{contract: contract}, nil
  1166. }
  1167. // bindSafeMath binds a generic wrapper to an already deployed contract.
  1168. func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  1169. parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
  1170. if err != nil {
  1171. return nil, err
  1172. }
  1173. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  1174. }
  1175. // Call invokes the (constant) contract method with params as input values and
  1176. // sets the output to result. The result type might be a single field for simple
  1177. // returns, a slice of interfaces for anonymous returns and a struct for named
  1178. // returns.
  1179. func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  1180. return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...)
  1181. }
  1182. // Transfer initiates a plain transaction to move funds to the contract, calling
  1183. // its default method if one is available.
  1184. func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  1185. return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts)
  1186. }
  1187. // Transact invokes the (paid) contract method with params as input values.
  1188. func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  1189. return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...)
  1190. }
  1191. // Call invokes the (constant) contract method with params as input values and
  1192. // sets the output to result. The result type might be a single field for simple
  1193. // returns, a slice of interfaces for anonymous returns and a struct for named
  1194. // returns.
  1195. func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
  1196. return _SafeMath.Contract.contract.Call(opts, result, method, params...)
  1197. }
  1198. // Transfer initiates a plain transaction to move funds to the contract, calling
  1199. // its default method if one is available.
  1200. func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  1201. return _SafeMath.Contract.contract.Transfer(opts)
  1202. }
  1203. // Transact invokes the (paid) contract method with params as input values.
  1204. func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  1205. return _SafeMath.Contract.contract.Transact(opts, method, params...)
  1206. }
  1207. // Sqrt is a free data retrieval call binding the contract method 0x677342ce.
  1208. //
  1209. // Solidity: function sqrt(a uint256) constant returns(uint256)
  1210. func (_SafeMath *SafeMathCaller) Sqrt(opts *bind.CallOpts, a *big.Int) (*big.Int, error) {
  1211. var (
  1212. ret0 = new(*big.Int)
  1213. )
  1214. out := ret0
  1215. err := _SafeMath.contract.Call(opts, out, "sqrt", a)
  1216. return *ret0, err
  1217. }
  1218. // Sqrt is a free data retrieval call binding the contract method 0x677342ce.
  1219. //
  1220. // Solidity: function sqrt(a uint256) constant returns(uint256)
  1221. func (_SafeMath *SafeMathSession) Sqrt(a *big.Int) (*big.Int, error) {
  1222. return _SafeMath.Contract.Sqrt(&_SafeMath.CallOpts, a)
  1223. }
  1224. // Sqrt is a free data retrieval call binding the contract method 0x677342ce.
  1225. //
  1226. // Solidity: function sqrt(a uint256) constant returns(uint256)
  1227. func (_SafeMath *SafeMathCallerSession) Sqrt(a *big.Int) (*big.Int, error) {
  1228. return _SafeMath.Contract.Sqrt(&_SafeMath.CallOpts, a)
  1229. }