1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287 |
- // Code generated - DO NOT EDIT.
- // This file is a generated binding and any manual changes will be lost.
- package ditDemoCoordinator
- import (
- "math/big"
- "strings"
- ethereum "github.com/ethereum/go-ethereum"
- "github.com/ethereum/go-ethereum/accounts/abi"
- "github.com/ethereum/go-ethereum/accounts/abi/bind"
- "github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/event"
- )
- // Reference imports to suppress errors if they are not otherwise used.
- var (
- _ = big.NewInt
- _ = strings.NewReader
- _ = ethereum.NotFound
- _ = abi.U256
- _ = bind.Bind
- _ = common.Big1
- _ = types.BloomLookup
- _ = event.NewSubscription
- )
- // ERC20ABI is the input ABI used to generate the binding from.
- const ERC20ABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
- // ERC20Bin is the compiled bytecode used for deploying new contracts.
- const ERC20Bin = `0x`
- // DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it.
- func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) {
- parsed, err := abi.JSON(strings.NewReader(ERC20ABI))
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend)
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil
- }
- // ERC20 is an auto generated Go binding around an Ethereum contract.
- type ERC20 struct {
- ERC20Caller // Read-only binding to the contract
- ERC20Transactor // Write-only binding to the contract
- ERC20Filterer // Log filterer for contract events
- }
- // ERC20Caller is an auto generated read-only Go binding around an Ethereum contract.
- type ERC20Caller struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract.
- type ERC20Transactor struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
- type ERC20Filterer struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // ERC20Session is an auto generated Go binding around an Ethereum contract,
- // with pre-set call and transact options.
- type ERC20Session struct {
- Contract *ERC20 // Generic contract binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract,
- // with pre-set call options.
- type ERC20CallerSession struct {
- Contract *ERC20Caller // Generic contract caller binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- }
- // ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
- // with pre-set transact options.
- type ERC20TransactorSession struct {
- Contract *ERC20Transactor // Generic contract transactor binding to set the session for
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // ERC20Raw is an auto generated low-level Go binding around an Ethereum contract.
- type ERC20Raw struct {
- Contract *ERC20 // Generic contract binding to access the raw methods on
- }
- // ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
- type ERC20CallerRaw struct {
- Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on
- }
- // ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
- type ERC20TransactorRaw struct {
- Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on
- }
- // NewERC20 creates a new instance of ERC20, bound to a specific deployed contract.
- func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) {
- contract, err := bindERC20(address, backend, backend, backend)
- if err != nil {
- return nil, err
- }
- return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil
- }
- // NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract.
- func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) {
- contract, err := bindERC20(address, caller, nil, nil)
- if err != nil {
- return nil, err
- }
- return &ERC20Caller{contract: contract}, nil
- }
- // NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract.
- func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) {
- contract, err := bindERC20(address, nil, transactor, nil)
- if err != nil {
- return nil, err
- }
- return &ERC20Transactor{contract: contract}, nil
- }
- // NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract.
- func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) {
- contract, err := bindERC20(address, nil, nil, filterer)
- if err != nil {
- return nil, err
- }
- return &ERC20Filterer{contract: contract}, nil
- }
- // bindERC20 binds a generic wrapper to an already deployed contract.
- func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
- parsed, err := abi.JSON(strings.NewReader(ERC20ABI))
- if err != nil {
- return nil, err
- }
- return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
- return _ERC20.Contract.ERC20Caller.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _ERC20.Contract.ERC20Transactor.contract.Transact(opts, method, params...)
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
- return _ERC20.Contract.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _ERC20.Contract.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _ERC20.Contract.contract.Transact(opts, method, params...)
- }
- // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
- //
- // Solidity: function transfer(address _to, uint256 _value) returns(bool)
- func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) {
- return _ERC20.contract.Transact(opts, "transfer", _to, _value)
- }
- // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
- //
- // Solidity: function transfer(address _to, uint256 _value) returns(bool)
- func (_ERC20 *ERC20Session) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) {
- return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, _to, _value)
- }
- // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
- //
- // Solidity: function transfer(address _to, uint256 _value) returns(bool)
- func (_ERC20 *ERC20TransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) {
- return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, _to, _value)
- }
- // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
- //
- // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool)
- func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) {
- return _ERC20.contract.Transact(opts, "transferFrom", _from, _to, _value)
- }
- // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
- //
- // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool)
- func (_ERC20 *ERC20Session) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) {
- return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, _from, _to, _value)
- }
- // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
- //
- // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool)
- func (_ERC20 *ERC20TransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) {
- return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, _from, _to, _value)
- }
- // KNWTokenContractABI is the input ABI used to generate the binding from.
- const KNWTokenContractABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_newVotingAddress\",\"type\":\"address\"}],\"name\":\"setVotingAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
- // KNWTokenContractBin is the compiled bytecode used for deploying new contracts.
- const KNWTokenContractBin = `0x`
- // DeployKNWTokenContract deploys a new Ethereum contract, binding an instance of KNWTokenContract to it.
- func DeployKNWTokenContract(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *KNWTokenContract, error) {
- parsed, err := abi.JSON(strings.NewReader(KNWTokenContractABI))
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(KNWTokenContractBin), backend)
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- return address, tx, &KNWTokenContract{KNWTokenContractCaller: KNWTokenContractCaller{contract: contract}, KNWTokenContractTransactor: KNWTokenContractTransactor{contract: contract}, KNWTokenContractFilterer: KNWTokenContractFilterer{contract: contract}}, nil
- }
- // KNWTokenContract is an auto generated Go binding around an Ethereum contract.
- type KNWTokenContract struct {
- KNWTokenContractCaller // Read-only binding to the contract
- KNWTokenContractTransactor // Write-only binding to the contract
- KNWTokenContractFilterer // Log filterer for contract events
- }
- // KNWTokenContractCaller is an auto generated read-only Go binding around an Ethereum contract.
- type KNWTokenContractCaller struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // KNWTokenContractTransactor is an auto generated write-only Go binding around an Ethereum contract.
- type KNWTokenContractTransactor struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // KNWTokenContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
- type KNWTokenContractFilterer struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // KNWTokenContractSession is an auto generated Go binding around an Ethereum contract,
- // with pre-set call and transact options.
- type KNWTokenContractSession struct {
- Contract *KNWTokenContract // Generic contract binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // KNWTokenContractCallerSession is an auto generated read-only Go binding around an Ethereum contract,
- // with pre-set call options.
- type KNWTokenContractCallerSession struct {
- Contract *KNWTokenContractCaller // Generic contract caller binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- }
- // KNWTokenContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
- // with pre-set transact options.
- type KNWTokenContractTransactorSession struct {
- Contract *KNWTokenContractTransactor // Generic contract transactor binding to set the session for
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // KNWTokenContractRaw is an auto generated low-level Go binding around an Ethereum contract.
- type KNWTokenContractRaw struct {
- Contract *KNWTokenContract // Generic contract binding to access the raw methods on
- }
- // KNWTokenContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
- type KNWTokenContractCallerRaw struct {
- Contract *KNWTokenContractCaller // Generic read-only contract binding to access the raw methods on
- }
- // KNWTokenContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
- type KNWTokenContractTransactorRaw struct {
- Contract *KNWTokenContractTransactor // Generic write-only contract binding to access the raw methods on
- }
- // NewKNWTokenContract creates a new instance of KNWTokenContract, bound to a specific deployed contract.
- func NewKNWTokenContract(address common.Address, backend bind.ContractBackend) (*KNWTokenContract, error) {
- contract, err := bindKNWTokenContract(address, backend, backend, backend)
- if err != nil {
- return nil, err
- }
- return &KNWTokenContract{KNWTokenContractCaller: KNWTokenContractCaller{contract: contract}, KNWTokenContractTransactor: KNWTokenContractTransactor{contract: contract}, KNWTokenContractFilterer: KNWTokenContractFilterer{contract: contract}}, nil
- }
- // NewKNWTokenContractCaller creates a new read-only instance of KNWTokenContract, bound to a specific deployed contract.
- func NewKNWTokenContractCaller(address common.Address, caller bind.ContractCaller) (*KNWTokenContractCaller, error) {
- contract, err := bindKNWTokenContract(address, caller, nil, nil)
- if err != nil {
- return nil, err
- }
- return &KNWTokenContractCaller{contract: contract}, nil
- }
- // NewKNWTokenContractTransactor creates a new write-only instance of KNWTokenContract, bound to a specific deployed contract.
- func NewKNWTokenContractTransactor(address common.Address, transactor bind.ContractTransactor) (*KNWTokenContractTransactor, error) {
- contract, err := bindKNWTokenContract(address, nil, transactor, nil)
- if err != nil {
- return nil, err
- }
- return &KNWTokenContractTransactor{contract: contract}, nil
- }
- // NewKNWTokenContractFilterer creates a new log filterer instance of KNWTokenContract, bound to a specific deployed contract.
- func NewKNWTokenContractFilterer(address common.Address, filterer bind.ContractFilterer) (*KNWTokenContractFilterer, error) {
- contract, err := bindKNWTokenContract(address, nil, nil, filterer)
- if err != nil {
- return nil, err
- }
- return &KNWTokenContractFilterer{contract: contract}, nil
- }
- // bindKNWTokenContract binds a generic wrapper to an already deployed contract.
- func bindKNWTokenContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
- parsed, err := abi.JSON(strings.NewReader(KNWTokenContractABI))
- if err != nil {
- return nil, err
- }
- return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_KNWTokenContract *KNWTokenContractRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
- return _KNWTokenContract.Contract.KNWTokenContractCaller.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_KNWTokenContract *KNWTokenContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _KNWTokenContract.Contract.KNWTokenContractTransactor.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_KNWTokenContract *KNWTokenContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _KNWTokenContract.Contract.KNWTokenContractTransactor.contract.Transact(opts, method, params...)
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_KNWTokenContract *KNWTokenContractCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
- return _KNWTokenContract.Contract.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_KNWTokenContract *KNWTokenContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _KNWTokenContract.Contract.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_KNWTokenContract *KNWTokenContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _KNWTokenContract.Contract.contract.Transact(opts, method, params...)
- }
- // SetVotingAddress is a paid mutator transaction binding the contract method 0x7a6cfcab.
- //
- // Solidity: function setVotingAddress(address _newVotingAddress) returns()
- func (_KNWTokenContract *KNWTokenContractTransactor) SetVotingAddress(opts *bind.TransactOpts, _newVotingAddress common.Address) (*types.Transaction, error) {
- return _KNWTokenContract.contract.Transact(opts, "setVotingAddress", _newVotingAddress)
- }
- // SetVotingAddress is a paid mutator transaction binding the contract method 0x7a6cfcab.
- //
- // Solidity: function setVotingAddress(address _newVotingAddress) returns()
- func (_KNWTokenContract *KNWTokenContractSession) SetVotingAddress(_newVotingAddress common.Address) (*types.Transaction, error) {
- return _KNWTokenContract.Contract.SetVotingAddress(&_KNWTokenContract.TransactOpts, _newVotingAddress)
- }
- // SetVotingAddress is a paid mutator transaction binding the contract method 0x7a6cfcab.
- //
- // Solidity: function setVotingAddress(address _newVotingAddress) returns()
- func (_KNWTokenContract *KNWTokenContractTransactorSession) SetVotingAddress(_newVotingAddress common.Address) (*types.Transaction, error) {
- return _KNWTokenContract.Contract.SetVotingAddress(&_KNWTokenContract.TransactOpts, _newVotingAddress)
- }
- // KNWVotingContractABI is the input ABI used to generate the binding from.
- const KNWVotingContractABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_newKNWTokenAddress\",\"type\":\"address\"}],\"name\":\"setTokenAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"},{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_voteOption\",\"type\":\"uint256\"},{\"name\":\"_salt\",\"type\":\"uint256\"}],\"name\":\"revealVote\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"},{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_secretHash\",\"type\":\"bytes32\"}],\"name\":\"commitVote\",\"outputs\":[{\"name\":\"numVotes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_address\",\"type\":\"address\"},{\"name\":\"_knowledgeLabel\",\"type\":\"string\"},{\"name\":\"_commitDuration\",\"type\":\"uint256\"},{\"name\":\"_revealDuration\",\"type\":\"uint256\"},{\"name\":\"_proposersStake\",\"type\":\"uint256\"}],\"name\":\"startPoll\",\"outputs\":[{\"name\":\"pollID\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newRepository\",\"type\":\"bytes32\"},{\"name\":\"_majority\",\"type\":\"uint256\"},{\"name\":\"_mintingMethod\",\"type\":\"uint256\"},{\"name\":\"_burningMethod\",\"type\":\"uint256\"}],\"name\":\"addNewRepository\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"},{\"name\":\"_voteOption\",\"type\":\"uint256\"},{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"resolveVote\",\"outputs\":[{\"name\":\"reward\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_pollID\",\"type\":\"uint256\"}],\"name\":\"resolvePoll\",\"outputs\":[{\"name\":\"votePassed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newCoordinatorAddress\",\"type\":\"address\"}],\"name\":\"setCoordinatorAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
- // KNWVotingContractBin is the compiled bytecode used for deploying new contracts.
- const KNWVotingContractBin = `0x`
- // DeployKNWVotingContract deploys a new Ethereum contract, binding an instance of KNWVotingContract to it.
- func DeployKNWVotingContract(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *KNWVotingContract, error) {
- parsed, err := abi.JSON(strings.NewReader(KNWVotingContractABI))
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(KNWVotingContractBin), backend)
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- return address, tx, &KNWVotingContract{KNWVotingContractCaller: KNWVotingContractCaller{contract: contract}, KNWVotingContractTransactor: KNWVotingContractTransactor{contract: contract}, KNWVotingContractFilterer: KNWVotingContractFilterer{contract: contract}}, nil
- }
- // KNWVotingContract is an auto generated Go binding around an Ethereum contract.
- type KNWVotingContract struct {
- KNWVotingContractCaller // Read-only binding to the contract
- KNWVotingContractTransactor // Write-only binding to the contract
- KNWVotingContractFilterer // Log filterer for contract events
- }
- // KNWVotingContractCaller is an auto generated read-only Go binding around an Ethereum contract.
- type KNWVotingContractCaller struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // KNWVotingContractTransactor is an auto generated write-only Go binding around an Ethereum contract.
- type KNWVotingContractTransactor struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // KNWVotingContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
- type KNWVotingContractFilterer struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // KNWVotingContractSession is an auto generated Go binding around an Ethereum contract,
- // with pre-set call and transact options.
- type KNWVotingContractSession struct {
- Contract *KNWVotingContract // Generic contract binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // KNWVotingContractCallerSession is an auto generated read-only Go binding around an Ethereum contract,
- // with pre-set call options.
- type KNWVotingContractCallerSession struct {
- Contract *KNWVotingContractCaller // Generic contract caller binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- }
- // KNWVotingContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
- // with pre-set transact options.
- type KNWVotingContractTransactorSession struct {
- Contract *KNWVotingContractTransactor // Generic contract transactor binding to set the session for
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // KNWVotingContractRaw is an auto generated low-level Go binding around an Ethereum contract.
- type KNWVotingContractRaw struct {
- Contract *KNWVotingContract // Generic contract binding to access the raw methods on
- }
- // KNWVotingContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
- type KNWVotingContractCallerRaw struct {
- Contract *KNWVotingContractCaller // Generic read-only contract binding to access the raw methods on
- }
- // KNWVotingContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
- type KNWVotingContractTransactorRaw struct {
- Contract *KNWVotingContractTransactor // Generic write-only contract binding to access the raw methods on
- }
- // NewKNWVotingContract creates a new instance of KNWVotingContract, bound to a specific deployed contract.
- func NewKNWVotingContract(address common.Address, backend bind.ContractBackend) (*KNWVotingContract, error) {
- contract, err := bindKNWVotingContract(address, backend, backend, backend)
- if err != nil {
- return nil, err
- }
- return &KNWVotingContract{KNWVotingContractCaller: KNWVotingContractCaller{contract: contract}, KNWVotingContractTransactor: KNWVotingContractTransactor{contract: contract}, KNWVotingContractFilterer: KNWVotingContractFilterer{contract: contract}}, nil
- }
- // NewKNWVotingContractCaller creates a new read-only instance of KNWVotingContract, bound to a specific deployed contract.
- func NewKNWVotingContractCaller(address common.Address, caller bind.ContractCaller) (*KNWVotingContractCaller, error) {
- contract, err := bindKNWVotingContract(address, caller, nil, nil)
- if err != nil {
- return nil, err
- }
- return &KNWVotingContractCaller{contract: contract}, nil
- }
- // NewKNWVotingContractTransactor creates a new write-only instance of KNWVotingContract, bound to a specific deployed contract.
- func NewKNWVotingContractTransactor(address common.Address, transactor bind.ContractTransactor) (*KNWVotingContractTransactor, error) {
- contract, err := bindKNWVotingContract(address, nil, transactor, nil)
- if err != nil {
- return nil, err
- }
- return &KNWVotingContractTransactor{contract: contract}, nil
- }
- // NewKNWVotingContractFilterer creates a new log filterer instance of KNWVotingContract, bound to a specific deployed contract.
- func NewKNWVotingContractFilterer(address common.Address, filterer bind.ContractFilterer) (*KNWVotingContractFilterer, error) {
- contract, err := bindKNWVotingContract(address, nil, nil, filterer)
- if err != nil {
- return nil, err
- }
- return &KNWVotingContractFilterer{contract: contract}, nil
- }
- // bindKNWVotingContract binds a generic wrapper to an already deployed contract.
- func bindKNWVotingContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
- parsed, err := abi.JSON(strings.NewReader(KNWVotingContractABI))
- if err != nil {
- return nil, err
- }
- return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_KNWVotingContract *KNWVotingContractRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
- return _KNWVotingContract.Contract.KNWVotingContractCaller.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_KNWVotingContract *KNWVotingContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.KNWVotingContractTransactor.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_KNWVotingContract *KNWVotingContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.KNWVotingContractTransactor.contract.Transact(opts, method, params...)
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_KNWVotingContract *KNWVotingContractCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
- return _KNWVotingContract.Contract.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_KNWVotingContract *KNWVotingContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_KNWVotingContract *KNWVotingContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.contract.Transact(opts, method, params...)
- }
- // ResolveVote is a free data retrieval call binding the contract method 0xce729fd2.
- //
- // Solidity: function resolveVote(uint256 _pollID, uint256 _voteOption, address _address) constant returns(uint256 reward)
- func (_KNWVotingContract *KNWVotingContractCaller) ResolveVote(opts *bind.CallOpts, _pollID *big.Int, _voteOption *big.Int, _address common.Address) (*big.Int, error) {
- var (
- ret0 = new(*big.Int)
- )
- out := ret0
- err := _KNWVotingContract.contract.Call(opts, out, "resolveVote", _pollID, _voteOption, _address)
- return *ret0, err
- }
- // ResolveVote is a free data retrieval call binding the contract method 0xce729fd2.
- //
- // Solidity: function resolveVote(uint256 _pollID, uint256 _voteOption, address _address) constant returns(uint256 reward)
- func (_KNWVotingContract *KNWVotingContractSession) ResolveVote(_pollID *big.Int, _voteOption *big.Int, _address common.Address) (*big.Int, error) {
- return _KNWVotingContract.Contract.ResolveVote(&_KNWVotingContract.CallOpts, _pollID, _voteOption, _address)
- }
- // ResolveVote is a free data retrieval call binding the contract method 0xce729fd2.
- //
- // Solidity: function resolveVote(uint256 _pollID, uint256 _voteOption, address _address) constant returns(uint256 reward)
- func (_KNWVotingContract *KNWVotingContractCallerSession) ResolveVote(_pollID *big.Int, _voteOption *big.Int, _address common.Address) (*big.Int, error) {
- return _KNWVotingContract.Contract.ResolveVote(&_KNWVotingContract.CallOpts, _pollID, _voteOption, _address)
- }
- // AddNewRepository is a paid mutator transaction binding the contract method 0xa3fba060.
- //
- // Solidity: function addNewRepository(bytes32 _newRepository, uint256 _majority, uint256 _mintingMethod, uint256 _burningMethod) returns()
- func (_KNWVotingContract *KNWVotingContractTransactor) AddNewRepository(opts *bind.TransactOpts, _newRepository [32]byte, _majority *big.Int, _mintingMethod *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.contract.Transact(opts, "addNewRepository", _newRepository, _majority, _mintingMethod, _burningMethod)
- }
- // AddNewRepository is a paid mutator transaction binding the contract method 0xa3fba060.
- //
- // Solidity: function addNewRepository(bytes32 _newRepository, uint256 _majority, uint256 _mintingMethod, uint256 _burningMethod) returns()
- func (_KNWVotingContract *KNWVotingContractSession) AddNewRepository(_newRepository [32]byte, _majority *big.Int, _mintingMethod *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.AddNewRepository(&_KNWVotingContract.TransactOpts, _newRepository, _majority, _mintingMethod, _burningMethod)
- }
- // AddNewRepository is a paid mutator transaction binding the contract method 0xa3fba060.
- //
- // Solidity: function addNewRepository(bytes32 _newRepository, uint256 _majority, uint256 _mintingMethod, uint256 _burningMethod) returns()
- func (_KNWVotingContract *KNWVotingContractTransactorSession) AddNewRepository(_newRepository [32]byte, _majority *big.Int, _mintingMethod *big.Int, _burningMethod *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.AddNewRepository(&_KNWVotingContract.TransactOpts, _newRepository, _majority, _mintingMethod, _burningMethod)
- }
- // CommitVote is a paid mutator transaction binding the contract method 0x7eb2ff52.
- //
- // Solidity: function commitVote(uint256 _pollID, address _address, bytes32 _secretHash) returns(uint256 numVotes)
- func (_KNWVotingContract *KNWVotingContractTransactor) CommitVote(opts *bind.TransactOpts, _pollID *big.Int, _address common.Address, _secretHash [32]byte) (*types.Transaction, error) {
- return _KNWVotingContract.contract.Transact(opts, "commitVote", _pollID, _address, _secretHash)
- }
- // CommitVote is a paid mutator transaction binding the contract method 0x7eb2ff52.
- //
- // Solidity: function commitVote(uint256 _pollID, address _address, bytes32 _secretHash) returns(uint256 numVotes)
- func (_KNWVotingContract *KNWVotingContractSession) CommitVote(_pollID *big.Int, _address common.Address, _secretHash [32]byte) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.CommitVote(&_KNWVotingContract.TransactOpts, _pollID, _address, _secretHash)
- }
- // CommitVote is a paid mutator transaction binding the contract method 0x7eb2ff52.
- //
- // Solidity: function commitVote(uint256 _pollID, address _address, bytes32 _secretHash) returns(uint256 numVotes)
- func (_KNWVotingContract *KNWVotingContractTransactorSession) CommitVote(_pollID *big.Int, _address common.Address, _secretHash [32]byte) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.CommitVote(&_KNWVotingContract.TransactOpts, _pollID, _address, _secretHash)
- }
- // ResolvePoll is a paid mutator transaction binding the contract method 0xe74fef37.
- //
- // Solidity: function resolvePoll(uint256 _pollID) returns(bool votePassed)
- func (_KNWVotingContract *KNWVotingContractTransactor) ResolvePoll(opts *bind.TransactOpts, _pollID *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.contract.Transact(opts, "resolvePoll", _pollID)
- }
- // ResolvePoll is a paid mutator transaction binding the contract method 0xe74fef37.
- //
- // Solidity: function resolvePoll(uint256 _pollID) returns(bool votePassed)
- func (_KNWVotingContract *KNWVotingContractSession) ResolvePoll(_pollID *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.ResolvePoll(&_KNWVotingContract.TransactOpts, _pollID)
- }
- // ResolvePoll is a paid mutator transaction binding the contract method 0xe74fef37.
- //
- // Solidity: function resolvePoll(uint256 _pollID) returns(bool votePassed)
- func (_KNWVotingContract *KNWVotingContractTransactorSession) ResolvePoll(_pollID *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.ResolvePoll(&_KNWVotingContract.TransactOpts, _pollID)
- }
- // RevealVote is a paid mutator transaction binding the contract method 0x34f2f2d2.
- //
- // Solidity: function revealVote(uint256 _pollID, address _address, uint256 _voteOption, uint256 _salt) returns()
- func (_KNWVotingContract *KNWVotingContractTransactor) RevealVote(opts *bind.TransactOpts, _pollID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.contract.Transact(opts, "revealVote", _pollID, _address, _voteOption, _salt)
- }
- // RevealVote is a paid mutator transaction binding the contract method 0x34f2f2d2.
- //
- // Solidity: function revealVote(uint256 _pollID, address _address, uint256 _voteOption, uint256 _salt) returns()
- func (_KNWVotingContract *KNWVotingContractSession) RevealVote(_pollID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.RevealVote(&_KNWVotingContract.TransactOpts, _pollID, _address, _voteOption, _salt)
- }
- // RevealVote is a paid mutator transaction binding the contract method 0x34f2f2d2.
- //
- // Solidity: function revealVote(uint256 _pollID, address _address, uint256 _voteOption, uint256 _salt) returns()
- func (_KNWVotingContract *KNWVotingContractTransactorSession) RevealVote(_pollID *big.Int, _address common.Address, _voteOption *big.Int, _salt *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.RevealVote(&_KNWVotingContract.TransactOpts, _pollID, _address, _voteOption, _salt)
- }
- // SetCoordinatorAddress is a paid mutator transaction binding the contract method 0xf354b838.
- //
- // Solidity: function setCoordinatorAddress(address _newCoordinatorAddress) returns()
- func (_KNWVotingContract *KNWVotingContractTransactor) SetCoordinatorAddress(opts *bind.TransactOpts, _newCoordinatorAddress common.Address) (*types.Transaction, error) {
- return _KNWVotingContract.contract.Transact(opts, "setCoordinatorAddress", _newCoordinatorAddress)
- }
- // SetCoordinatorAddress is a paid mutator transaction binding the contract method 0xf354b838.
- //
- // Solidity: function setCoordinatorAddress(address _newCoordinatorAddress) returns()
- func (_KNWVotingContract *KNWVotingContractSession) SetCoordinatorAddress(_newCoordinatorAddress common.Address) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.SetCoordinatorAddress(&_KNWVotingContract.TransactOpts, _newCoordinatorAddress)
- }
- // SetCoordinatorAddress is a paid mutator transaction binding the contract method 0xf354b838.
- //
- // Solidity: function setCoordinatorAddress(address _newCoordinatorAddress) returns()
- func (_KNWVotingContract *KNWVotingContractTransactorSession) SetCoordinatorAddress(_newCoordinatorAddress common.Address) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.SetCoordinatorAddress(&_KNWVotingContract.TransactOpts, _newCoordinatorAddress)
- }
- // SetTokenAddress is a paid mutator transaction binding the contract method 0x26a4e8d2.
- //
- // Solidity: function setTokenAddress(address _newKNWTokenAddress) returns()
- func (_KNWVotingContract *KNWVotingContractTransactor) SetTokenAddress(opts *bind.TransactOpts, _newKNWTokenAddress common.Address) (*types.Transaction, error) {
- return _KNWVotingContract.contract.Transact(opts, "setTokenAddress", _newKNWTokenAddress)
- }
- // SetTokenAddress is a paid mutator transaction binding the contract method 0x26a4e8d2.
- //
- // Solidity: function setTokenAddress(address _newKNWTokenAddress) returns()
- func (_KNWVotingContract *KNWVotingContractSession) SetTokenAddress(_newKNWTokenAddress common.Address) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.SetTokenAddress(&_KNWVotingContract.TransactOpts, _newKNWTokenAddress)
- }
- // SetTokenAddress is a paid mutator transaction binding the contract method 0x26a4e8d2.
- //
- // Solidity: function setTokenAddress(address _newKNWTokenAddress) returns()
- func (_KNWVotingContract *KNWVotingContractTransactorSession) SetTokenAddress(_newKNWTokenAddress common.Address) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.SetTokenAddress(&_KNWVotingContract.TransactOpts, _newKNWTokenAddress)
- }
- // StartPoll is a paid mutator transaction binding the contract method 0x9156cd07.
- //
- // Solidity: function startPoll(bytes32 _repository, address _address, string _knowledgeLabel, uint256 _commitDuration, uint256 _revealDuration, uint256 _proposersStake) returns(uint256 pollID)
- func (_KNWVotingContract *KNWVotingContractTransactor) StartPoll(opts *bind.TransactOpts, _repository [32]byte, _address common.Address, _knowledgeLabel string, _commitDuration *big.Int, _revealDuration *big.Int, _proposersStake *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.contract.Transact(opts, "startPoll", _repository, _address, _knowledgeLabel, _commitDuration, _revealDuration, _proposersStake)
- }
- // StartPoll is a paid mutator transaction binding the contract method 0x9156cd07.
- //
- // Solidity: function startPoll(bytes32 _repository, address _address, string _knowledgeLabel, uint256 _commitDuration, uint256 _revealDuration, uint256 _proposersStake) returns(uint256 pollID)
- func (_KNWVotingContract *KNWVotingContractSession) StartPoll(_repository [32]byte, _address common.Address, _knowledgeLabel string, _commitDuration *big.Int, _revealDuration *big.Int, _proposersStake *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.StartPoll(&_KNWVotingContract.TransactOpts, _repository, _address, _knowledgeLabel, _commitDuration, _revealDuration, _proposersStake)
- }
- // StartPoll is a paid mutator transaction binding the contract method 0x9156cd07.
- //
- // Solidity: function startPoll(bytes32 _repository, address _address, string _knowledgeLabel, uint256 _commitDuration, uint256 _revealDuration, uint256 _proposersStake) returns(uint256 pollID)
- func (_KNWVotingContract *KNWVotingContractTransactorSession) StartPoll(_repository [32]byte, _address common.Address, _knowledgeLabel string, _commitDuration *big.Int, _revealDuration *big.Int, _proposersStake *big.Int) (*types.Transaction, error) {
- return _KNWVotingContract.Contract.StartPoll(&_KNWVotingContract.TransactOpts, _repository, _address, _knowledgeLabel, _commitDuration, _revealDuration, _proposersStake)
- }
- // SafeMathABI is the input ABI used to generate the binding from.
- const SafeMathABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"a\",\"type\":\"uint256\"}],\"name\":\"sqrt\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]"
- // SafeMathBin is the compiled bytecode used for deploying new contracts.
- const SafeMathBin = `0x61016b610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106100575763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663677342ce811461005c575b600080fd5b610067600435610079565b60408051918252519081900360200190f35b6000808083151561008d5760009250610138565b6001840184106100fe57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f466c6177656420696e70757420666f7220737172740000000000000000000000604482015290519081900360640190fd5b505060026001830104825b80821015610134575080600281808681151561012157fe5b040181151561012c57fe5b049150610109565b8192505b50509190505600a165627a7a723058209973030427b153e03b78d7e03b4edc80d78b5dc021f0b5fc92844e037d38d8330029`
- // DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it.
- func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) {
- parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend)
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
- }
- // SafeMath is an auto generated Go binding around an Ethereum contract.
- type SafeMath struct {
- SafeMathCaller // Read-only binding to the contract
- SafeMathTransactor // Write-only binding to the contract
- SafeMathFilterer // Log filterer for contract events
- }
- // SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract.
- type SafeMathCaller struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract.
- type SafeMathTransactor struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
- type SafeMathFilterer struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // SafeMathSession is an auto generated Go binding around an Ethereum contract,
- // with pre-set call and transact options.
- type SafeMathSession struct {
- Contract *SafeMath // Generic contract binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract,
- // with pre-set call options.
- type SafeMathCallerSession struct {
- Contract *SafeMathCaller // Generic contract caller binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- }
- // SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
- // with pre-set transact options.
- type SafeMathTransactorSession struct {
- Contract *SafeMathTransactor // Generic contract transactor binding to set the session for
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract.
- type SafeMathRaw struct {
- Contract *SafeMath // Generic contract binding to access the raw methods on
- }
- // SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
- type SafeMathCallerRaw struct {
- Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on
- }
- // SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
- type SafeMathTransactorRaw struct {
- Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on
- }
- // NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract.
- func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) {
- contract, err := bindSafeMath(address, backend, backend, backend)
- if err != nil {
- return nil, err
- }
- return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
- }
- // NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract.
- func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) {
- contract, err := bindSafeMath(address, caller, nil, nil)
- if err != nil {
- return nil, err
- }
- return &SafeMathCaller{contract: contract}, nil
- }
- // NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract.
- func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) {
- contract, err := bindSafeMath(address, nil, transactor, nil)
- if err != nil {
- return nil, err
- }
- return &SafeMathTransactor{contract: contract}, nil
- }
- // NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract.
- func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) {
- contract, err := bindSafeMath(address, nil, nil, filterer)
- if err != nil {
- return nil, err
- }
- return &SafeMathFilterer{contract: contract}, nil
- }
- // bindSafeMath binds a generic wrapper to an already deployed contract.
- func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
- parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
- if err != nil {
- return nil, err
- }
- return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
- return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...)
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
- return _SafeMath.Contract.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _SafeMath.Contract.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _SafeMath.Contract.contract.Transact(opts, method, params...)
- }
- // Sqrt is a free data retrieval call binding the contract method 0x677342ce.
- //
- // Solidity: function sqrt(uint256 a) constant returns(uint256)
- func (_SafeMath *SafeMathCaller) Sqrt(opts *bind.CallOpts, a *big.Int) (*big.Int, error) {
- var (
- ret0 = new(*big.Int)
- )
- out := ret0
- err := _SafeMath.contract.Call(opts, out, "sqrt", a)
- return *ret0, err
- }
- // Sqrt is a free data retrieval call binding the contract method 0x677342ce.
- //
- // Solidity: function sqrt(uint256 a) constant returns(uint256)
- func (_SafeMath *SafeMathSession) Sqrt(a *big.Int) (*big.Int, error) {
- return _SafeMath.Contract.Sqrt(&_SafeMath.CallOpts, a)
- }
- // Sqrt is a free data retrieval call binding the contract method 0x677342ce.
- //
- // Solidity: function sqrt(uint256 a) constant returns(uint256)
- func (_SafeMath *SafeMathCallerSession) Sqrt(a *big.Int) (*big.Int, error) {
- return _SafeMath.Contract.Sqrt(&_SafeMath.CallOpts, a)
- }
- // DitDemoCoordinatorABI is the input ABI used to generate the binding from.
- const DitDemoCoordinatorABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"getKNWVoteIDFromProposalID\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"}],\"name\":\"getCurrentProposalID\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_voteOption\",\"type\":\"uint256\"},{\"name\":\"_voteSalt\",\"type\":\"uint256\"}],\"name\":\"openVoteOnProposal\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"isKYCValidator\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"repositories\",\"outputs\":[{\"name\":\"votingMajority\",\"type\":\"uint256\"},{\"name\":\"mintingMethod\",\"type\":\"uint256\"},{\"name\":\"burningMethod\",\"type\":\"uint256\"},{\"name\":\"currentProposalID\",\"type\":\"uint256\"},{\"name\":\"minVoteCommitDuration\",\"type\":\"uint256\"},{\"name\":\"maxVoteCommitDuration\",\"type\":\"uint256\"},{\"name\":\"minVoteOpenDuration\",\"type\":\"uint256\"},{\"name\":\"maxVoteOpenDuration\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"finalizeVote\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"revokeKYC\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposalsOfRepository\",\"outputs\":[{\"name\":\"KNWVoteID\",\"type\":\"uint256\"},{\"name\":\"knowledgeLabel\",\"type\":\"string\"},{\"name\":\"proposer\",\"type\":\"address\"},{\"name\":\"isFinalized\",\"type\":\"bool\"},{\"name\":\"proposalAccepted\",\"type\":\"bool\"},{\"name\":\"individualStake\",\"type\":\"uint256\"},{\"name\":\"totalStake\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_label1\",\"type\":\"string\"},{\"name\":\"_label2\",\"type\":\"string\"},{\"name\":\"_label3\",\"type\":\"string\"},{\"name\":\"_voteSettings\",\"type\":\"uint256[7]\"}],\"name\":\"initRepository\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"getIndividualStake\",\"outputs\":[{\"name\":\"individualStake\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"removeKYCValidator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"proposalHasPassed\",\"outputs\":[{\"name\":\"hasPassed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_knowledgeLabelID\",\"type\":\"uint256\"}],\"name\":\"getKnowledgeLabels\",\"outputs\":[{\"name\":\"knowledgeLabel\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"KNWTokenAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_voteHash\",\"type\":\"bytes32\"}],\"name\":\"voteOnProposal\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"},{\"name\":\"_knowledgeLabelIndex\",\"type\":\"uint256\"},{\"name\":\"_voteCommitDuration\",\"type\":\"uint256\"},{\"name\":\"_voteOpenDuration\",\"type\":\"uint256\"},{\"name\":\"_amountOfTokens\",\"type\":\"uint256\"}],\"name\":\"proposeCommit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"passedKYC\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"xDitTokenAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"addKYCValidator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_repository\",\"type\":\"bytes32\"}],\"name\":\"repositoryIsInitialized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"KNWVotingAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"passKYC\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_KNWTokenAddress\",\"type\":\"address\"},{\"name\":\"_KNWVotingAddress\",\"type\":\"address\"},{\"name\":\"_xDitTokenAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"label\",\"type\":\"string\"}],\"name\":\"ProposeCommit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"label\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"stake\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"numberOfVotes\",\"type\":\"uint256\"}],\"name\":\"CommitVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"label\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"accept\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"numberOfVotes\",\"type\":\"uint256\"}],\"name\":\"OpenVote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"repository\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"proposal\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"label\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"accepted\",\"type\":\"bool\"}],\"name\":\"FinalizeVote\",\"type\":\"event\"}]"
- // DitDemoCoordinatorBin is the compiled bytecode used for deploying new contracts.
- const DitDemoCoordinatorBin = `0x608060405234801561001057600080fd5b50604051606080612378833981016040908152815160208301519190920151600160a060020a0382161580159061004f5750600160a060020a03831615155b15156100e257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4b4e57566f74696e6720616e64204b4e57546f6b656e2061646472657373206360448201527f616e277420626520656d70747900000000000000000000000000000000000000606482015290519081900360840190fd5b60008054600160a060020a03938416600160a060020a0319918216178083556003805483169186169190911790556001805495851695821695909517808655600480548316918616919091179055600280549385169382169390931792839055600580549091169290931691909117909155338152600960205260409020805460ff191690911790556121fe8061017a6000396000f3006080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306ee4596811461012c5780630bdc90e8146101595780630ee62ec0146101715780631341f25c146101945780631f51fd71146101c95780632e71d0fb1461022257806339ba645b1461023d5780633e029f631461025e57806351f43c241461032c578063552edc9d1461036a57806373b0dddd1461038557806387c9203d146103a657806395332229146103c1578063985dbfc514610451578063a34c299a14610482578063bef7a4da14610493578063ccd9aa68146104aa578063ce83732e146104cb578063d0c397ef146104e0578063ea6c6d0f14610501578063eb49fe9414610519578063eb9310241461052e575b600080fd5b34801561013857600080fd5b5061014760043560243561054f565b60408051918252519081900360200190f35b34801561016557600080fd5b5061014760043561056c565b34801561017d57600080fd5b50610192600435602435604435606435610582565b005b3480156101a057600080fd5b506101b5600160a060020a036004351661074b565b604080519115158252519081900360200190f35b3480156101d557600080fd5b506101e1600435610760565b604080519889526020890197909752878701959095526060870193909352608086019190915260a085015260c084015260e083015251908190036101000190f35b34801561022e57600080fd5b506101926004356024356107a8565b34801561024957600080fd5b50610192600160a060020a0360043516610d39565b34801561026a57600080fd5b50610279600435602435610d79565b60408051888152600160a060020a038716918101919091528415156060820152831515608082015260a0810183905260c0810182905260e0602080830182815289519284019290925288516101008401918a019080838360005b838110156102eb5781810151838201526020016102d3565b50505050905090810190601f1680156103185780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b34801561033857600080fd5b506101b56004803590602480358082019290810135916044358082019290810135916064359081019101356084610e6d565b34801561037657600080fd5b506101476004356024356111bf565b34801561039157600080fd5b50610192600160a060020a03600435166111df565b3480156103b257600080fd5b506101b560043560243561121f565b3480156103cd57600080fd5b506103dc6004356024356112d9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104165781810151838201526020016103fe565b50505050905090810190601f1680156104435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561045d57600080fd5b50610466611387565b60408051600160a060020a039092168252519081900360200190f35b610192600435602435604435611396565b610192600435602435604435606435608435611745565b3480156104b657600080fd5b506101b5600160a060020a0360043516611ea0565b3480156104d757600080fd5b50610466611eb5565b3480156104ec57600080fd5b50610192600160a060020a0360043516611ec4565b34801561050d57600080fd5b506101b5600435611f07565b34801561052557600080fd5b50610466611f1d565b34801561053a57600080fd5b50610192600160a060020a0360043516611f2c565b600091825260076020908152604080842092845291905290205490565b6000908152600660208190526040909120015490565b3360008181526008602052604090205460ff1615156105a057600080fd5b60035460008681526007602090815260408083208884529091528082205481517f34f2f2d2000000000000000000000000000000000000000000000000000000008152600481019190915233602482015260448101879052606481018690529051600160a060020a03909316926334f2f2d29260848084019391929182900301818387803b15801561063157600080fd5b505af1158015610645573d6000803e3d6000fd5b50505060008681526007602090815260408083208884528252808320338085526005820184529382902060018082018a9055905483518a8314958101869052938401819052606080855292820180546002600019948216156101000294909401169290920492840183905294955089948b947f864c0d6987266fd72e7e37f1fbc98b6a3794b7187dae454c67a2a626628a72ab94929390929081906080820190869080156107345780601f1061070957610100808354040283529160200191610734565b820191906000526020600020905b81548152906001019060200180831161071757829003601f168201915b505094505050505060405180910390a45050505050565b60096020526000908152604090205460ff1681565b600660205280600052604060002060009150905080600301549080600401549080600501549080600601549080600701549080600801549080600901549080600a0154905088565b3360008181526008602052604081205490919060ff1615156107c957600080fd5b6000848152600760209081526040808320868452825280832033845260050190915290206002015460ff161561086f576040805160e560020a62461bcd02815260206004820152602760248201527f45616368207061727469636970616e742063616e206f6e6c792066696e616c6960448201527f7a65206f6e636500000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000848152600760209081526040808320868452825280832033845260050190915281205411806108c457506000848152600760209081526040808320868452909152902060020154600160a060020a031633145b1515610940576040805160e560020a62461bcd02815260206004820152603a60248201527f4f6e6c79207061727469636970616e7473206f662074686520766f746520617260448201527f652061626c6520746f207265736f6c76652074686520766f7465000000000000606482015290519081900360840190fd5b600084815260076020908152604080832086845290915290206002015460a060020a900460ff161515610b5657600354600085815260076020908152604080832087845282528083205481517fe74fef3700000000000000000000000000000000000000000000000000000000815260048101919091529051600160a060020a039094169363e74fef3793602480840194938390030190829087803b1580156109e857600080fd5b505af11580156109fc573d6000803e3d6000fd5b505050506040513d6020811015610a1257600080fd5b505160008581526007602090815260408083208784528252918290206002808201805474ff000000000000000000000000000000000000000019961515750100000000000000000000000000000000000000000090810275ff00000000000000000000000000000000000000000019909216919091179690961660a060020a1790819055845195900460ff16801515938601939093528385526001918201805492831615610100026000190190921604928401839052869388937f6bd2699645e0f6c5547bdf0d053280e48fef1ab21514bd02c88610b1279b942a9391908190606082019085908015610b465780601f10610b1b57610100808354040283529160200191610b46565b820191906000526020600020905b815481529060010190602001808311610b2957829003601f168201915b5050935050505060405180910390a35b60035460008581526007602090815260408083208784528252808320805433808652600590920184528285206001015483517fce729fd20000000000000000000000000000000000000000000000000000000081526004810192909252602482015260448101919091529051600160a060020a039094169363ce729fd293606480840194938390030190829087803b158015610bf157600080fd5b505af1158015610c05573d6000803e3d6000fd5b505050506040513d6020811015610c1b57600080fd5b505191506000821115610ccc57600554604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015610c9557600080fd5b505af1158015610ca9573d6000803e3d6000fd5b505050506040513d6020811015610cbf57600080fd5b50511515610ccc57600080fd5b6000848152600760209081526040808320868452909152902060040154610cf9908363ffffffff611f6f16565b600094855260076020908152604080872095875294815284862060048101929092553386526005909101905250509020600201805460ff19166001179055565b3360008181526009602052604090205460ff161515610d5757600080fd5b50600160a060020a03166000908152600860205260409020805460ff19169055565b60076020908152600092835260408084208252918352918190208054600180830180548551600293821615610100026000190190911692909204601f8101879004870283018701909552848252919492939092830182828015610e1d5780601f10610df257610100808354040283529160200191610e1d565b820191906000526020600020905b815481529060010190602001808311610e0057829003601f168201915b505050600284015460038501546004909501549394600160a060020a0382169460ff60a060020a840481169550750100000000000000000000000000000000000000000090930490921692509087565b3360008181526008602052604081205490919060ff161515610e8e57600080fd5b891515610f0b576040805160e560020a62461bcd02815260206004820152602360248201527f5265706f7369746f72792064657363726970746f722063616e2774206265207a60448201527f65726f0000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008a81526006602052604090206003015415610f98576040805160e560020a62461bcd02815260206004820152602760248201527f5265706f7369746f72792063616e206f6e6c7920626520696e697469616c697a60448201527f6564206f6e636500000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000881180610fa75750600086115b80610fb25750600084115b151561102d576040805160e560020a62461bcd028152602060048201526024808201527f50726f76696465206174206c65617374206f6e65204b6e6f776c65646765204c60448201527f6162656c00000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b604080516101a06020601f8c01819004028201810190925261018081018a8152909182916101208301918291908e908e908190870183828082843782019150505050505081526020018a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437505050929093525050508152843560208083019190915285013560408083019190915285013560608201526000608082015260a00184600360209081029190910135825260808601358282015260a086013560408084019190915260c087013560609093019290925260008d8152600690915220815161115b9082906003612081565b506020820151600382015560408201516004820155606082015160058201556080820151600682015560a0820151600782015560c0820151600882015560e0820151600982015561010090910151600a909101555060019998505050505050505050565b600091825260076020908152604080842092845291905290206003015490565b3360008181526009602052604090205460ff1615156111fd57600080fd5b50600160a060020a03166000908152600960205260409020805460ff19169055565b600082815260076020908152604080832084845290915281206002015460a060020a900460ff16151561129c576040805160e560020a62461bcd02815260206004820152601d60248201527f50726f706f73616c206861736e2774206265656e207265736f6c766564000000604482015290519081900360640190fd5b5060009182526007602090815260408084209284529190529020600201547501000000000000000000000000000000000000000000900460ff1690565b600082815260066020526040902060609082600381106112f557fe5b01805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561137a5780601f1061134f5761010080835404028352916020019161137a565b820191906000526020600020905b81548152906001019060200180831161135d57829003601f168201915b5050505050905092915050565b600154600160a060020a031681565b3360008181526008602052604081205490919060ff1615156113b757600080fd5b6000858152600760209081526040808320878452909152902060020154600160a060020a031633141561145a576040805160e560020a62461bcd02815260206004820152603160248201527f5468652070726f706f736572206973206e6f7420616c6c6f77656420746f207660448201527f6f746520696e20612070726f706f73616c000000000000000000000000000000606482015290519081900360840190fd5b600554600086815260076020908152604080832088845282528083206003015481517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101919091529051600160a060020a03909416936323b872dd93606480840194938390030190829087803b1580156114e457600080fd5b505af11580156114f8573d6000803e3d6000fd5b505050506040513d602081101561150e57600080fd5b5051151561151b57600080fd5b60008581526007602090815260408083208784529091529020600381015460049091015461154891611ff7565b60008681526007602090815260408083208884528252808320600480820195909555600354905482517f7eb2ff5200000000000000000000000000000000000000000000000000000000815295860152336024860152604485018890529051600160a060020a0390911693637eb2ff529360648083019493928390030190829087803b1580156115d757600080fd5b505af11580156115eb573d6000803e3d6000fd5b505050506040513d602081101561160157600080fd5b5051915060008211611683576040805160e560020a62461bcd02815260206004820152603360248201527f566f74696e6720636f6e74726163742072657475726e656420616e20696e766160448201527f6c696420616d6f756e74206f6620766f74657300000000000000000000000000606482015290519081900360840190fd5b60008581526007602090815260408083208784528083528184203380865260058201855283862088905594899052908352600381015482519384018190529183018690526060808452600191820180546002610100948216159490940260001901169290920490840181905288938a937fa01eea487bb3ec75528c167ccf90452d4164ddda7b13c55b2a89751a8dc5fbc193929091899181906080820190869080156107345780601f1061070957610100808354040283529160200191610734565b3360008181526008602052604090205460ff16151561176357600080fd5b600082116117bb576040805160e560020a62461bcd02815260206004820181905260248201527f416d6f756e74206f6620746f6b656e732063616e206e6f74206265207a65726f604482015290519081900360640190fd5b600086815260066020526040812086600381106117d457fe5b01546002600019610100600184161502019091160411611863576040805160e560020a62461bcd028152602060048201526024808201527f4b6e6f776c656467652d4c6162656c20696e646578206973206e6f7420636f7260448201527f7265637400000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600086815260066020526040902060070154841080159061189557506000868152600660205260409020600801548411155b15156118eb576040805160e560020a62461bcd02815260206004820152601c60248201527f566f746520636f6d6d6974206475726174696f6e20696e76616c696400000000604482015290519081900360640190fd5b600086815260066020526040902060090154831080159061191d57506000868152600660205260409020600a01548311155b1515611973576040805160e560020a62461bcd02815260206004820152601a60248201527f566f7465206f70656e206475726174696f6e20696e76616c6964000000000000604482015290519081900360640190fd5b6000868152600660208190526040909120015461199790600163ffffffff611ff716565b60008781526006602081905260409182902090810192909255805160e081019091526003805491928392600160a060020a031691639156cd07918b913391908c9081106119e057fe5b60405163ffffffff86167c010000000000000000000000000000000000000000000000000000000002815260048101858152600160a060020a0385166024830152606482018e9052608482018d905260a482018c905260c0604483019081529290930180546002600019600183161561010002019091160460c4830181905290938e938e938e9360e49091019087908015611abc5780601f10611a9157610100808354040283529160200191611abc565b820191906000526020600020905b815481529060010190602001808311611a9f57829003601f168201915b5050975050505050505050602060405180830381600087803b158015611ae157600080fd5b505af1158015611af5573d6000803e3d6000fd5b505050506040513d6020811015611b0b57600080fd5b5051815260008881526006602090815260409091209101908760038110611b2e57fe5b01805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015611bb35780601f10611b8857610100808354040283529160200191611bb3565b820191906000526020600020905b815481529060010190602001808311611b9657829003601f168201915b50505091835250503360208083019190915260006040808401829052606084018290526080840187905260a090930181905289815260078252828120600680845284832001548252825291909120825181558282015180519192611c1f926001850192909101906120d1565b506040828101516002830180546060860151608087015173ffffffffffffffffffffffffffffffffffffffff19909216600160a060020a039485161774ff0000000000000000000000000000000000000000191660a060020a911515919091021775ff000000000000000000000000000000000000000000191675010000000000000000000000000000000000000000009115159190910217905560a0840151600384015560c09093015160049283015560055481517f23b872dd00000000000000000000000000000000000000000000000000000000815233938101939093523060248401526044830186905290519216916323b872dd916064808201926020929091908290030181600087803b158015611d3a57600080fd5b505af1158015611d4e573d6000803e3d6000fd5b505050506040513d6020811015611d6457600080fd5b50511515611d7157600080fd5b6000868152600760209081526040808320600680845282852001548452909152902060040154611da7908363ffffffff611ff716565b600087815260076020908152604080832060068084528285208082018054875292855292852060040195909555928a905292905254339188907f171fe77c3addce776991159eb3eb73b14d9187ebd06c1c34ea12355a84ddbd83908960038110611e0d57fe5b6040805160208082529390920180546002600019610100600184161502019091160493830184905292829182019084908015611e8a5780601f10611e5f57610100808354040283529160200191611e8a565b820191906000526020600020905b815481529060010190602001808311611e6d57829003601f168201915b50509250505060405180910390a4505050505050565b60086020526000908152604090205460ff1681565b600254600160a060020a031681565b3360008181526009602052604090205460ff161515611ee257600080fd5b50600160a060020a03166000908152600960205260409020805460ff19166001179055565b6000908152600660205260408120600301541190565b600054600160a060020a031681565b3360008181526009602052604090205460ff161515611f4a57600080fd5b50600160a060020a03166000908152600860205260409020805460ff19166001179055565b60008083831115611ff0576040805160e560020a62461bcd02815260206004820152603560248201527f43616e27742073756274726163742061206e756d6265722066726f6d2061207360448201527f6d616c6c6572206f6e6520776974682075696e74730000000000000000000000606482015290519081900360840190fd5b5050900390565b60008282018381101561207a576040805160e560020a62461bcd02815260206004820152602a60248201527f526573756c742068617320746f20626520626967676572207468616e20626f7460448201527f682073756d6d616e647300000000000000000000000000000000000000000000606482015290519081900360840190fd5b9392505050565b82600381019282156120c1579160200282015b828111156120c157825180516120b19184916020909101906120d1565b5091602001919060010190612094565b506120cd92915061214b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061211257805160ff191683800117855561213f565b8280016001018555821561213f579182015b8281111561213f578251825591602001919060010190612124565b506120cd929150612171565b61216e91905b808211156120cd576000612165828261218b565b50600101612151565b90565b61216e91905b808211156120cd5760008155600101612177565b50805460018160011615610100020316600290046000825580601f106121b157506121cf565b601f0160209004906000526020600020908101906121cf9190612171565b505600a165627a7a7230582097d9b3fceb9f232f46ee132d07381a05add89250c72112c80c954ba4fe8f3cb10029`
- // DeployDitDemoCoordinator deploys a new Ethereum contract, binding an instance of DitDemoCoordinator to it.
- func DeployDitDemoCoordinator(auth *bind.TransactOpts, backend bind.ContractBackend, _KNWTokenAddress common.Address, _KNWVotingAddress common.Address, _xDitTokenAddress common.Address) (common.Address, *types.Transaction, *DitDemoCoordinator, error) {
- parsed, err := abi.JSON(strings.NewReader(DitDemoCoordinatorABI))
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(DitDemoCoordinatorBin), backend, _KNWTokenAddress, _KNWVotingAddress, _xDitTokenAddress)
- if err != nil {
- return common.Address{}, nil, nil, err
- }
- return address, tx, &DitDemoCoordinator{DitDemoCoordinatorCaller: DitDemoCoordinatorCaller{contract: contract}, DitDemoCoordinatorTransactor: DitDemoCoordinatorTransactor{contract: contract}, DitDemoCoordinatorFilterer: DitDemoCoordinatorFilterer{contract: contract}}, nil
- }
- // DitDemoCoordinator is an auto generated Go binding around an Ethereum contract.
- type DitDemoCoordinator struct {
- DitDemoCoordinatorCaller // Read-only binding to the contract
- DitDemoCoordinatorTransactor // Write-only binding to the contract
- DitDemoCoordinatorFilterer // Log filterer for contract events
- }
- // DitDemoCoordinatorCaller is an auto generated read-only Go binding around an Ethereum contract.
- type DitDemoCoordinatorCaller struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // DitDemoCoordinatorTransactor is an auto generated write-only Go binding around an Ethereum contract.
- type DitDemoCoordinatorTransactor struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // DitDemoCoordinatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
- type DitDemoCoordinatorFilterer struct {
- contract *bind.BoundContract // Generic contract wrapper for the low level calls
- }
- // DitDemoCoordinatorSession is an auto generated Go binding around an Ethereum contract,
- // with pre-set call and transact options.
- type DitDemoCoordinatorSession struct {
- Contract *DitDemoCoordinator // Generic contract binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // DitDemoCoordinatorCallerSession is an auto generated read-only Go binding around an Ethereum contract,
- // with pre-set call options.
- type DitDemoCoordinatorCallerSession struct {
- Contract *DitDemoCoordinatorCaller // Generic contract caller binding to set the session for
- CallOpts bind.CallOpts // Call options to use throughout this session
- }
- // DitDemoCoordinatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
- // with pre-set transact options.
- type DitDemoCoordinatorTransactorSession struct {
- Contract *DitDemoCoordinatorTransactor // Generic contract transactor binding to set the session for
- TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
- }
- // DitDemoCoordinatorRaw is an auto generated low-level Go binding around an Ethereum contract.
- type DitDemoCoordinatorRaw struct {
- Contract *DitDemoCoordinator // Generic contract binding to access the raw methods on
- }
- // DitDemoCoordinatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
- type DitDemoCoordinatorCallerRaw struct {
- Contract *DitDemoCoordinatorCaller // Generic read-only contract binding to access the raw methods on
- }
- // DitDemoCoordinatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
- type DitDemoCoordinatorTransactorRaw struct {
- Contract *DitDemoCoordinatorTransactor // Generic write-only contract binding to access the raw methods on
- }
- // NewDitDemoCoordinator creates a new instance of DitDemoCoordinator, bound to a specific deployed contract.
- func NewDitDemoCoordinator(address common.Address, backend bind.ContractBackend) (*DitDemoCoordinator, error) {
- contract, err := bindDitDemoCoordinator(address, backend, backend, backend)
- if err != nil {
- return nil, err
- }
- return &DitDemoCoordinator{DitDemoCoordinatorCaller: DitDemoCoordinatorCaller{contract: contract}, DitDemoCoordinatorTransactor: DitDemoCoordinatorTransactor{contract: contract}, DitDemoCoordinatorFilterer: DitDemoCoordinatorFilterer{contract: contract}}, nil
- }
- // NewDitDemoCoordinatorCaller creates a new read-only instance of DitDemoCoordinator, bound to a specific deployed contract.
- func NewDitDemoCoordinatorCaller(address common.Address, caller bind.ContractCaller) (*DitDemoCoordinatorCaller, error) {
- contract, err := bindDitDemoCoordinator(address, caller, nil, nil)
- if err != nil {
- return nil, err
- }
- return &DitDemoCoordinatorCaller{contract: contract}, nil
- }
- // NewDitDemoCoordinatorTransactor creates a new write-only instance of DitDemoCoordinator, bound to a specific deployed contract.
- func NewDitDemoCoordinatorTransactor(address common.Address, transactor bind.ContractTransactor) (*DitDemoCoordinatorTransactor, error) {
- contract, err := bindDitDemoCoordinator(address, nil, transactor, nil)
- if err != nil {
- return nil, err
- }
- return &DitDemoCoordinatorTransactor{contract: contract}, nil
- }
- // NewDitDemoCoordinatorFilterer creates a new log filterer instance of DitDemoCoordinator, bound to a specific deployed contract.
- func NewDitDemoCoordinatorFilterer(address common.Address, filterer bind.ContractFilterer) (*DitDemoCoordinatorFilterer, error) {
- contract, err := bindDitDemoCoordinator(address, nil, nil, filterer)
- if err != nil {
- return nil, err
- }
- return &DitDemoCoordinatorFilterer{contract: contract}, nil
- }
- // bindDitDemoCoordinator binds a generic wrapper to an already deployed contract.
- func bindDitDemoCoordinator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
- parsed, err := abi.JSON(strings.NewReader(DitDemoCoordinatorABI))
- if err != nil {
- return nil, err
- }
- return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_DitDemoCoordinator *DitDemoCoordinatorRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
- return _DitDemoCoordinator.Contract.DitDemoCoordinatorCaller.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_DitDemoCoordinator *DitDemoCoordinatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.DitDemoCoordinatorTransactor.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_DitDemoCoordinator *DitDemoCoordinatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.DitDemoCoordinatorTransactor.contract.Transact(opts, method, params...)
- }
- // Call invokes the (constant) contract method with params as input values and
- // sets the output to result. The result type might be a single field for simple
- // returns, a slice of interfaces for anonymous returns and a struct for named
- // returns.
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
- return _DitDemoCoordinator.Contract.contract.Call(opts, result, method, params...)
- }
- // Transfer initiates a plain transaction to move funds to the contract, calling
- // its default method if one is available.
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.contract.Transfer(opts)
- }
- // Transact invokes the (paid) contract method with params as input values.
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.contract.Transact(opts, method, params...)
- }
- // KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
- //
- // Solidity: function KNWTokenAddress() constant returns(address)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) KNWTokenAddress(opts *bind.CallOpts) (common.Address, error) {
- var (
- ret0 = new(common.Address)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "KNWTokenAddress")
- return *ret0, err
- }
- // KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
- //
- // Solidity: function KNWTokenAddress() constant returns(address)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) KNWTokenAddress() (common.Address, error) {
- return _DitDemoCoordinator.Contract.KNWTokenAddress(&_DitDemoCoordinator.CallOpts)
- }
- // KNWTokenAddress is a free data retrieval call binding the contract method 0x985dbfc5.
- //
- // Solidity: function KNWTokenAddress() constant returns(address)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) KNWTokenAddress() (common.Address, error) {
- return _DitDemoCoordinator.Contract.KNWTokenAddress(&_DitDemoCoordinator.CallOpts)
- }
- // KNWVotingAddress is a free data retrieval call binding the contract method 0xeb49fe94.
- //
- // Solidity: function KNWVotingAddress() constant returns(address)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) KNWVotingAddress(opts *bind.CallOpts) (common.Address, error) {
- var (
- ret0 = new(common.Address)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "KNWVotingAddress")
- return *ret0, err
- }
- // KNWVotingAddress is a free data retrieval call binding the contract method 0xeb49fe94.
- //
- // Solidity: function KNWVotingAddress() constant returns(address)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) KNWVotingAddress() (common.Address, error) {
- return _DitDemoCoordinator.Contract.KNWVotingAddress(&_DitDemoCoordinator.CallOpts)
- }
- // KNWVotingAddress is a free data retrieval call binding the contract method 0xeb49fe94.
- //
- // Solidity: function KNWVotingAddress() constant returns(address)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) KNWVotingAddress() (common.Address, error) {
- return _DitDemoCoordinator.Contract.KNWVotingAddress(&_DitDemoCoordinator.CallOpts)
- }
- // GetCurrentProposalID is a free data retrieval call binding the contract method 0x0bdc90e8.
- //
- // Solidity: function getCurrentProposalID(bytes32 _repository) constant returns(uint256)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) GetCurrentProposalID(opts *bind.CallOpts, _repository [32]byte) (*big.Int, error) {
- var (
- ret0 = new(*big.Int)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "getCurrentProposalID", _repository)
- return *ret0, err
- }
- // GetCurrentProposalID is a free data retrieval call binding the contract method 0x0bdc90e8.
- //
- // Solidity: function getCurrentProposalID(bytes32 _repository) constant returns(uint256)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) GetCurrentProposalID(_repository [32]byte) (*big.Int, error) {
- return _DitDemoCoordinator.Contract.GetCurrentProposalID(&_DitDemoCoordinator.CallOpts, _repository)
- }
- // GetCurrentProposalID is a free data retrieval call binding the contract method 0x0bdc90e8.
- //
- // Solidity: function getCurrentProposalID(bytes32 _repository) constant returns(uint256)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) GetCurrentProposalID(_repository [32]byte) (*big.Int, error) {
- return _DitDemoCoordinator.Contract.GetCurrentProposalID(&_DitDemoCoordinator.CallOpts, _repository)
- }
- // GetIndividualStake is a free data retrieval call binding the contract method 0x552edc9d.
- //
- // Solidity: function getIndividualStake(bytes32 _repository, uint256 _proposalID) constant returns(uint256 individualStake)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) GetIndividualStake(opts *bind.CallOpts, _repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
- var (
- ret0 = new(*big.Int)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "getIndividualStake", _repository, _proposalID)
- return *ret0, err
- }
- // GetIndividualStake is a free data retrieval call binding the contract method 0x552edc9d.
- //
- // Solidity: function getIndividualStake(bytes32 _repository, uint256 _proposalID) constant returns(uint256 individualStake)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) GetIndividualStake(_repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
- return _DitDemoCoordinator.Contract.GetIndividualStake(&_DitDemoCoordinator.CallOpts, _repository, _proposalID)
- }
- // GetIndividualStake is a free data retrieval call binding the contract method 0x552edc9d.
- //
- // Solidity: function getIndividualStake(bytes32 _repository, uint256 _proposalID) constant returns(uint256 individualStake)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) GetIndividualStake(_repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
- return _DitDemoCoordinator.Contract.GetIndividualStake(&_DitDemoCoordinator.CallOpts, _repository, _proposalID)
- }
- // GetKNWVoteIDFromProposalID is a free data retrieval call binding the contract method 0x06ee4596.
- //
- // Solidity: function getKNWVoteIDFromProposalID(bytes32 _repository, uint256 _proposalID) constant returns(uint256)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) GetKNWVoteIDFromProposalID(opts *bind.CallOpts, _repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
- var (
- ret0 = new(*big.Int)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "getKNWVoteIDFromProposalID", _repository, _proposalID)
- return *ret0, err
- }
- // GetKNWVoteIDFromProposalID is a free data retrieval call binding the contract method 0x06ee4596.
- //
- // Solidity: function getKNWVoteIDFromProposalID(bytes32 _repository, uint256 _proposalID) constant returns(uint256)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) GetKNWVoteIDFromProposalID(_repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
- return _DitDemoCoordinator.Contract.GetKNWVoteIDFromProposalID(&_DitDemoCoordinator.CallOpts, _repository, _proposalID)
- }
- // GetKNWVoteIDFromProposalID is a free data retrieval call binding the contract method 0x06ee4596.
- //
- // Solidity: function getKNWVoteIDFromProposalID(bytes32 _repository, uint256 _proposalID) constant returns(uint256)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) GetKNWVoteIDFromProposalID(_repository [32]byte, _proposalID *big.Int) (*big.Int, error) {
- return _DitDemoCoordinator.Contract.GetKNWVoteIDFromProposalID(&_DitDemoCoordinator.CallOpts, _repository, _proposalID)
- }
- // GetKnowledgeLabels is a free data retrieval call binding the contract method 0x95332229.
- //
- // Solidity: function getKnowledgeLabels(bytes32 _repository, uint256 _knowledgeLabelID) constant returns(string knowledgeLabel)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) GetKnowledgeLabels(opts *bind.CallOpts, _repository [32]byte, _knowledgeLabelID *big.Int) (string, error) {
- var (
- ret0 = new(string)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "getKnowledgeLabels", _repository, _knowledgeLabelID)
- return *ret0, err
- }
- // GetKnowledgeLabels is a free data retrieval call binding the contract method 0x95332229.
- //
- // Solidity: function getKnowledgeLabels(bytes32 _repository, uint256 _knowledgeLabelID) constant returns(string knowledgeLabel)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) GetKnowledgeLabels(_repository [32]byte, _knowledgeLabelID *big.Int) (string, error) {
- return _DitDemoCoordinator.Contract.GetKnowledgeLabels(&_DitDemoCoordinator.CallOpts, _repository, _knowledgeLabelID)
- }
- // GetKnowledgeLabels is a free data retrieval call binding the contract method 0x95332229.
- //
- // Solidity: function getKnowledgeLabels(bytes32 _repository, uint256 _knowledgeLabelID) constant returns(string knowledgeLabel)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) GetKnowledgeLabels(_repository [32]byte, _knowledgeLabelID *big.Int) (string, error) {
- return _DitDemoCoordinator.Contract.GetKnowledgeLabels(&_DitDemoCoordinator.CallOpts, _repository, _knowledgeLabelID)
- }
- // IsKYCValidator is a free data retrieval call binding the contract method 0x1341f25c.
- //
- // Solidity: function isKYCValidator(address ) constant returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) IsKYCValidator(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
- var (
- ret0 = new(bool)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "isKYCValidator", arg0)
- return *ret0, err
- }
- // IsKYCValidator is a free data retrieval call binding the contract method 0x1341f25c.
- //
- // Solidity: function isKYCValidator(address ) constant returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) IsKYCValidator(arg0 common.Address) (bool, error) {
- return _DitDemoCoordinator.Contract.IsKYCValidator(&_DitDemoCoordinator.CallOpts, arg0)
- }
- // IsKYCValidator is a free data retrieval call binding the contract method 0x1341f25c.
- //
- // Solidity: function isKYCValidator(address ) constant returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) IsKYCValidator(arg0 common.Address) (bool, error) {
- return _DitDemoCoordinator.Contract.IsKYCValidator(&_DitDemoCoordinator.CallOpts, arg0)
- }
- // PassedKYC is a free data retrieval call binding the contract method 0xccd9aa68.
- //
- // Solidity: function passedKYC(address ) constant returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) PassedKYC(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
- var (
- ret0 = new(bool)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "passedKYC", arg0)
- return *ret0, err
- }
- // PassedKYC is a free data retrieval call binding the contract method 0xccd9aa68.
- //
- // Solidity: function passedKYC(address ) constant returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) PassedKYC(arg0 common.Address) (bool, error) {
- return _DitDemoCoordinator.Contract.PassedKYC(&_DitDemoCoordinator.CallOpts, arg0)
- }
- // PassedKYC is a free data retrieval call binding the contract method 0xccd9aa68.
- //
- // Solidity: function passedKYC(address ) constant returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) PassedKYC(arg0 common.Address) (bool, error) {
- return _DitDemoCoordinator.Contract.PassedKYC(&_DitDemoCoordinator.CallOpts, arg0)
- }
- // ProposalHasPassed is a free data retrieval call binding the contract method 0x87c9203d.
- //
- // Solidity: function proposalHasPassed(bytes32 _repository, uint256 _proposalID) constant returns(bool hasPassed)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) ProposalHasPassed(opts *bind.CallOpts, _repository [32]byte, _proposalID *big.Int) (bool, error) {
- var (
- ret0 = new(bool)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "proposalHasPassed", _repository, _proposalID)
- return *ret0, err
- }
- // ProposalHasPassed is a free data retrieval call binding the contract method 0x87c9203d.
- //
- // Solidity: function proposalHasPassed(bytes32 _repository, uint256 _proposalID) constant returns(bool hasPassed)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) ProposalHasPassed(_repository [32]byte, _proposalID *big.Int) (bool, error) {
- return _DitDemoCoordinator.Contract.ProposalHasPassed(&_DitDemoCoordinator.CallOpts, _repository, _proposalID)
- }
- // ProposalHasPassed is a free data retrieval call binding the contract method 0x87c9203d.
- //
- // Solidity: function proposalHasPassed(bytes32 _repository, uint256 _proposalID) constant returns(bool hasPassed)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) ProposalHasPassed(_repository [32]byte, _proposalID *big.Int) (bool, error) {
- return _DitDemoCoordinator.Contract.ProposalHasPassed(&_DitDemoCoordinator.CallOpts, _repository, _proposalID)
- }
- // ProposalsOfRepository is a free data retrieval call binding the contract method 0x3e029f63.
- //
- // Solidity: function proposalsOfRepository(bytes32 , uint256 ) constant returns(uint256 KNWVoteID, string knowledgeLabel, address proposer, bool isFinalized, bool proposalAccepted, uint256 individualStake, uint256 totalStake)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) ProposalsOfRepository(opts *bind.CallOpts, arg0 [32]byte, arg1 *big.Int) (struct {
- KNWVoteID *big.Int
- KnowledgeLabel string
- Proposer common.Address
- IsFinalized bool
- ProposalAccepted bool
- IndividualStake *big.Int
- TotalStake *big.Int
- }, error) {
- ret := new(struct {
- KNWVoteID *big.Int
- KnowledgeLabel string
- Proposer common.Address
- IsFinalized bool
- ProposalAccepted bool
- IndividualStake *big.Int
- TotalStake *big.Int
- })
- out := ret
- err := _DitDemoCoordinator.contract.Call(opts, out, "proposalsOfRepository", arg0, arg1)
- return *ret, err
- }
- // ProposalsOfRepository is a free data retrieval call binding the contract method 0x3e029f63.
- //
- // Solidity: function proposalsOfRepository(bytes32 , uint256 ) constant returns(uint256 KNWVoteID, string knowledgeLabel, address proposer, bool isFinalized, bool proposalAccepted, uint256 individualStake, uint256 totalStake)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) ProposalsOfRepository(arg0 [32]byte, arg1 *big.Int) (struct {
- KNWVoteID *big.Int
- KnowledgeLabel string
- Proposer common.Address
- IsFinalized bool
- ProposalAccepted bool
- IndividualStake *big.Int
- TotalStake *big.Int
- }, error) {
- return _DitDemoCoordinator.Contract.ProposalsOfRepository(&_DitDemoCoordinator.CallOpts, arg0, arg1)
- }
- // ProposalsOfRepository is a free data retrieval call binding the contract method 0x3e029f63.
- //
- // Solidity: function proposalsOfRepository(bytes32 , uint256 ) constant returns(uint256 KNWVoteID, string knowledgeLabel, address proposer, bool isFinalized, bool proposalAccepted, uint256 individualStake, uint256 totalStake)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) ProposalsOfRepository(arg0 [32]byte, arg1 *big.Int) (struct {
- KNWVoteID *big.Int
- KnowledgeLabel string
- Proposer common.Address
- IsFinalized bool
- ProposalAccepted bool
- IndividualStake *big.Int
- TotalStake *big.Int
- }, error) {
- return _DitDemoCoordinator.Contract.ProposalsOfRepository(&_DitDemoCoordinator.CallOpts, arg0, arg1)
- }
- // Repositories is a free data retrieval call binding the contract method 0x1f51fd71.
- //
- // Solidity: function repositories(bytes32 ) constant returns(uint256 votingMajority, uint256 mintingMethod, uint256 burningMethod, uint256 currentProposalID, uint256 minVoteCommitDuration, uint256 maxVoteCommitDuration, uint256 minVoteOpenDuration, uint256 maxVoteOpenDuration)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) Repositories(opts *bind.CallOpts, arg0 [32]byte) (struct {
- VotingMajority *big.Int
- MintingMethod *big.Int
- BurningMethod *big.Int
- CurrentProposalID *big.Int
- MinVoteCommitDuration *big.Int
- MaxVoteCommitDuration *big.Int
- MinVoteOpenDuration *big.Int
- MaxVoteOpenDuration *big.Int
- }, error) {
- ret := new(struct {
- VotingMajority *big.Int
- MintingMethod *big.Int
- BurningMethod *big.Int
- CurrentProposalID *big.Int
- MinVoteCommitDuration *big.Int
- MaxVoteCommitDuration *big.Int
- MinVoteOpenDuration *big.Int
- MaxVoteOpenDuration *big.Int
- })
- out := ret
- err := _DitDemoCoordinator.contract.Call(opts, out, "repositories", arg0)
- return *ret, err
- }
- // Repositories is a free data retrieval call binding the contract method 0x1f51fd71.
- //
- // Solidity: function repositories(bytes32 ) constant returns(uint256 votingMajority, uint256 mintingMethod, uint256 burningMethod, uint256 currentProposalID, uint256 minVoteCommitDuration, uint256 maxVoteCommitDuration, uint256 minVoteOpenDuration, uint256 maxVoteOpenDuration)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) Repositories(arg0 [32]byte) (struct {
- VotingMajority *big.Int
- MintingMethod *big.Int
- BurningMethod *big.Int
- CurrentProposalID *big.Int
- MinVoteCommitDuration *big.Int
- MaxVoteCommitDuration *big.Int
- MinVoteOpenDuration *big.Int
- MaxVoteOpenDuration *big.Int
- }, error) {
- return _DitDemoCoordinator.Contract.Repositories(&_DitDemoCoordinator.CallOpts, arg0)
- }
- // Repositories is a free data retrieval call binding the contract method 0x1f51fd71.
- //
- // Solidity: function repositories(bytes32 ) constant returns(uint256 votingMajority, uint256 mintingMethod, uint256 burningMethod, uint256 currentProposalID, uint256 minVoteCommitDuration, uint256 maxVoteCommitDuration, uint256 minVoteOpenDuration, uint256 maxVoteOpenDuration)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) Repositories(arg0 [32]byte) (struct {
- VotingMajority *big.Int
- MintingMethod *big.Int
- BurningMethod *big.Int
- CurrentProposalID *big.Int
- MinVoteCommitDuration *big.Int
- MaxVoteCommitDuration *big.Int
- MinVoteOpenDuration *big.Int
- MaxVoteOpenDuration *big.Int
- }, error) {
- return _DitDemoCoordinator.Contract.Repositories(&_DitDemoCoordinator.CallOpts, arg0)
- }
- // RepositoryIsInitialized is a free data retrieval call binding the contract method 0xea6c6d0f.
- //
- // Solidity: function repositoryIsInitialized(bytes32 _repository) constant returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) RepositoryIsInitialized(opts *bind.CallOpts, _repository [32]byte) (bool, error) {
- var (
- ret0 = new(bool)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "repositoryIsInitialized", _repository)
- return *ret0, err
- }
- // RepositoryIsInitialized is a free data retrieval call binding the contract method 0xea6c6d0f.
- //
- // Solidity: function repositoryIsInitialized(bytes32 _repository) constant returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) RepositoryIsInitialized(_repository [32]byte) (bool, error) {
- return _DitDemoCoordinator.Contract.RepositoryIsInitialized(&_DitDemoCoordinator.CallOpts, _repository)
- }
- // RepositoryIsInitialized is a free data retrieval call binding the contract method 0xea6c6d0f.
- //
- // Solidity: function repositoryIsInitialized(bytes32 _repository) constant returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) RepositoryIsInitialized(_repository [32]byte) (bool, error) {
- return _DitDemoCoordinator.Contract.RepositoryIsInitialized(&_DitDemoCoordinator.CallOpts, _repository)
- }
- // XDitTokenAddress is a free data retrieval call binding the contract method 0xce83732e.
- //
- // Solidity: function xDitTokenAddress() constant returns(address)
- func (_DitDemoCoordinator *DitDemoCoordinatorCaller) XDitTokenAddress(opts *bind.CallOpts) (common.Address, error) {
- var (
- ret0 = new(common.Address)
- )
- out := ret0
- err := _DitDemoCoordinator.contract.Call(opts, out, "xDitTokenAddress")
- return *ret0, err
- }
- // XDitTokenAddress is a free data retrieval call binding the contract method 0xce83732e.
- //
- // Solidity: function xDitTokenAddress() constant returns(address)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) XDitTokenAddress() (common.Address, error) {
- return _DitDemoCoordinator.Contract.XDitTokenAddress(&_DitDemoCoordinator.CallOpts)
- }
- // XDitTokenAddress is a free data retrieval call binding the contract method 0xce83732e.
- //
- // Solidity: function xDitTokenAddress() constant returns(address)
- func (_DitDemoCoordinator *DitDemoCoordinatorCallerSession) XDitTokenAddress() (common.Address, error) {
- return _DitDemoCoordinator.Contract.XDitTokenAddress(&_DitDemoCoordinator.CallOpts)
- }
- // AddKYCValidator is a paid mutator transaction binding the contract method 0xd0c397ef.
- //
- // Solidity: function addKYCValidator(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactor) AddKYCValidator(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.contract.Transact(opts, "addKYCValidator", _address)
- }
- // AddKYCValidator is a paid mutator transaction binding the contract method 0xd0c397ef.
- //
- // Solidity: function addKYCValidator(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) AddKYCValidator(_address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.AddKYCValidator(&_DitDemoCoordinator.TransactOpts, _address)
- }
- // AddKYCValidator is a paid mutator transaction binding the contract method 0xd0c397ef.
- //
- // Solidity: function addKYCValidator(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorSession) AddKYCValidator(_address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.AddKYCValidator(&_DitDemoCoordinator.TransactOpts, _address)
- }
- // FinalizeVote is a paid mutator transaction binding the contract method 0x2e71d0fb.
- //
- // Solidity: function finalizeVote(bytes32 _repository, uint256 _proposalID) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactor) FinalizeVote(opts *bind.TransactOpts, _repository [32]byte, _proposalID *big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.contract.Transact(opts, "finalizeVote", _repository, _proposalID)
- }
- // FinalizeVote is a paid mutator transaction binding the contract method 0x2e71d0fb.
- //
- // Solidity: function finalizeVote(bytes32 _repository, uint256 _proposalID) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) FinalizeVote(_repository [32]byte, _proposalID *big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.FinalizeVote(&_DitDemoCoordinator.TransactOpts, _repository, _proposalID)
- }
- // FinalizeVote is a paid mutator transaction binding the contract method 0x2e71d0fb.
- //
- // Solidity: function finalizeVote(bytes32 _repository, uint256 _proposalID) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorSession) FinalizeVote(_repository [32]byte, _proposalID *big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.FinalizeVote(&_DitDemoCoordinator.TransactOpts, _repository, _proposalID)
- }
- // InitRepository is a paid mutator transaction binding the contract method 0x51f43c24.
- //
- // Solidity: function initRepository(bytes32 _repository, string _label1, string _label2, string _label3, uint256[7] _voteSettings) returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactor) InitRepository(opts *bind.TransactOpts, _repository [32]byte, _label1 string, _label2 string, _label3 string, _voteSettings [7]*big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.contract.Transact(opts, "initRepository", _repository, _label1, _label2, _label3, _voteSettings)
- }
- // InitRepository is a paid mutator transaction binding the contract method 0x51f43c24.
- //
- // Solidity: function initRepository(bytes32 _repository, string _label1, string _label2, string _label3, uint256[7] _voteSettings) returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) InitRepository(_repository [32]byte, _label1 string, _label2 string, _label3 string, _voteSettings [7]*big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.InitRepository(&_DitDemoCoordinator.TransactOpts, _repository, _label1, _label2, _label3, _voteSettings)
- }
- // InitRepository is a paid mutator transaction binding the contract method 0x51f43c24.
- //
- // Solidity: function initRepository(bytes32 _repository, string _label1, string _label2, string _label3, uint256[7] _voteSettings) returns(bool)
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorSession) InitRepository(_repository [32]byte, _label1 string, _label2 string, _label3 string, _voteSettings [7]*big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.InitRepository(&_DitDemoCoordinator.TransactOpts, _repository, _label1, _label2, _label3, _voteSettings)
- }
- // OpenVoteOnProposal is a paid mutator transaction binding the contract method 0x0ee62ec0.
- //
- // Solidity: function openVoteOnProposal(bytes32 _repository, uint256 _proposalID, uint256 _voteOption, uint256 _voteSalt) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactor) OpenVoteOnProposal(opts *bind.TransactOpts, _repository [32]byte, _proposalID *big.Int, _voteOption *big.Int, _voteSalt *big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.contract.Transact(opts, "openVoteOnProposal", _repository, _proposalID, _voteOption, _voteSalt)
- }
- // OpenVoteOnProposal is a paid mutator transaction binding the contract method 0x0ee62ec0.
- //
- // Solidity: function openVoteOnProposal(bytes32 _repository, uint256 _proposalID, uint256 _voteOption, uint256 _voteSalt) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) OpenVoteOnProposal(_repository [32]byte, _proposalID *big.Int, _voteOption *big.Int, _voteSalt *big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.OpenVoteOnProposal(&_DitDemoCoordinator.TransactOpts, _repository, _proposalID, _voteOption, _voteSalt)
- }
- // OpenVoteOnProposal is a paid mutator transaction binding the contract method 0x0ee62ec0.
- //
- // Solidity: function openVoteOnProposal(bytes32 _repository, uint256 _proposalID, uint256 _voteOption, uint256 _voteSalt) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorSession) OpenVoteOnProposal(_repository [32]byte, _proposalID *big.Int, _voteOption *big.Int, _voteSalt *big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.OpenVoteOnProposal(&_DitDemoCoordinator.TransactOpts, _repository, _proposalID, _voteOption, _voteSalt)
- }
- // PassKYC is a paid mutator transaction binding the contract method 0xeb931024.
- //
- // Solidity: function passKYC(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactor) PassKYC(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.contract.Transact(opts, "passKYC", _address)
- }
- // PassKYC is a paid mutator transaction binding the contract method 0xeb931024.
- //
- // Solidity: function passKYC(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) PassKYC(_address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.PassKYC(&_DitDemoCoordinator.TransactOpts, _address)
- }
- // PassKYC is a paid mutator transaction binding the contract method 0xeb931024.
- //
- // Solidity: function passKYC(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorSession) PassKYC(_address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.PassKYC(&_DitDemoCoordinator.TransactOpts, _address)
- }
- // ProposeCommit is a paid mutator transaction binding the contract method 0xbef7a4da.
- //
- // Solidity: function proposeCommit(bytes32 _repository, uint256 _knowledgeLabelIndex, uint256 _voteCommitDuration, uint256 _voteOpenDuration, uint256 _amountOfTokens) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactor) ProposeCommit(opts *bind.TransactOpts, _repository [32]byte, _knowledgeLabelIndex *big.Int, _voteCommitDuration *big.Int, _voteOpenDuration *big.Int, _amountOfTokens *big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.contract.Transact(opts, "proposeCommit", _repository, _knowledgeLabelIndex, _voteCommitDuration, _voteOpenDuration, _amountOfTokens)
- }
- // ProposeCommit is a paid mutator transaction binding the contract method 0xbef7a4da.
- //
- // Solidity: function proposeCommit(bytes32 _repository, uint256 _knowledgeLabelIndex, uint256 _voteCommitDuration, uint256 _voteOpenDuration, uint256 _amountOfTokens) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) ProposeCommit(_repository [32]byte, _knowledgeLabelIndex *big.Int, _voteCommitDuration *big.Int, _voteOpenDuration *big.Int, _amountOfTokens *big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.ProposeCommit(&_DitDemoCoordinator.TransactOpts, _repository, _knowledgeLabelIndex, _voteCommitDuration, _voteOpenDuration, _amountOfTokens)
- }
- // ProposeCommit is a paid mutator transaction binding the contract method 0xbef7a4da.
- //
- // Solidity: function proposeCommit(bytes32 _repository, uint256 _knowledgeLabelIndex, uint256 _voteCommitDuration, uint256 _voteOpenDuration, uint256 _amountOfTokens) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorSession) ProposeCommit(_repository [32]byte, _knowledgeLabelIndex *big.Int, _voteCommitDuration *big.Int, _voteOpenDuration *big.Int, _amountOfTokens *big.Int) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.ProposeCommit(&_DitDemoCoordinator.TransactOpts, _repository, _knowledgeLabelIndex, _voteCommitDuration, _voteOpenDuration, _amountOfTokens)
- }
- // RemoveKYCValidator is a paid mutator transaction binding the contract method 0x73b0dddd.
- //
- // Solidity: function removeKYCValidator(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactor) RemoveKYCValidator(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.contract.Transact(opts, "removeKYCValidator", _address)
- }
- // RemoveKYCValidator is a paid mutator transaction binding the contract method 0x73b0dddd.
- //
- // Solidity: function removeKYCValidator(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) RemoveKYCValidator(_address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.RemoveKYCValidator(&_DitDemoCoordinator.TransactOpts, _address)
- }
- // RemoveKYCValidator is a paid mutator transaction binding the contract method 0x73b0dddd.
- //
- // Solidity: function removeKYCValidator(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorSession) RemoveKYCValidator(_address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.RemoveKYCValidator(&_DitDemoCoordinator.TransactOpts, _address)
- }
- // RevokeKYC is a paid mutator transaction binding the contract method 0x39ba645b.
- //
- // Solidity: function revokeKYC(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactor) RevokeKYC(opts *bind.TransactOpts, _address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.contract.Transact(opts, "revokeKYC", _address)
- }
- // RevokeKYC is a paid mutator transaction binding the contract method 0x39ba645b.
- //
- // Solidity: function revokeKYC(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) RevokeKYC(_address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.RevokeKYC(&_DitDemoCoordinator.TransactOpts, _address)
- }
- // RevokeKYC is a paid mutator transaction binding the contract method 0x39ba645b.
- //
- // Solidity: function revokeKYC(address _address) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorSession) RevokeKYC(_address common.Address) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.RevokeKYC(&_DitDemoCoordinator.TransactOpts, _address)
- }
- // VoteOnProposal is a paid mutator transaction binding the contract method 0xa34c299a.
- //
- // Solidity: function voteOnProposal(bytes32 _repository, uint256 _proposalID, bytes32 _voteHash) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactor) VoteOnProposal(opts *bind.TransactOpts, _repository [32]byte, _proposalID *big.Int, _voteHash [32]byte) (*types.Transaction, error) {
- return _DitDemoCoordinator.contract.Transact(opts, "voteOnProposal", _repository, _proposalID, _voteHash)
- }
- // VoteOnProposal is a paid mutator transaction binding the contract method 0xa34c299a.
- //
- // Solidity: function voteOnProposal(bytes32 _repository, uint256 _proposalID, bytes32 _voteHash) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorSession) VoteOnProposal(_repository [32]byte, _proposalID *big.Int, _voteHash [32]byte) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.VoteOnProposal(&_DitDemoCoordinator.TransactOpts, _repository, _proposalID, _voteHash)
- }
- // VoteOnProposal is a paid mutator transaction binding the contract method 0xa34c299a.
- //
- // Solidity: function voteOnProposal(bytes32 _repository, uint256 _proposalID, bytes32 _voteHash) returns()
- func (_DitDemoCoordinator *DitDemoCoordinatorTransactorSession) VoteOnProposal(_repository [32]byte, _proposalID *big.Int, _voteHash [32]byte) (*types.Transaction, error) {
- return _DitDemoCoordinator.Contract.VoteOnProposal(&_DitDemoCoordinator.TransactOpts, _repository, _proposalID, _voteHash)
- }
- // DitDemoCoordinatorCommitVoteIterator is returned from FilterCommitVote and is used to iterate over the raw logs and unpacked data for CommitVote events raised by the DitDemoCoordinator contract.
- type DitDemoCoordinatorCommitVoteIterator struct {
- Event *DitDemoCoordinatorCommitVote // Event containing the contract specifics and raw log
- contract *bind.BoundContract // Generic contract to use for unpacking event data
- event string // Event name to use for unpacking event data
- logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
- done bool // Whether the subscription completed delivering logs
- fail error // Occurred error to stop iteration
- }
- // Next advances the iterator to the subsequent event, returning whether there
- // are any more events found. In case of a retrieval or parsing error, false is
- // returned and Error() can be queried for the exact failure.
- func (it *DitDemoCoordinatorCommitVoteIterator) Next() bool {
- // If the iterator failed, stop iterating
- if it.fail != nil {
- return false
- }
- // If the iterator completed, deliver directly whatever's available
- if it.done {
- select {
- case log := <-it.logs:
- it.Event = new(DitDemoCoordinatorCommitVote)
- if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
- it.fail = err
- return false
- }
- it.Event.Raw = log
- return true
- default:
- return false
- }
- }
- // Iterator still in progress, wait for either a data or an error event
- select {
- case log := <-it.logs:
- it.Event = new(DitDemoCoordinatorCommitVote)
- if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
- it.fail = err
- return false
- }
- it.Event.Raw = log
- return true
- case err := <-it.sub.Err():
- it.done = true
- it.fail = err
- return it.Next()
- }
- }
- // Error returns any retrieval or parsing error occurred during filtering.
- func (it *DitDemoCoordinatorCommitVoteIterator) Error() error {
- return it.fail
- }
- // Close terminates the iteration process, releasing any pending underlying
- // resources.
- func (it *DitDemoCoordinatorCommitVoteIterator) Close() error {
- it.sub.Unsubscribe()
- return nil
- }
- // DitDemoCoordinatorCommitVote represents a CommitVote event raised by the DitDemoCoordinator contract.
- type DitDemoCoordinatorCommitVote struct {
- Repository [32]byte
- Proposal *big.Int
- Who common.Address
- Label string
- Stake *big.Int
- NumberOfVotes *big.Int
- Raw types.Log // Blockchain specific contextual infos
- }
- // FilterCommitVote is a free log retrieval operation binding the contract event 0xa01eea487bb3ec75528c167ccf90452d4164ddda7b13c55b2a89751a8dc5fbc1.
- //
- // Solidity: event CommitVote(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label, uint256 stake, uint256 numberOfVotes)
- func (_DitDemoCoordinator *DitDemoCoordinatorFilterer) FilterCommitVote(opts *bind.FilterOpts, repository [][32]byte, proposal []*big.Int, who []common.Address) (*DitDemoCoordinatorCommitVoteIterator, error) {
- var repositoryRule []interface{}
- for _, repositoryItem := range repository {
- repositoryRule = append(repositoryRule, repositoryItem)
- }
- var proposalRule []interface{}
- for _, proposalItem := range proposal {
- proposalRule = append(proposalRule, proposalItem)
- }
- var whoRule []interface{}
- for _, whoItem := range who {
- whoRule = append(whoRule, whoItem)
- }
- logs, sub, err := _DitDemoCoordinator.contract.FilterLogs(opts, "CommitVote", repositoryRule, proposalRule, whoRule)
- if err != nil {
- return nil, err
- }
- return &DitDemoCoordinatorCommitVoteIterator{contract: _DitDemoCoordinator.contract, event: "CommitVote", logs: logs, sub: sub}, nil
- }
- // WatchCommitVote is a free log subscription operation binding the contract event 0xa01eea487bb3ec75528c167ccf90452d4164ddda7b13c55b2a89751a8dc5fbc1.
- //
- // Solidity: event CommitVote(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label, uint256 stake, uint256 numberOfVotes)
- func (_DitDemoCoordinator *DitDemoCoordinatorFilterer) WatchCommitVote(opts *bind.WatchOpts, sink chan<- *DitDemoCoordinatorCommitVote, repository [][32]byte, proposal []*big.Int, who []common.Address) (event.Subscription, error) {
- var repositoryRule []interface{}
- for _, repositoryItem := range repository {
- repositoryRule = append(repositoryRule, repositoryItem)
- }
- var proposalRule []interface{}
- for _, proposalItem := range proposal {
- proposalRule = append(proposalRule, proposalItem)
- }
- var whoRule []interface{}
- for _, whoItem := range who {
- whoRule = append(whoRule, whoItem)
- }
- logs, sub, err := _DitDemoCoordinator.contract.WatchLogs(opts, "CommitVote", repositoryRule, proposalRule, whoRule)
- if err != nil {
- return nil, err
- }
- return event.NewSubscription(func(quit <-chan struct{}) error {
- defer sub.Unsubscribe()
- for {
- select {
- case log := <-logs:
- // New log arrived, parse the event and forward to the user
- event := new(DitDemoCoordinatorCommitVote)
- if err := _DitDemoCoordinator.contract.UnpackLog(event, "CommitVote", log); err != nil {
- return err
- }
- event.Raw = log
- select {
- case sink <- event:
- case err := <-sub.Err():
- return err
- case <-quit:
- return nil
- }
- case err := <-sub.Err():
- return err
- case <-quit:
- return nil
- }
- }
- }), nil
- }
- // DitDemoCoordinatorFinalizeVoteIterator is returned from FilterFinalizeVote and is used to iterate over the raw logs and unpacked data for FinalizeVote events raised by the DitDemoCoordinator contract.
- type DitDemoCoordinatorFinalizeVoteIterator struct {
- Event *DitDemoCoordinatorFinalizeVote // Event containing the contract specifics and raw log
- contract *bind.BoundContract // Generic contract to use for unpacking event data
- event string // Event name to use for unpacking event data
- logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
- done bool // Whether the subscription completed delivering logs
- fail error // Occurred error to stop iteration
- }
- // Next advances the iterator to the subsequent event, returning whether there
- // are any more events found. In case of a retrieval or parsing error, false is
- // returned and Error() can be queried for the exact failure.
- func (it *DitDemoCoordinatorFinalizeVoteIterator) Next() bool {
- // If the iterator failed, stop iterating
- if it.fail != nil {
- return false
- }
- // If the iterator completed, deliver directly whatever's available
- if it.done {
- select {
- case log := <-it.logs:
- it.Event = new(DitDemoCoordinatorFinalizeVote)
- if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
- it.fail = err
- return false
- }
- it.Event.Raw = log
- return true
- default:
- return false
- }
- }
- // Iterator still in progress, wait for either a data or an error event
- select {
- case log := <-it.logs:
- it.Event = new(DitDemoCoordinatorFinalizeVote)
- if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
- it.fail = err
- return false
- }
- it.Event.Raw = log
- return true
- case err := <-it.sub.Err():
- it.done = true
- it.fail = err
- return it.Next()
- }
- }
- // Error returns any retrieval or parsing error occurred during filtering.
- func (it *DitDemoCoordinatorFinalizeVoteIterator) Error() error {
- return it.fail
- }
- // Close terminates the iteration process, releasing any pending underlying
- // resources.
- func (it *DitDemoCoordinatorFinalizeVoteIterator) Close() error {
- it.sub.Unsubscribe()
- return nil
- }
- // DitDemoCoordinatorFinalizeVote represents a FinalizeVote event raised by the DitDemoCoordinator contract.
- type DitDemoCoordinatorFinalizeVote struct {
- Repository [32]byte
- Proposal *big.Int
- Label string
- Accepted bool
- Raw types.Log // Blockchain specific contextual infos
- }
- // FilterFinalizeVote is a free log retrieval operation binding the contract event 0x6bd2699645e0f6c5547bdf0d053280e48fef1ab21514bd02c88610b1279b942a.
- //
- // Solidity: event FinalizeVote(bytes32 indexed repository, uint256 indexed proposal, string label, bool accepted)
- func (_DitDemoCoordinator *DitDemoCoordinatorFilterer) FilterFinalizeVote(opts *bind.FilterOpts, repository [][32]byte, proposal []*big.Int) (*DitDemoCoordinatorFinalizeVoteIterator, error) {
- var repositoryRule []interface{}
- for _, repositoryItem := range repository {
- repositoryRule = append(repositoryRule, repositoryItem)
- }
- var proposalRule []interface{}
- for _, proposalItem := range proposal {
- proposalRule = append(proposalRule, proposalItem)
- }
- logs, sub, err := _DitDemoCoordinator.contract.FilterLogs(opts, "FinalizeVote", repositoryRule, proposalRule)
- if err != nil {
- return nil, err
- }
- return &DitDemoCoordinatorFinalizeVoteIterator{contract: _DitDemoCoordinator.contract, event: "FinalizeVote", logs: logs, sub: sub}, nil
- }
- // WatchFinalizeVote is a free log subscription operation binding the contract event 0x6bd2699645e0f6c5547bdf0d053280e48fef1ab21514bd02c88610b1279b942a.
- //
- // Solidity: event FinalizeVote(bytes32 indexed repository, uint256 indexed proposal, string label, bool accepted)
- func (_DitDemoCoordinator *DitDemoCoordinatorFilterer) WatchFinalizeVote(opts *bind.WatchOpts, sink chan<- *DitDemoCoordinatorFinalizeVote, repository [][32]byte, proposal []*big.Int) (event.Subscription, error) {
- var repositoryRule []interface{}
- for _, repositoryItem := range repository {
- repositoryRule = append(repositoryRule, repositoryItem)
- }
- var proposalRule []interface{}
- for _, proposalItem := range proposal {
- proposalRule = append(proposalRule, proposalItem)
- }
- logs, sub, err := _DitDemoCoordinator.contract.WatchLogs(opts, "FinalizeVote", repositoryRule, proposalRule)
- if err != nil {
- return nil, err
- }
- return event.NewSubscription(func(quit <-chan struct{}) error {
- defer sub.Unsubscribe()
- for {
- select {
- case log := <-logs:
- // New log arrived, parse the event and forward to the user
- event := new(DitDemoCoordinatorFinalizeVote)
- if err := _DitDemoCoordinator.contract.UnpackLog(event, "FinalizeVote", log); err != nil {
- return err
- }
- event.Raw = log
- select {
- case sink <- event:
- case err := <-sub.Err():
- return err
- case <-quit:
- return nil
- }
- case err := <-sub.Err():
- return err
- case <-quit:
- return nil
- }
- }
- }), nil
- }
- // DitDemoCoordinatorOpenVoteIterator is returned from FilterOpenVote and is used to iterate over the raw logs and unpacked data for OpenVote events raised by the DitDemoCoordinator contract.
- type DitDemoCoordinatorOpenVoteIterator struct {
- Event *DitDemoCoordinatorOpenVote // Event containing the contract specifics and raw log
- contract *bind.BoundContract // Generic contract to use for unpacking event data
- event string // Event name to use for unpacking event data
- logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
- done bool // Whether the subscription completed delivering logs
- fail error // Occurred error to stop iteration
- }
- // Next advances the iterator to the subsequent event, returning whether there
- // are any more events found. In case of a retrieval or parsing error, false is
- // returned and Error() can be queried for the exact failure.
- func (it *DitDemoCoordinatorOpenVoteIterator) Next() bool {
- // If the iterator failed, stop iterating
- if it.fail != nil {
- return false
- }
- // If the iterator completed, deliver directly whatever's available
- if it.done {
- select {
- case log := <-it.logs:
- it.Event = new(DitDemoCoordinatorOpenVote)
- if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
- it.fail = err
- return false
- }
- it.Event.Raw = log
- return true
- default:
- return false
- }
- }
- // Iterator still in progress, wait for either a data or an error event
- select {
- case log := <-it.logs:
- it.Event = new(DitDemoCoordinatorOpenVote)
- if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
- it.fail = err
- return false
- }
- it.Event.Raw = log
- return true
- case err := <-it.sub.Err():
- it.done = true
- it.fail = err
- return it.Next()
- }
- }
- // Error returns any retrieval or parsing error occurred during filtering.
- func (it *DitDemoCoordinatorOpenVoteIterator) Error() error {
- return it.fail
- }
- // Close terminates the iteration process, releasing any pending underlying
- // resources.
- func (it *DitDemoCoordinatorOpenVoteIterator) Close() error {
- it.sub.Unsubscribe()
- return nil
- }
- // DitDemoCoordinatorOpenVote represents a OpenVote event raised by the DitDemoCoordinator contract.
- type DitDemoCoordinatorOpenVote struct {
- Repository [32]byte
- Proposal *big.Int
- Who common.Address
- Label string
- Accept bool
- NumberOfVotes *big.Int
- Raw types.Log // Blockchain specific contextual infos
- }
- // FilterOpenVote is a free log retrieval operation binding the contract event 0x864c0d6987266fd72e7e37f1fbc98b6a3794b7187dae454c67a2a626628a72ab.
- //
- // Solidity: event OpenVote(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label, bool accept, uint256 numberOfVotes)
- func (_DitDemoCoordinator *DitDemoCoordinatorFilterer) FilterOpenVote(opts *bind.FilterOpts, repository [][32]byte, proposal []*big.Int, who []common.Address) (*DitDemoCoordinatorOpenVoteIterator, error) {
- var repositoryRule []interface{}
- for _, repositoryItem := range repository {
- repositoryRule = append(repositoryRule, repositoryItem)
- }
- var proposalRule []interface{}
- for _, proposalItem := range proposal {
- proposalRule = append(proposalRule, proposalItem)
- }
- var whoRule []interface{}
- for _, whoItem := range who {
- whoRule = append(whoRule, whoItem)
- }
- logs, sub, err := _DitDemoCoordinator.contract.FilterLogs(opts, "OpenVote", repositoryRule, proposalRule, whoRule)
- if err != nil {
- return nil, err
- }
- return &DitDemoCoordinatorOpenVoteIterator{contract: _DitDemoCoordinator.contract, event: "OpenVote", logs: logs, sub: sub}, nil
- }
- // WatchOpenVote is a free log subscription operation binding the contract event 0x864c0d6987266fd72e7e37f1fbc98b6a3794b7187dae454c67a2a626628a72ab.
- //
- // Solidity: event OpenVote(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label, bool accept, uint256 numberOfVotes)
- func (_DitDemoCoordinator *DitDemoCoordinatorFilterer) WatchOpenVote(opts *bind.WatchOpts, sink chan<- *DitDemoCoordinatorOpenVote, repository [][32]byte, proposal []*big.Int, who []common.Address) (event.Subscription, error) {
- var repositoryRule []interface{}
- for _, repositoryItem := range repository {
- repositoryRule = append(repositoryRule, repositoryItem)
- }
- var proposalRule []interface{}
- for _, proposalItem := range proposal {
- proposalRule = append(proposalRule, proposalItem)
- }
- var whoRule []interface{}
- for _, whoItem := range who {
- whoRule = append(whoRule, whoItem)
- }
- logs, sub, err := _DitDemoCoordinator.contract.WatchLogs(opts, "OpenVote", repositoryRule, proposalRule, whoRule)
- if err != nil {
- return nil, err
- }
- return event.NewSubscription(func(quit <-chan struct{}) error {
- defer sub.Unsubscribe()
- for {
- select {
- case log := <-logs:
- // New log arrived, parse the event and forward to the user
- event := new(DitDemoCoordinatorOpenVote)
- if err := _DitDemoCoordinator.contract.UnpackLog(event, "OpenVote", log); err != nil {
- return err
- }
- event.Raw = log
- select {
- case sink <- event:
- case err := <-sub.Err():
- return err
- case <-quit:
- return nil
- }
- case err := <-sub.Err():
- return err
- case <-quit:
- return nil
- }
- }
- }), nil
- }
- // DitDemoCoordinatorProposeCommitIterator is returned from FilterProposeCommit and is used to iterate over the raw logs and unpacked data for ProposeCommit events raised by the DitDemoCoordinator contract.
- type DitDemoCoordinatorProposeCommitIterator struct {
- Event *DitDemoCoordinatorProposeCommit // Event containing the contract specifics and raw log
- contract *bind.BoundContract // Generic contract to use for unpacking event data
- event string // Event name to use for unpacking event data
- logs chan types.Log // Log channel receiving the found contract events
- sub ethereum.Subscription // Subscription for errors, completion and termination
- done bool // Whether the subscription completed delivering logs
- fail error // Occurred error to stop iteration
- }
- // Next advances the iterator to the subsequent event, returning whether there
- // are any more events found. In case of a retrieval or parsing error, false is
- // returned and Error() can be queried for the exact failure.
- func (it *DitDemoCoordinatorProposeCommitIterator) Next() bool {
- // If the iterator failed, stop iterating
- if it.fail != nil {
- return false
- }
- // If the iterator completed, deliver directly whatever's available
- if it.done {
- select {
- case log := <-it.logs:
- it.Event = new(DitDemoCoordinatorProposeCommit)
- if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
- it.fail = err
- return false
- }
- it.Event.Raw = log
- return true
- default:
- return false
- }
- }
- // Iterator still in progress, wait for either a data or an error event
- select {
- case log := <-it.logs:
- it.Event = new(DitDemoCoordinatorProposeCommit)
- if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
- it.fail = err
- return false
- }
- it.Event.Raw = log
- return true
- case err := <-it.sub.Err():
- it.done = true
- it.fail = err
- return it.Next()
- }
- }
- // Error returns any retrieval or parsing error occurred during filtering.
- func (it *DitDemoCoordinatorProposeCommitIterator) Error() error {
- return it.fail
- }
- // Close terminates the iteration process, releasing any pending underlying
- // resources.
- func (it *DitDemoCoordinatorProposeCommitIterator) Close() error {
- it.sub.Unsubscribe()
- return nil
- }
- // DitDemoCoordinatorProposeCommit represents a ProposeCommit event raised by the DitDemoCoordinator contract.
- type DitDemoCoordinatorProposeCommit struct {
- Repository [32]byte
- Proposal *big.Int
- Who common.Address
- Label string
- Raw types.Log // Blockchain specific contextual infos
- }
- // FilterProposeCommit is a free log retrieval operation binding the contract event 0x171fe77c3addce776991159eb3eb73b14d9187ebd06c1c34ea12355a84ddbd83.
- //
- // Solidity: event ProposeCommit(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label)
- func (_DitDemoCoordinator *DitDemoCoordinatorFilterer) FilterProposeCommit(opts *bind.FilterOpts, repository [][32]byte, proposal []*big.Int, who []common.Address) (*DitDemoCoordinatorProposeCommitIterator, error) {
- var repositoryRule []interface{}
- for _, repositoryItem := range repository {
- repositoryRule = append(repositoryRule, repositoryItem)
- }
- var proposalRule []interface{}
- for _, proposalItem := range proposal {
- proposalRule = append(proposalRule, proposalItem)
- }
- var whoRule []interface{}
- for _, whoItem := range who {
- whoRule = append(whoRule, whoItem)
- }
- logs, sub, err := _DitDemoCoordinator.contract.FilterLogs(opts, "ProposeCommit", repositoryRule, proposalRule, whoRule)
- if err != nil {
- return nil, err
- }
- return &DitDemoCoordinatorProposeCommitIterator{contract: _DitDemoCoordinator.contract, event: "ProposeCommit", logs: logs, sub: sub}, nil
- }
- // WatchProposeCommit is a free log subscription operation binding the contract event 0x171fe77c3addce776991159eb3eb73b14d9187ebd06c1c34ea12355a84ddbd83.
- //
- // Solidity: event ProposeCommit(bytes32 indexed repository, uint256 indexed proposal, address indexed who, string label)
- func (_DitDemoCoordinator *DitDemoCoordinatorFilterer) WatchProposeCommit(opts *bind.WatchOpts, sink chan<- *DitDemoCoordinatorProposeCommit, repository [][32]byte, proposal []*big.Int, who []common.Address) (event.Subscription, error) {
- var repositoryRule []interface{}
- for _, repositoryItem := range repository {
- repositoryRule = append(repositoryRule, repositoryItem)
- }
- var proposalRule []interface{}
- for _, proposalItem := range proposal {
- proposalRule = append(proposalRule, proposalItem)
- }
- var whoRule []interface{}
- for _, whoItem := range who {
- whoRule = append(whoRule, whoItem)
- }
- logs, sub, err := _DitDemoCoordinator.contract.WatchLogs(opts, "ProposeCommit", repositoryRule, proposalRule, whoRule)
- if err != nil {
- return nil, err
- }
- return event.NewSubscription(func(quit <-chan struct{}) error {
- defer sub.Unsubscribe()
- for {
- select {
- case log := <-logs:
- // New log arrived, parse the event and forward to the user
- event := new(DitDemoCoordinatorProposeCommit)
- if err := _DitDemoCoordinator.contract.UnpackLog(event, "ProposeCommit", log); err != nil {
- return err
- }
- event.Raw = log
- select {
- case sink <- event:
- case err := <-sub.Err():
- return err
- case <-quit:
- return nil
- }
- case err := <-sub.Err():
- return err
- case <-quit:
- return nil
- }
- }
- }), nil
- }
|