metarare.go 151 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283
  1. // Code generated - DO NOT EDIT.
  2. // This file is a generated binding and any manual changes will be lost.
  3. package metarare
  4. import (
  5. "errors"
  6. "math/big"
  7. "strings"
  8. ethereum "github.com/ethereum/go-ethereum"
  9. "github.com/ethereum/go-ethereum/accounts/abi"
  10. "github.com/ethereum/go-ethereum/accounts/abi/bind"
  11. "github.com/ethereum/go-ethereum/common"
  12. "github.com/ethereum/go-ethereum/core/types"
  13. "github.com/ethereum/go-ethereum/event"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var (
  17. _ = errors.New
  18. _ = big.NewInt
  19. _ = strings.NewReader
  20. _ = ethereum.NotFound
  21. _ = bind.Bind
  22. _ = common.Big1
  23. _ = types.BloomLookup
  24. _ = event.NewSubscription
  25. )
  26. // ERC20MetaData contains all meta data concerning the ERC20 contract.
  27. var ERC20MetaData = &bind.MetaData{
  28. ABI: "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]",
  29. Sigs: map[string]string{
  30. "dd62ed3e": "allowance(address,address)",
  31. "095ea7b3": "approve(address,uint256)",
  32. "70a08231": "balanceOf(address)",
  33. "a457c2d7": "decreaseAllowance(address,uint256)",
  34. "39509351": "increaseAllowance(address,uint256)",
  35. "18160ddd": "totalSupply()",
  36. "a9059cbb": "transfer(address,uint256)",
  37. "23b872dd": "transferFrom(address,address,uint256)",
  38. },
  39. Bin: "0x608060405234801561001057600080fd5b506106eb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d561020b565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610211565b6100b96004803603604081101561013357600080fd5b506001600160a01b038135169060200135610268565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102a4565b6100b96004803603604081101561018557600080fd5b506001600160a01b0381351690602001356102bf565b6100b9600480360360408110156101b157600080fd5b506001600160a01b0381351690602001356102fb565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610308565b6000610202338484610333565b50600192915050565b60025490565b600061021e848484610425565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461025e918691610259908663ffffffff61056d16565b610333565b5060019392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff6105cd16565b6001600160a01b031660009081526020819052604090205490565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff61056d16565b6000610202338484610425565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661037b57604051600160e51b62461bcd02815260040180806020018281038252602481526020018061069c6024913960400191505060405180910390fd5b6001600160a01b0382166103c357604051600160e51b62461bcd0281526004018080602001828103825260228152602001806106556022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831661046d57604051600160e51b62461bcd0281526004018080602001828103825260258152602001806106776025913960400191505060405180910390fd5b6001600160a01b0382166104b557604051600160e51b62461bcd0281526004018080602001828103825260238152602001806106326023913960400191505060405180910390fd5b6001600160a01b0383166000908152602081905260409020546104de908263ffffffff61056d16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610513908263ffffffff6105cd16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828211156105c75760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561062a5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a72305820406df5370657763ac7b0cefe657437434e0f88da8ad01bff715e96a44ccea4f90029",
  40. }
  41. // ERC20ABI is the input ABI used to generate the binding from.
  42. // Deprecated: Use ERC20MetaData.ABI instead.
  43. var ERC20ABI = ERC20MetaData.ABI
  44. // Deprecated: Use ERC20MetaData.Sigs instead.
  45. // ERC20FuncSigs maps the 4-byte function signature to its string representation.
  46. var ERC20FuncSigs = ERC20MetaData.Sigs
  47. // ERC20Bin is the compiled bytecode used for deploying new contracts.
  48. // Deprecated: Use ERC20MetaData.Bin instead.
  49. var ERC20Bin = ERC20MetaData.Bin
  50. // DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it.
  51. func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) {
  52. parsed, err := ERC20MetaData.GetAbi()
  53. if err != nil {
  54. return common.Address{}, nil, nil, err
  55. }
  56. if parsed == nil {
  57. return common.Address{}, nil, nil, errors.New("GetABI returned nil")
  58. }
  59. address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ERC20Bin), backend)
  60. if err != nil {
  61. return common.Address{}, nil, nil, err
  62. }
  63. return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil
  64. }
  65. // ERC20 is an auto generated Go binding around an Ethereum contract.
  66. type ERC20 struct {
  67. ERC20Caller // Read-only binding to the contract
  68. ERC20Transactor // Write-only binding to the contract
  69. ERC20Filterer // Log filterer for contract events
  70. }
  71. // ERC20Caller is an auto generated read-only Go binding around an Ethereum contract.
  72. type ERC20Caller struct {
  73. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  74. }
  75. // ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract.
  76. type ERC20Transactor struct {
  77. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  78. }
  79. // ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
  80. type ERC20Filterer struct {
  81. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  82. }
  83. // ERC20Session is an auto generated Go binding around an Ethereum contract,
  84. // with pre-set call and transact options.
  85. type ERC20Session struct {
  86. Contract *ERC20 // Generic contract binding to set the session for
  87. CallOpts bind.CallOpts // Call options to use throughout this session
  88. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  89. }
  90. // ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract,
  91. // with pre-set call options.
  92. type ERC20CallerSession struct {
  93. Contract *ERC20Caller // Generic contract caller binding to set the session for
  94. CallOpts bind.CallOpts // Call options to use throughout this session
  95. }
  96. // ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  97. // with pre-set transact options.
  98. type ERC20TransactorSession struct {
  99. Contract *ERC20Transactor // Generic contract transactor binding to set the session for
  100. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  101. }
  102. // ERC20Raw is an auto generated low-level Go binding around an Ethereum contract.
  103. type ERC20Raw struct {
  104. Contract *ERC20 // Generic contract binding to access the raw methods on
  105. }
  106. // ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  107. type ERC20CallerRaw struct {
  108. Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on
  109. }
  110. // ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  111. type ERC20TransactorRaw struct {
  112. Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on
  113. }
  114. // NewERC20 creates a new instance of ERC20, bound to a specific deployed contract.
  115. func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) {
  116. contract, err := bindERC20(address, backend, backend, backend)
  117. if err != nil {
  118. return nil, err
  119. }
  120. return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil
  121. }
  122. // NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract.
  123. func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) {
  124. contract, err := bindERC20(address, caller, nil, nil)
  125. if err != nil {
  126. return nil, err
  127. }
  128. return &ERC20Caller{contract: contract}, nil
  129. }
  130. // NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract.
  131. func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) {
  132. contract, err := bindERC20(address, nil, transactor, nil)
  133. if err != nil {
  134. return nil, err
  135. }
  136. return &ERC20Transactor{contract: contract}, nil
  137. }
  138. // NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract.
  139. func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) {
  140. contract, err := bindERC20(address, nil, nil, filterer)
  141. if err != nil {
  142. return nil, err
  143. }
  144. return &ERC20Filterer{contract: contract}, nil
  145. }
  146. // bindERC20 binds a generic wrapper to an already deployed contract.
  147. func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  148. parsed, err := abi.JSON(strings.NewReader(ERC20ABI))
  149. if err != nil {
  150. return nil, err
  151. }
  152. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  153. }
  154. // Call invokes the (constant) contract method with params as input values and
  155. // sets the output to result. The result type might be a single field for simple
  156. // returns, a slice of interfaces for anonymous returns and a struct for named
  157. // returns.
  158. func (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  159. return _ERC20.Contract.ERC20Caller.contract.Call(opts, result, method, params...)
  160. }
  161. // Transfer initiates a plain transaction to move funds to the contract, calling
  162. // its default method if one is available.
  163. func (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  164. return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts)
  165. }
  166. // Transact invokes the (paid) contract method with params as input values.
  167. func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  168. return _ERC20.Contract.ERC20Transactor.contract.Transact(opts, method, params...)
  169. }
  170. // Call invokes the (constant) contract method with params as input values and
  171. // sets the output to result. The result type might be a single field for simple
  172. // returns, a slice of interfaces for anonymous returns and a struct for named
  173. // returns.
  174. func (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  175. return _ERC20.Contract.contract.Call(opts, result, method, params...)
  176. }
  177. // Transfer initiates a plain transaction to move funds to the contract, calling
  178. // its default method if one is available.
  179. func (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  180. return _ERC20.Contract.contract.Transfer(opts)
  181. }
  182. // Transact invokes the (paid) contract method with params as input values.
  183. func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  184. return _ERC20.Contract.contract.Transact(opts, method, params...)
  185. }
  186. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  187. //
  188. // Solidity: function allowance(address owner, address spender) view returns(uint256)
  189. func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) {
  190. var out []interface{}
  191. err := _ERC20.contract.Call(opts, &out, "allowance", owner, spender)
  192. if err != nil {
  193. return *new(*big.Int), err
  194. }
  195. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  196. return out0, err
  197. }
  198. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  199. //
  200. // Solidity: function allowance(address owner, address spender) view returns(uint256)
  201. func (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
  202. return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender)
  203. }
  204. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  205. //
  206. // Solidity: function allowance(address owner, address spender) view returns(uint256)
  207. func (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
  208. return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender)
  209. }
  210. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  211. //
  212. // Solidity: function balanceOf(address account) view returns(uint256)
  213. func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) {
  214. var out []interface{}
  215. err := _ERC20.contract.Call(opts, &out, "balanceOf", account)
  216. if err != nil {
  217. return *new(*big.Int), err
  218. }
  219. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  220. return out0, err
  221. }
  222. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  223. //
  224. // Solidity: function balanceOf(address account) view returns(uint256)
  225. func (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error) {
  226. return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account)
  227. }
  228. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  229. //
  230. // Solidity: function balanceOf(address account) view returns(uint256)
  231. func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) {
  232. return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account)
  233. }
  234. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  235. //
  236. // Solidity: function totalSupply() view returns(uint256)
  237. func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
  238. var out []interface{}
  239. err := _ERC20.contract.Call(opts, &out, "totalSupply")
  240. if err != nil {
  241. return *new(*big.Int), err
  242. }
  243. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  244. return out0, err
  245. }
  246. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  247. //
  248. // Solidity: function totalSupply() view returns(uint256)
  249. func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) {
  250. return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts)
  251. }
  252. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  253. //
  254. // Solidity: function totalSupply() view returns(uint256)
  255. func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) {
  256. return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts)
  257. }
  258. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  259. //
  260. // Solidity: function approve(address spender, uint256 value) returns(bool)
  261. func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) {
  262. return _ERC20.contract.Transact(opts, "approve", spender, value)
  263. }
  264. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  265. //
  266. // Solidity: function approve(address spender, uint256 value) returns(bool)
  267. func (_ERC20 *ERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) {
  268. return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, value)
  269. }
  270. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  271. //
  272. // Solidity: function approve(address spender, uint256 value) returns(bool)
  273. func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) {
  274. return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, value)
  275. }
  276. // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
  277. //
  278. // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
  279. func (_ERC20 *ERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
  280. return _ERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue)
  281. }
  282. // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
  283. //
  284. // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
  285. func (_ERC20 *ERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
  286. return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue)
  287. }
  288. // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
  289. //
  290. // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
  291. func (_ERC20 *ERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
  292. return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue)
  293. }
  294. // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
  295. //
  296. // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
  297. func (_ERC20 *ERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
  298. return _ERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue)
  299. }
  300. // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
  301. //
  302. // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
  303. func (_ERC20 *ERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
  304. return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue)
  305. }
  306. // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
  307. //
  308. // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
  309. func (_ERC20 *ERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
  310. return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue)
  311. }
  312. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  313. //
  314. // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  315. func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  316. return _ERC20.contract.Transact(opts, "transfer", recipient, amount)
  317. }
  318. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  319. //
  320. // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  321. func (_ERC20 *ERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  322. return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount)
  323. }
  324. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  325. //
  326. // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  327. func (_ERC20 *ERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  328. return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount)
  329. }
  330. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  331. //
  332. // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool)
  333. func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  334. return _ERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount)
  335. }
  336. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  337. //
  338. // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool)
  339. func (_ERC20 *ERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  340. return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount)
  341. }
  342. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  343. //
  344. // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool)
  345. func (_ERC20 *ERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  346. return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount)
  347. }
  348. // ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract.
  349. type ERC20ApprovalIterator struct {
  350. Event *ERC20Approval // Event containing the contract specifics and raw log
  351. contract *bind.BoundContract // Generic contract to use for unpacking event data
  352. event string // Event name to use for unpacking event data
  353. logs chan types.Log // Log channel receiving the found contract events
  354. sub ethereum.Subscription // Subscription for errors, completion and termination
  355. done bool // Whether the subscription completed delivering logs
  356. fail error // Occurred error to stop iteration
  357. }
  358. // Next advances the iterator to the subsequent event, returning whether there
  359. // are any more events found. In case of a retrieval or parsing error, false is
  360. // returned and Error() can be queried for the exact failure.
  361. func (it *ERC20ApprovalIterator) Next() bool {
  362. // If the iterator failed, stop iterating
  363. if it.fail != nil {
  364. return false
  365. }
  366. // If the iterator completed, deliver directly whatever's available
  367. if it.done {
  368. select {
  369. case log := <-it.logs:
  370. it.Event = new(ERC20Approval)
  371. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  372. it.fail = err
  373. return false
  374. }
  375. it.Event.Raw = log
  376. return true
  377. default:
  378. return false
  379. }
  380. }
  381. // Iterator still in progress, wait for either a data or an error event
  382. select {
  383. case log := <-it.logs:
  384. it.Event = new(ERC20Approval)
  385. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  386. it.fail = err
  387. return false
  388. }
  389. it.Event.Raw = log
  390. return true
  391. case err := <-it.sub.Err():
  392. it.done = true
  393. it.fail = err
  394. return it.Next()
  395. }
  396. }
  397. // Error returns any retrieval or parsing error occurred during filtering.
  398. func (it *ERC20ApprovalIterator) Error() error {
  399. return it.fail
  400. }
  401. // Close terminates the iteration process, releasing any pending underlying
  402. // resources.
  403. func (it *ERC20ApprovalIterator) Close() error {
  404. it.sub.Unsubscribe()
  405. return nil
  406. }
  407. // ERC20Approval represents a Approval event raised by the ERC20 contract.
  408. type ERC20Approval struct {
  409. Owner common.Address
  410. Spender common.Address
  411. Value *big.Int
  412. Raw types.Log // Blockchain specific contextual infos
  413. }
  414. // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  415. //
  416. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  417. func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) {
  418. var ownerRule []interface{}
  419. for _, ownerItem := range owner {
  420. ownerRule = append(ownerRule, ownerItem)
  421. }
  422. var spenderRule []interface{}
  423. for _, spenderItem := range spender {
  424. spenderRule = append(spenderRule, spenderItem)
  425. }
  426. logs, sub, err := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule)
  427. if err != nil {
  428. return nil, err
  429. }
  430. return &ERC20ApprovalIterator{contract: _ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil
  431. }
  432. // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  433. //
  434. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  435. func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) {
  436. var ownerRule []interface{}
  437. for _, ownerItem := range owner {
  438. ownerRule = append(ownerRule, ownerItem)
  439. }
  440. var spenderRule []interface{}
  441. for _, spenderItem := range spender {
  442. spenderRule = append(spenderRule, spenderItem)
  443. }
  444. logs, sub, err := _ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule)
  445. if err != nil {
  446. return nil, err
  447. }
  448. return event.NewSubscription(func(quit <-chan struct{}) error {
  449. defer sub.Unsubscribe()
  450. for {
  451. select {
  452. case log := <-logs:
  453. // New log arrived, parse the event and forward to the user
  454. event := new(ERC20Approval)
  455. if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil {
  456. return err
  457. }
  458. event.Raw = log
  459. select {
  460. case sink <- event:
  461. case err := <-sub.Err():
  462. return err
  463. case <-quit:
  464. return nil
  465. }
  466. case err := <-sub.Err():
  467. return err
  468. case <-quit:
  469. return nil
  470. }
  471. }
  472. }), nil
  473. }
  474. // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  475. //
  476. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  477. func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) {
  478. event := new(ERC20Approval)
  479. if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil {
  480. return nil, err
  481. }
  482. event.Raw = log
  483. return event, nil
  484. }
  485. // ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract.
  486. type ERC20TransferIterator struct {
  487. Event *ERC20Transfer // Event containing the contract specifics and raw log
  488. contract *bind.BoundContract // Generic contract to use for unpacking event data
  489. event string // Event name to use for unpacking event data
  490. logs chan types.Log // Log channel receiving the found contract events
  491. sub ethereum.Subscription // Subscription for errors, completion and termination
  492. done bool // Whether the subscription completed delivering logs
  493. fail error // Occurred error to stop iteration
  494. }
  495. // Next advances the iterator to the subsequent event, returning whether there
  496. // are any more events found. In case of a retrieval or parsing error, false is
  497. // returned and Error() can be queried for the exact failure.
  498. func (it *ERC20TransferIterator) Next() bool {
  499. // If the iterator failed, stop iterating
  500. if it.fail != nil {
  501. return false
  502. }
  503. // If the iterator completed, deliver directly whatever's available
  504. if it.done {
  505. select {
  506. case log := <-it.logs:
  507. it.Event = new(ERC20Transfer)
  508. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  509. it.fail = err
  510. return false
  511. }
  512. it.Event.Raw = log
  513. return true
  514. default:
  515. return false
  516. }
  517. }
  518. // Iterator still in progress, wait for either a data or an error event
  519. select {
  520. case log := <-it.logs:
  521. it.Event = new(ERC20Transfer)
  522. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  523. it.fail = err
  524. return false
  525. }
  526. it.Event.Raw = log
  527. return true
  528. case err := <-it.sub.Err():
  529. it.done = true
  530. it.fail = err
  531. return it.Next()
  532. }
  533. }
  534. // Error returns any retrieval or parsing error occurred during filtering.
  535. func (it *ERC20TransferIterator) Error() error {
  536. return it.fail
  537. }
  538. // Close terminates the iteration process, releasing any pending underlying
  539. // resources.
  540. func (it *ERC20TransferIterator) Close() error {
  541. it.sub.Unsubscribe()
  542. return nil
  543. }
  544. // ERC20Transfer represents a Transfer event raised by the ERC20 contract.
  545. type ERC20Transfer struct {
  546. From common.Address
  547. To common.Address
  548. Value *big.Int
  549. Raw types.Log // Blockchain specific contextual infos
  550. }
  551. // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  552. //
  553. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  554. func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) {
  555. var fromRule []interface{}
  556. for _, fromItem := range from {
  557. fromRule = append(fromRule, fromItem)
  558. }
  559. var toRule []interface{}
  560. for _, toItem := range to {
  561. toRule = append(toRule, toItem)
  562. }
  563. logs, sub, err := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule)
  564. if err != nil {
  565. return nil, err
  566. }
  567. return &ERC20TransferIterator{contract: _ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil
  568. }
  569. // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  570. //
  571. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  572. func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) {
  573. var fromRule []interface{}
  574. for _, fromItem := range from {
  575. fromRule = append(fromRule, fromItem)
  576. }
  577. var toRule []interface{}
  578. for _, toItem := range to {
  579. toRule = append(toRule, toItem)
  580. }
  581. logs, sub, err := _ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule)
  582. if err != nil {
  583. return nil, err
  584. }
  585. return event.NewSubscription(func(quit <-chan struct{}) error {
  586. defer sub.Unsubscribe()
  587. for {
  588. select {
  589. case log := <-logs:
  590. // New log arrived, parse the event and forward to the user
  591. event := new(ERC20Transfer)
  592. if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil {
  593. return err
  594. }
  595. event.Raw = log
  596. select {
  597. case sink <- event:
  598. case err := <-sub.Err():
  599. return err
  600. case <-quit:
  601. return nil
  602. }
  603. case err := <-sub.Err():
  604. return err
  605. case <-quit:
  606. return nil
  607. }
  608. }
  609. }), nil
  610. }
  611. // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  612. //
  613. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  614. func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) {
  615. event := new(ERC20Transfer)
  616. if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil {
  617. return nil, err
  618. }
  619. event.Raw = log
  620. return event, nil
  621. }
  622. // IERC20MetaData contains all meta data concerning the IERC20 contract.
  623. var IERC20MetaData = &bind.MetaData{
  624. ABI: "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]",
  625. Sigs: map[string]string{
  626. "dd62ed3e": "allowance(address,address)",
  627. "095ea7b3": "approve(address,uint256)",
  628. "70a08231": "balanceOf(address)",
  629. "18160ddd": "totalSupply()",
  630. "a9059cbb": "transfer(address,uint256)",
  631. "23b872dd": "transferFrom(address,address,uint256)",
  632. },
  633. }
  634. // IERC20ABI is the input ABI used to generate the binding from.
  635. // Deprecated: Use IERC20MetaData.ABI instead.
  636. var IERC20ABI = IERC20MetaData.ABI
  637. // Deprecated: Use IERC20MetaData.Sigs instead.
  638. // IERC20FuncSigs maps the 4-byte function signature to its string representation.
  639. var IERC20FuncSigs = IERC20MetaData.Sigs
  640. // IERC20 is an auto generated Go binding around an Ethereum contract.
  641. type IERC20 struct {
  642. IERC20Caller // Read-only binding to the contract
  643. IERC20Transactor // Write-only binding to the contract
  644. IERC20Filterer // Log filterer for contract events
  645. }
  646. // IERC20Caller is an auto generated read-only Go binding around an Ethereum contract.
  647. type IERC20Caller struct {
  648. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  649. }
  650. // IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract.
  651. type IERC20Transactor struct {
  652. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  653. }
  654. // IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
  655. type IERC20Filterer struct {
  656. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  657. }
  658. // IERC20Session is an auto generated Go binding around an Ethereum contract,
  659. // with pre-set call and transact options.
  660. type IERC20Session struct {
  661. Contract *IERC20 // Generic contract binding to set the session for
  662. CallOpts bind.CallOpts // Call options to use throughout this session
  663. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  664. }
  665. // IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract,
  666. // with pre-set call options.
  667. type IERC20CallerSession struct {
  668. Contract *IERC20Caller // Generic contract caller binding to set the session for
  669. CallOpts bind.CallOpts // Call options to use throughout this session
  670. }
  671. // IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  672. // with pre-set transact options.
  673. type IERC20TransactorSession struct {
  674. Contract *IERC20Transactor // Generic contract transactor binding to set the session for
  675. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  676. }
  677. // IERC20Raw is an auto generated low-level Go binding around an Ethereum contract.
  678. type IERC20Raw struct {
  679. Contract *IERC20 // Generic contract binding to access the raw methods on
  680. }
  681. // IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  682. type IERC20CallerRaw struct {
  683. Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on
  684. }
  685. // IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  686. type IERC20TransactorRaw struct {
  687. Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on
  688. }
  689. // NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract.
  690. func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) {
  691. contract, err := bindIERC20(address, backend, backend, backend)
  692. if err != nil {
  693. return nil, err
  694. }
  695. return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil
  696. }
  697. // NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract.
  698. func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) {
  699. contract, err := bindIERC20(address, caller, nil, nil)
  700. if err != nil {
  701. return nil, err
  702. }
  703. return &IERC20Caller{contract: contract}, nil
  704. }
  705. // NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract.
  706. func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) {
  707. contract, err := bindIERC20(address, nil, transactor, nil)
  708. if err != nil {
  709. return nil, err
  710. }
  711. return &IERC20Transactor{contract: contract}, nil
  712. }
  713. // NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract.
  714. func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) {
  715. contract, err := bindIERC20(address, nil, nil, filterer)
  716. if err != nil {
  717. return nil, err
  718. }
  719. return &IERC20Filterer{contract: contract}, nil
  720. }
  721. // bindIERC20 binds a generic wrapper to an already deployed contract.
  722. func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  723. parsed, err := abi.JSON(strings.NewReader(IERC20ABI))
  724. if err != nil {
  725. return nil, err
  726. }
  727. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  728. }
  729. // Call invokes the (constant) contract method with params as input values and
  730. // sets the output to result. The result type might be a single field for simple
  731. // returns, a slice of interfaces for anonymous returns and a struct for named
  732. // returns.
  733. func (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  734. return _IERC20.Contract.IERC20Caller.contract.Call(opts, result, method, params...)
  735. }
  736. // Transfer initiates a plain transaction to move funds to the contract, calling
  737. // its default method if one is available.
  738. func (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  739. return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts)
  740. }
  741. // Transact invokes the (paid) contract method with params as input values.
  742. func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  743. return _IERC20.Contract.IERC20Transactor.contract.Transact(opts, method, params...)
  744. }
  745. // Call invokes the (constant) contract method with params as input values and
  746. // sets the output to result. The result type might be a single field for simple
  747. // returns, a slice of interfaces for anonymous returns and a struct for named
  748. // returns.
  749. func (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  750. return _IERC20.Contract.contract.Call(opts, result, method, params...)
  751. }
  752. // Transfer initiates a plain transaction to move funds to the contract, calling
  753. // its default method if one is available.
  754. func (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  755. return _IERC20.Contract.contract.Transfer(opts)
  756. }
  757. // Transact invokes the (paid) contract method with params as input values.
  758. func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  759. return _IERC20.Contract.contract.Transact(opts, method, params...)
  760. }
  761. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  762. //
  763. // Solidity: function allowance(address owner, address spender) view returns(uint256)
  764. func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) {
  765. var out []interface{}
  766. err := _IERC20.contract.Call(opts, &out, "allowance", owner, spender)
  767. if err != nil {
  768. return *new(*big.Int), err
  769. }
  770. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  771. return out0, err
  772. }
  773. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  774. //
  775. // Solidity: function allowance(address owner, address spender) view returns(uint256)
  776. func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
  777. return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender)
  778. }
  779. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  780. //
  781. // Solidity: function allowance(address owner, address spender) view returns(uint256)
  782. func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
  783. return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender)
  784. }
  785. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  786. //
  787. // Solidity: function balanceOf(address account) view returns(uint256)
  788. func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) {
  789. var out []interface{}
  790. err := _IERC20.contract.Call(opts, &out, "balanceOf", account)
  791. if err != nil {
  792. return *new(*big.Int), err
  793. }
  794. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  795. return out0, err
  796. }
  797. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  798. //
  799. // Solidity: function balanceOf(address account) view returns(uint256)
  800. func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) {
  801. return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account)
  802. }
  803. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  804. //
  805. // Solidity: function balanceOf(address account) view returns(uint256)
  806. func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) {
  807. return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account)
  808. }
  809. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  810. //
  811. // Solidity: function totalSupply() view returns(uint256)
  812. func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
  813. var out []interface{}
  814. err := _IERC20.contract.Call(opts, &out, "totalSupply")
  815. if err != nil {
  816. return *new(*big.Int), err
  817. }
  818. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  819. return out0, err
  820. }
  821. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  822. //
  823. // Solidity: function totalSupply() view returns(uint256)
  824. func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) {
  825. return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts)
  826. }
  827. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  828. //
  829. // Solidity: function totalSupply() view returns(uint256)
  830. func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) {
  831. return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts)
  832. }
  833. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  834. //
  835. // Solidity: function approve(address spender, uint256 amount) returns(bool)
  836. func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) {
  837. return _IERC20.contract.Transact(opts, "approve", spender, amount)
  838. }
  839. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  840. //
  841. // Solidity: function approve(address spender, uint256 amount) returns(bool)
  842. func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) {
  843. return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount)
  844. }
  845. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  846. //
  847. // Solidity: function approve(address spender, uint256 amount) returns(bool)
  848. func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) {
  849. return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount)
  850. }
  851. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  852. //
  853. // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  854. func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  855. return _IERC20.contract.Transact(opts, "transfer", recipient, amount)
  856. }
  857. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  858. //
  859. // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  860. func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  861. return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount)
  862. }
  863. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  864. //
  865. // Solidity: function transfer(address recipient, uint256 amount) returns(bool)
  866. func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  867. return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount)
  868. }
  869. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  870. //
  871. // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool)
  872. func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  873. return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount)
  874. }
  875. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  876. //
  877. // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool)
  878. func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  879. return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount)
  880. }
  881. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  882. //
  883. // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool)
  884. func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) {
  885. return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount)
  886. }
  887. // IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract.
  888. type IERC20ApprovalIterator struct {
  889. Event *IERC20Approval // Event containing the contract specifics and raw log
  890. contract *bind.BoundContract // Generic contract to use for unpacking event data
  891. event string // Event name to use for unpacking event data
  892. logs chan types.Log // Log channel receiving the found contract events
  893. sub ethereum.Subscription // Subscription for errors, completion and termination
  894. done bool // Whether the subscription completed delivering logs
  895. fail error // Occurred error to stop iteration
  896. }
  897. // Next advances the iterator to the subsequent event, returning whether there
  898. // are any more events found. In case of a retrieval or parsing error, false is
  899. // returned and Error() can be queried for the exact failure.
  900. func (it *IERC20ApprovalIterator) Next() bool {
  901. // If the iterator failed, stop iterating
  902. if it.fail != nil {
  903. return false
  904. }
  905. // If the iterator completed, deliver directly whatever's available
  906. if it.done {
  907. select {
  908. case log := <-it.logs:
  909. it.Event = new(IERC20Approval)
  910. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  911. it.fail = err
  912. return false
  913. }
  914. it.Event.Raw = log
  915. return true
  916. default:
  917. return false
  918. }
  919. }
  920. // Iterator still in progress, wait for either a data or an error event
  921. select {
  922. case log := <-it.logs:
  923. it.Event = new(IERC20Approval)
  924. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  925. it.fail = err
  926. return false
  927. }
  928. it.Event.Raw = log
  929. return true
  930. case err := <-it.sub.Err():
  931. it.done = true
  932. it.fail = err
  933. return it.Next()
  934. }
  935. }
  936. // Error returns any retrieval or parsing error occurred during filtering.
  937. func (it *IERC20ApprovalIterator) Error() error {
  938. return it.fail
  939. }
  940. // Close terminates the iteration process, releasing any pending underlying
  941. // resources.
  942. func (it *IERC20ApprovalIterator) Close() error {
  943. it.sub.Unsubscribe()
  944. return nil
  945. }
  946. // IERC20Approval represents a Approval event raised by the IERC20 contract.
  947. type IERC20Approval struct {
  948. Owner common.Address
  949. Spender common.Address
  950. Value *big.Int
  951. Raw types.Log // Blockchain specific contextual infos
  952. }
  953. // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  954. //
  955. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  956. func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) {
  957. var ownerRule []interface{}
  958. for _, ownerItem := range owner {
  959. ownerRule = append(ownerRule, ownerItem)
  960. }
  961. var spenderRule []interface{}
  962. for _, spenderItem := range spender {
  963. spenderRule = append(spenderRule, spenderItem)
  964. }
  965. logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule)
  966. if err != nil {
  967. return nil, err
  968. }
  969. return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil
  970. }
  971. // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  972. //
  973. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  974. func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) {
  975. var ownerRule []interface{}
  976. for _, ownerItem := range owner {
  977. ownerRule = append(ownerRule, ownerItem)
  978. }
  979. var spenderRule []interface{}
  980. for _, spenderItem := range spender {
  981. spenderRule = append(spenderRule, spenderItem)
  982. }
  983. logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule)
  984. if err != nil {
  985. return nil, err
  986. }
  987. return event.NewSubscription(func(quit <-chan struct{}) error {
  988. defer sub.Unsubscribe()
  989. for {
  990. select {
  991. case log := <-logs:
  992. // New log arrived, parse the event and forward to the user
  993. event := new(IERC20Approval)
  994. if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil {
  995. return err
  996. }
  997. event.Raw = log
  998. select {
  999. case sink <- event:
  1000. case err := <-sub.Err():
  1001. return err
  1002. case <-quit:
  1003. return nil
  1004. }
  1005. case err := <-sub.Err():
  1006. return err
  1007. case <-quit:
  1008. return nil
  1009. }
  1010. }
  1011. }), nil
  1012. }
  1013. // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  1014. //
  1015. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  1016. func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) {
  1017. event := new(IERC20Approval)
  1018. if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil {
  1019. return nil, err
  1020. }
  1021. event.Raw = log
  1022. return event, nil
  1023. }
  1024. // IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract.
  1025. type IERC20TransferIterator struct {
  1026. Event *IERC20Transfer // Event containing the contract specifics and raw log
  1027. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1028. event string // Event name to use for unpacking event data
  1029. logs chan types.Log // Log channel receiving the found contract events
  1030. sub ethereum.Subscription // Subscription for errors, completion and termination
  1031. done bool // Whether the subscription completed delivering logs
  1032. fail error // Occurred error to stop iteration
  1033. }
  1034. // Next advances the iterator to the subsequent event, returning whether there
  1035. // are any more events found. In case of a retrieval or parsing error, false is
  1036. // returned and Error() can be queried for the exact failure.
  1037. func (it *IERC20TransferIterator) Next() bool {
  1038. // If the iterator failed, stop iterating
  1039. if it.fail != nil {
  1040. return false
  1041. }
  1042. // If the iterator completed, deliver directly whatever's available
  1043. if it.done {
  1044. select {
  1045. case log := <-it.logs:
  1046. it.Event = new(IERC20Transfer)
  1047. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1048. it.fail = err
  1049. return false
  1050. }
  1051. it.Event.Raw = log
  1052. return true
  1053. default:
  1054. return false
  1055. }
  1056. }
  1057. // Iterator still in progress, wait for either a data or an error event
  1058. select {
  1059. case log := <-it.logs:
  1060. it.Event = new(IERC20Transfer)
  1061. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1062. it.fail = err
  1063. return false
  1064. }
  1065. it.Event.Raw = log
  1066. return true
  1067. case err := <-it.sub.Err():
  1068. it.done = true
  1069. it.fail = err
  1070. return it.Next()
  1071. }
  1072. }
  1073. // Error returns any retrieval or parsing error occurred during filtering.
  1074. func (it *IERC20TransferIterator) Error() error {
  1075. return it.fail
  1076. }
  1077. // Close terminates the iteration process, releasing any pending underlying
  1078. // resources.
  1079. func (it *IERC20TransferIterator) Close() error {
  1080. it.sub.Unsubscribe()
  1081. return nil
  1082. }
  1083. // IERC20Transfer represents a Transfer event raised by the IERC20 contract.
  1084. type IERC20Transfer struct {
  1085. From common.Address
  1086. To common.Address
  1087. Value *big.Int
  1088. Raw types.Log // Blockchain specific contextual infos
  1089. }
  1090. // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1091. //
  1092. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1093. func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) {
  1094. var fromRule []interface{}
  1095. for _, fromItem := range from {
  1096. fromRule = append(fromRule, fromItem)
  1097. }
  1098. var toRule []interface{}
  1099. for _, toItem := range to {
  1100. toRule = append(toRule, toItem)
  1101. }
  1102. logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule)
  1103. if err != nil {
  1104. return nil, err
  1105. }
  1106. return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil
  1107. }
  1108. // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1109. //
  1110. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1111. func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) {
  1112. var fromRule []interface{}
  1113. for _, fromItem := range from {
  1114. fromRule = append(fromRule, fromItem)
  1115. }
  1116. var toRule []interface{}
  1117. for _, toItem := range to {
  1118. toRule = append(toRule, toItem)
  1119. }
  1120. logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule)
  1121. if err != nil {
  1122. return nil, err
  1123. }
  1124. return event.NewSubscription(func(quit <-chan struct{}) error {
  1125. defer sub.Unsubscribe()
  1126. for {
  1127. select {
  1128. case log := <-logs:
  1129. // New log arrived, parse the event and forward to the user
  1130. event := new(IERC20Transfer)
  1131. if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil {
  1132. return err
  1133. }
  1134. event.Raw = log
  1135. select {
  1136. case sink <- event:
  1137. case err := <-sub.Err():
  1138. return err
  1139. case <-quit:
  1140. return nil
  1141. }
  1142. case err := <-sub.Err():
  1143. return err
  1144. case <-quit:
  1145. return nil
  1146. }
  1147. }
  1148. }), nil
  1149. }
  1150. // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  1151. //
  1152. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  1153. func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) {
  1154. event := new(IERC20Transfer)
  1155. if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil {
  1156. return nil, err
  1157. }
  1158. event.Raw = log
  1159. return event, nil
  1160. }
  1161. // MetaRareMetaData contains all meta data concerning the MetaRare contract.
  1162. var MetaRareMetaData = &bind.MetaData{
  1163. ABI: "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initialSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_holder\",\"type\":\"address\"},{\"name\":\"_idx\",\"type\":\"uint256\"}],\"name\":\"lockState\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_holder\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_holder\",\"type\":\"address\"},{\"name\":\"i\",\"type\":\"uint256\"}],\"name\":\"unlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"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\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_releaseTime\",\"type\":\"uint256\"}],\"name\":\"transferWithLock\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_holder\",\"type\":\"address\"}],\"name\":\"lockCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_holder\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_releaseTime\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"burner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"holder\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"releaseTime\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"holder\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]",
  1164. Sigs: map[string]string{
  1165. "dd62ed3e": "allowance(address,address)",
  1166. "095ea7b3": "approve(address,uint256)",
  1167. "70a08231": "balanceOf(address)",
  1168. "42966c68": "burn(uint256)",
  1169. "313ce567": "decimals()",
  1170. "a457c2d7": "decreaseAllowance(address,uint256)",
  1171. "39509351": "increaseAllowance(address,uint256)",
  1172. "378dc3dc": "initialSupply()",
  1173. "e2ab691d": "lock(address,uint256,uint256)",
  1174. "df034586": "lockCount(address)",
  1175. "46cf1bb5": "lockState(address,uint256)",
  1176. "06fdde03": "name()",
  1177. "8da5cb5b": "owner()",
  1178. "95d89b41": "symbol()",
  1179. "18160ddd": "totalSupply()",
  1180. "a9059cbb": "transfer(address,uint256)",
  1181. "23b872dd": "transferFrom(address,address,uint256)",
  1182. "f2fde38b": "transferOwnership(address)",
  1183. "de6baccb": "transferWithLock(address,uint256,uint256)",
  1184. "7eee288d": "unlock(address,uint256)",
  1185. },
  1186. Bin: "0x60806040523480156200001157600080fd5b5062000035336af8277896582678ac0000006200004d602090811b620016bc17901c565b600380546001600160a01b03191633179055620001e4565b6001600160a01b038216620000c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620000df816002546200016860201b620012d51790919060201c565b6002556001600160a01b0382166000908152602081815260409091205462000112918390620012d562000168821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082820183811015620001dd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6118ca80620001f46000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80637eee288d116100ad578063dd62ed3e11610071578063dd62ed3e146103ca578063de6baccb146103f8578063df0345861461042a578063e2ab691d14610450578063f2fde38b146104825761012c565b80637eee288d1461031a5780638da5cb5b1461034657806395d89b411461036a578063a457c2d714610372578063a9059cbb1461039e5761012c565b8063378dc3dc116100f4578063378dc3dc1461025c578063395093511461026457806342966c681461029057806346cf1bb5146102af57806370a08231146102f45761012c565b806306fdde0314610131578063095ea7b3146101ae57806318160ddd146101ee57806323b872dd14610208578063313ce5671461023e575b600080fd5b6101396104a8565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017357818101518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101da600480360360408110156101c457600080fd5b506001600160a01b0381351690602001356104cf565b604080519115158252519081900360200190f35b6101f66104e5565b60408051918252519081900360200190f35b6101da6004803603606081101561021e57600080fd5b506001600160a01b038135811691602081013590911690604001356104ec565b61024661050a565b6040805160ff9092168252519081900360200190f35b6101f661050f565b6101da6004803603604081101561027a57600080fd5b506001600160a01b03813516906020013561051e565b6102ad600480360360208110156102a657600080fd5b503561055f565b005b6102db600480360360408110156102c557600080fd5b506001600160a01b038135169060200135610677565b6040805192835260208301919091528051918290030190f35b6101f66004803603602081101561030a57600080fd5b50356001600160a01b03166106f0565b6102ad6004803603604081101561033057600080fd5b506001600160a01b03813516906020013561078a565b61034e610a38565b604080516001600160a01b039092168252519081900360200190f35b610139610a47565b6101da6004803603604081101561038857600080fd5b506001600160a01b038135169060200135610a6a565b6101da600480360360408110156103b457600080fd5b506001600160a01b038135169060200135610aa6565b6101f6600480360360408110156103e057600080fd5b506001600160a01b0381358116916020013516610abb565b6101da6004803603606081101561040e57600080fd5b506001600160a01b038135169060208101359060400135610ae6565b6101f66004803603602081101561044057600080fd5b50356001600160a01b0316610d45565b6102ad6004803603606081101561046657600080fd5b506001600160a01b038135169060208101359060400135610d60565b6102ad6004803603602081101561049857600080fd5b50356001600160a01b0316610f11565b604051806040016040528060088152602001600160c01b674d657461526172650281525081565b60006104dc338484610f6e565b50600192915050565b6002545b90565b60006104f784611060565b610502848484611283565b949350505050565b601281565b6af8277896582678ac00000081565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104dc91859061055a908663ffffffff6112d516565b610f6e565b6003546001600160a01b031633146105b05760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6003546105c5906001600160a01b0316611332565b81111561061c5760408051600160e51b62461bcd02815260206004820152601560248201527f42616c616e636520697320746f6f20736d616c6c2e0000000000000000000000604482015290519081900360640190fd5b600354610632906001600160a01b03168261134d565b6003546040805183815290516001600160a01b03909216917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59181900360200190a250565b6001600160a01b038216600090815260046020526040812080548291908490811061069e57fe5b600091825260208083206002909202909101546001600160a01b0387168352600490915260409091208054859081106106d357fe5b906000526020600020906002020160010154915091509250929050565b600080805b6001600160a01b038416600090815260046020526040902054811015610769576001600160a01b0384166000908152600460205260409020805461075f91908390811061073e57fe5b906000526020600020906002020160010154836112d590919063ffffffff16565b91506001016106f5565b506107838161077785611332565b9063ffffffff6112d516565b9392505050565b6003546001600160a01b031633146107db5760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b038216600090815260046020526040902054811061084a5760408051600160e51b62461bcd02815260206004820152601460248201527f4e6f206c6f636b20696e666f726d6174696f6e2e000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038216600090815260046020526040902080546108ac91908390811061087357fe5b60009182526020808320600160029093020191909101546001600160a01b0386168352908290526040909120549063ffffffff6112d516565b6001600160a01b03831660008181526020818152604080832094909455600490529190912080547f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f191908490811061090057fe5b9060005260206000209060020201600101546040518082815260200191505060405180910390a26001600160a01b038216600090815260046020526040812080548390811061094b57fe5b60009182526020808320600160029093020191909101929092556001600160a01b038416815260049091526040902054600019018114610a0a576001600160a01b0382166000908152600460205260409020805460001981019081106109ad57fe5b906000526020600020906002020160046000846001600160a01b03166001600160a01b0316815260200190815260200160002082815481106109eb57fe5b6000918252602090912082546002909202019081556001918201549101555b6001600160a01b0382166000908152600460205260409020805490610a33906000198301611674565b505050565b6003546001600160a01b031681565b604051806040016040528060048152602001600160e01b634d5452410281525081565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104dc91859061055a908663ffffffff61141716565b6000610ab133611060565b6107838383611477565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6003546000906001600160a01b03163314610b3a5760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b038416610b985760408051600160e51b62461bcd02815260206004820152600d60248201527f77726f6e67206164647265737300000000000000000000000000000000000000604482015290519081900360640190fd5b600354610bad906001600160a01b0316611332565b831115610c045760408051600160e51b62461bcd02815260206004820152601260248201527f4e6f7420656e6f7567682062616c616e63650000000000000000000000000000604482015290519081900360640190fd5b81421115610c4657604051600160e51b62461bcd02815260040180806020018281038252603281526020018061186d6032913960400191505060405180910390fd5b6003546001600160a01b0316600090815260208190526040902054610c71908463ffffffff61141716565b600380546001600160a01b039081166000908152602081815260408083209590955588831680835260048252858320865180880188528981528084018b815282546001818101855593875295859020915160029096029091019485555193019290925592548451888152945191949216926000805160206117e3833981519152928290030190a3604080518481526020810184905281516001600160a01b038716927f49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b928290030190a25060019392505050565b6001600160a01b031660009081526004602052604090205490565b6003546001600160a01b03163314610db15760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b81610dbb84611332565b1015610e115760408051600160e51b62461bcd02815260206004820152601560248201527f42616c616e636520697320746f6f20736d616c6c2e0000000000000000000000604482015290519081900360640190fd5b80421115610e5357604051600160e51b62461bcd02815260040180806020018281038252603281526020018061186d6032913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610e7c908363ffffffff61141716565b6001600160a01b0384166000818152602081815260408083209490945560048152838220845180860186528681528083018881528254600181810185559386529484902091516002909502909101938455519201919091558251858152908101849052825191927f49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b92918290030190a2505050565b6003546001600160a01b03163314610f625760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b610f6b81611484565b50565b6001600160a01b038316610fb657604051600160e51b62461bcd0281526004018080602001828103825260248152602001806118496024913960400191505060405180910390fd5b6001600160a01b038216610ffe57604051600160e51b62461bcd0281526004018080602001828103825260228152602001806117c16022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b60005b6001600160a01b03821660009081526004602052604090205481101561127f576001600160a01b03821660009081526004602052604090208054429190839081106110aa57fe5b90600052602060002090600202016000015411611277576001600160a01b038216600090815260046020526040902080546110ea91908390811061087357fe5b6001600160a01b03831660008181526020818152604080832094909455600490529190912080547f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f191908490811061113e57fe5b9060005260206000209060020201600101546040518082815260200191505060405180910390a26001600160a01b038216600090815260046020526040812080548390811061118957fe5b60009182526020808320600160029093020191909101929092556001600160a01b03841681526004909152604090205460001901811461124c576001600160a01b0382166000908152600460205260409020805460001981019081106111eb57fe5b906000526020600020906002020160046000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061122957fe5b600091825260209091208254600290920201908155600191820154910155600019015b6001600160a01b0382166000908152600460205260409020805490611275906000198301611674565b505b600101611063565b5050565b600061129084848461153e565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546112cb91869161055a908663ffffffff61141716565b5060019392505050565b6000828201838110156107835760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b031660009081526020819052604090205490565b6001600160a01b03821661139557604051600160e51b62461bcd0281526004018080602001828103825260218152602001806118036021913960400191505060405180910390fd5b6002546113a8908263ffffffff61141716565b6002556001600160a01b0382166000908152602081905260409020546113d4908263ffffffff61141716565b6001600160a01b038316600081815260208181526040808320949094558351858152935191936000805160206117e3833981519152929081900390910190a35050565b6000828211156114715760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006104dc33848461153e565b6001600160a01b0381166114e25760408051600160e51b62461bcd02815260206004820152600d60248201527f416c7265616479204f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661158657604051600160e51b62461bcd0281526004018080602001828103825260258152602001806118246025913960400191505060405180910390fd5b6001600160a01b0382166115ce57604051600160e51b62461bcd02815260040180806020018281038252602381526020018061179e6023913960400191505060405180910390fd5b6001600160a01b0383166000908152602081905260409020546115f7908263ffffffff61141716565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461162c908263ffffffff6112d516565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716926000805160206117e383398151915292918290030190a3505050565b815481835581811115610a3357600083815260209020610a33916104e99160029182028101918502015b808211156116b8576000808255600182015560020161169e565b5090565b6001600160a01b03821661171a5760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b60025461172d908263ffffffff6112d516565b6002556001600160a01b038216600090815260208190526040902054611759908263ffffffff6112d516565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391926000805160206117e38339815191529281900390910190a3505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373546f6b656e54696d656c6f636b3a2072656c656173652074696d65206973206265666f72652063757272656e742074696d65a165627a7a72305820c8bc32807c2b9933c0cd47be312926c1952ad13246d5cdb9f4fa96e8935d64c80029",
  1187. }
  1188. // MetaRareABI is the input ABI used to generate the binding from.
  1189. // Deprecated: Use MetaRareMetaData.ABI instead.
  1190. var MetaRareABI = MetaRareMetaData.ABI
  1191. // Deprecated: Use MetaRareMetaData.Sigs instead.
  1192. // MetaRareFuncSigs maps the 4-byte function signature to its string representation.
  1193. var MetaRareFuncSigs = MetaRareMetaData.Sigs
  1194. // MetaRareBin is the compiled bytecode used for deploying new contracts.
  1195. // Deprecated: Use MetaRareMetaData.Bin instead.
  1196. var MetaRareBin = MetaRareMetaData.Bin
  1197. // DeployMetaRare deploys a new Ethereum contract, binding an instance of MetaRare to it.
  1198. func DeployMetaRare(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MetaRare, error) {
  1199. parsed, err := MetaRareMetaData.GetAbi()
  1200. if err != nil {
  1201. return common.Address{}, nil, nil, err
  1202. }
  1203. if parsed == nil {
  1204. return common.Address{}, nil, nil, errors.New("GetABI returned nil")
  1205. }
  1206. address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MetaRareBin), backend)
  1207. if err != nil {
  1208. return common.Address{}, nil, nil, err
  1209. }
  1210. return address, tx, &MetaRare{MetaRareCaller: MetaRareCaller{contract: contract}, MetaRareTransactor: MetaRareTransactor{contract: contract}, MetaRareFilterer: MetaRareFilterer{contract: contract}}, nil
  1211. }
  1212. // MetaRare is an auto generated Go binding around an Ethereum contract.
  1213. type MetaRare struct {
  1214. MetaRareCaller // Read-only binding to the contract
  1215. MetaRareTransactor // Write-only binding to the contract
  1216. MetaRareFilterer // Log filterer for contract events
  1217. }
  1218. // MetaRareCaller is an auto generated read-only Go binding around an Ethereum contract.
  1219. type MetaRareCaller struct {
  1220. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  1221. }
  1222. // MetaRareTransactor is an auto generated write-only Go binding around an Ethereum contract.
  1223. type MetaRareTransactor struct {
  1224. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  1225. }
  1226. // MetaRareFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  1227. type MetaRareFilterer struct {
  1228. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  1229. }
  1230. // MetaRareSession is an auto generated Go binding around an Ethereum contract,
  1231. // with pre-set call and transact options.
  1232. type MetaRareSession struct {
  1233. Contract *MetaRare // Generic contract binding to set the session for
  1234. CallOpts bind.CallOpts // Call options to use throughout this session
  1235. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  1236. }
  1237. // MetaRareCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  1238. // with pre-set call options.
  1239. type MetaRareCallerSession struct {
  1240. Contract *MetaRareCaller // Generic contract caller binding to set the session for
  1241. CallOpts bind.CallOpts // Call options to use throughout this session
  1242. }
  1243. // MetaRareTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  1244. // with pre-set transact options.
  1245. type MetaRareTransactorSession struct {
  1246. Contract *MetaRareTransactor // Generic contract transactor binding to set the session for
  1247. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  1248. }
  1249. // MetaRareRaw is an auto generated low-level Go binding around an Ethereum contract.
  1250. type MetaRareRaw struct {
  1251. Contract *MetaRare // Generic contract binding to access the raw methods on
  1252. }
  1253. // MetaRareCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  1254. type MetaRareCallerRaw struct {
  1255. Contract *MetaRareCaller // Generic read-only contract binding to access the raw methods on
  1256. }
  1257. // MetaRareTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  1258. type MetaRareTransactorRaw struct {
  1259. Contract *MetaRareTransactor // Generic write-only contract binding to access the raw methods on
  1260. }
  1261. // NewMetaRare creates a new instance of MetaRare, bound to a specific deployed contract.
  1262. func NewMetaRare(address common.Address, backend bind.ContractBackend) (*MetaRare, error) {
  1263. contract, err := bindMetaRare(address, backend, backend, backend)
  1264. if err != nil {
  1265. return nil, err
  1266. }
  1267. return &MetaRare{MetaRareCaller: MetaRareCaller{contract: contract}, MetaRareTransactor: MetaRareTransactor{contract: contract}, MetaRareFilterer: MetaRareFilterer{contract: contract}}, nil
  1268. }
  1269. // NewMetaRareCaller creates a new read-only instance of MetaRare, bound to a specific deployed contract.
  1270. func NewMetaRareCaller(address common.Address, caller bind.ContractCaller) (*MetaRareCaller, error) {
  1271. contract, err := bindMetaRare(address, caller, nil, nil)
  1272. if err != nil {
  1273. return nil, err
  1274. }
  1275. return &MetaRareCaller{contract: contract}, nil
  1276. }
  1277. // NewMetaRareTransactor creates a new write-only instance of MetaRare, bound to a specific deployed contract.
  1278. func NewMetaRareTransactor(address common.Address, transactor bind.ContractTransactor) (*MetaRareTransactor, error) {
  1279. contract, err := bindMetaRare(address, nil, transactor, nil)
  1280. if err != nil {
  1281. return nil, err
  1282. }
  1283. return &MetaRareTransactor{contract: contract}, nil
  1284. }
  1285. // NewMetaRareFilterer creates a new log filterer instance of MetaRare, bound to a specific deployed contract.
  1286. func NewMetaRareFilterer(address common.Address, filterer bind.ContractFilterer) (*MetaRareFilterer, error) {
  1287. contract, err := bindMetaRare(address, nil, nil, filterer)
  1288. if err != nil {
  1289. return nil, err
  1290. }
  1291. return &MetaRareFilterer{contract: contract}, nil
  1292. }
  1293. // bindMetaRare binds a generic wrapper to an already deployed contract.
  1294. func bindMetaRare(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  1295. parsed, err := abi.JSON(strings.NewReader(MetaRareABI))
  1296. if err != nil {
  1297. return nil, err
  1298. }
  1299. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  1300. }
  1301. // Call invokes the (constant) contract method with params as input values and
  1302. // sets the output to result. The result type might be a single field for simple
  1303. // returns, a slice of interfaces for anonymous returns and a struct for named
  1304. // returns.
  1305. func (_MetaRare *MetaRareRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  1306. return _MetaRare.Contract.MetaRareCaller.contract.Call(opts, result, method, params...)
  1307. }
  1308. // Transfer initiates a plain transaction to move funds to the contract, calling
  1309. // its default method if one is available.
  1310. func (_MetaRare *MetaRareRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  1311. return _MetaRare.Contract.MetaRareTransactor.contract.Transfer(opts)
  1312. }
  1313. // Transact invokes the (paid) contract method with params as input values.
  1314. func (_MetaRare *MetaRareRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  1315. return _MetaRare.Contract.MetaRareTransactor.contract.Transact(opts, method, params...)
  1316. }
  1317. // Call invokes the (constant) contract method with params as input values and
  1318. // sets the output to result. The result type might be a single field for simple
  1319. // returns, a slice of interfaces for anonymous returns and a struct for named
  1320. // returns.
  1321. func (_MetaRare *MetaRareCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  1322. return _MetaRare.Contract.contract.Call(opts, result, method, params...)
  1323. }
  1324. // Transfer initiates a plain transaction to move funds to the contract, calling
  1325. // its default method if one is available.
  1326. func (_MetaRare *MetaRareTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  1327. return _MetaRare.Contract.contract.Transfer(opts)
  1328. }
  1329. // Transact invokes the (paid) contract method with params as input values.
  1330. func (_MetaRare *MetaRareTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  1331. return _MetaRare.Contract.contract.Transact(opts, method, params...)
  1332. }
  1333. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  1334. //
  1335. // Solidity: function allowance(address owner, address spender) view returns(uint256)
  1336. func (_MetaRare *MetaRareCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) {
  1337. var out []interface{}
  1338. err := _MetaRare.contract.Call(opts, &out, "allowance", owner, spender)
  1339. if err != nil {
  1340. return *new(*big.Int), err
  1341. }
  1342. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  1343. return out0, err
  1344. }
  1345. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  1346. //
  1347. // Solidity: function allowance(address owner, address spender) view returns(uint256)
  1348. func (_MetaRare *MetaRareSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
  1349. return _MetaRare.Contract.Allowance(&_MetaRare.CallOpts, owner, spender)
  1350. }
  1351. // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
  1352. //
  1353. // Solidity: function allowance(address owner, address spender) view returns(uint256)
  1354. func (_MetaRare *MetaRareCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
  1355. return _MetaRare.Contract.Allowance(&_MetaRare.CallOpts, owner, spender)
  1356. }
  1357. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  1358. //
  1359. // Solidity: function balanceOf(address _holder) view returns(uint256 balance)
  1360. func (_MetaRare *MetaRareCaller) BalanceOf(opts *bind.CallOpts, _holder common.Address) (*big.Int, error) {
  1361. var out []interface{}
  1362. err := _MetaRare.contract.Call(opts, &out, "balanceOf", _holder)
  1363. if err != nil {
  1364. return *new(*big.Int), err
  1365. }
  1366. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  1367. return out0, err
  1368. }
  1369. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  1370. //
  1371. // Solidity: function balanceOf(address _holder) view returns(uint256 balance)
  1372. func (_MetaRare *MetaRareSession) BalanceOf(_holder common.Address) (*big.Int, error) {
  1373. return _MetaRare.Contract.BalanceOf(&_MetaRare.CallOpts, _holder)
  1374. }
  1375. // BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
  1376. //
  1377. // Solidity: function balanceOf(address _holder) view returns(uint256 balance)
  1378. func (_MetaRare *MetaRareCallerSession) BalanceOf(_holder common.Address) (*big.Int, error) {
  1379. return _MetaRare.Contract.BalanceOf(&_MetaRare.CallOpts, _holder)
  1380. }
  1381. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  1382. //
  1383. // Solidity: function decimals() view returns(uint8)
  1384. func (_MetaRare *MetaRareCaller) Decimals(opts *bind.CallOpts) (uint8, error) {
  1385. var out []interface{}
  1386. err := _MetaRare.contract.Call(opts, &out, "decimals")
  1387. if err != nil {
  1388. return *new(uint8), err
  1389. }
  1390. out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
  1391. return out0, err
  1392. }
  1393. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  1394. //
  1395. // Solidity: function decimals() view returns(uint8)
  1396. func (_MetaRare *MetaRareSession) Decimals() (uint8, error) {
  1397. return _MetaRare.Contract.Decimals(&_MetaRare.CallOpts)
  1398. }
  1399. // Decimals is a free data retrieval call binding the contract method 0x313ce567.
  1400. //
  1401. // Solidity: function decimals() view returns(uint8)
  1402. func (_MetaRare *MetaRareCallerSession) Decimals() (uint8, error) {
  1403. return _MetaRare.Contract.Decimals(&_MetaRare.CallOpts)
  1404. }
  1405. // InitialSupply is a free data retrieval call binding the contract method 0x378dc3dc.
  1406. //
  1407. // Solidity: function initialSupply() view returns(uint256)
  1408. func (_MetaRare *MetaRareCaller) InitialSupply(opts *bind.CallOpts) (*big.Int, error) {
  1409. var out []interface{}
  1410. err := _MetaRare.contract.Call(opts, &out, "initialSupply")
  1411. if err != nil {
  1412. return *new(*big.Int), err
  1413. }
  1414. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  1415. return out0, err
  1416. }
  1417. // InitialSupply is a free data retrieval call binding the contract method 0x378dc3dc.
  1418. //
  1419. // Solidity: function initialSupply() view returns(uint256)
  1420. func (_MetaRare *MetaRareSession) InitialSupply() (*big.Int, error) {
  1421. return _MetaRare.Contract.InitialSupply(&_MetaRare.CallOpts)
  1422. }
  1423. // InitialSupply is a free data retrieval call binding the contract method 0x378dc3dc.
  1424. //
  1425. // Solidity: function initialSupply() view returns(uint256)
  1426. func (_MetaRare *MetaRareCallerSession) InitialSupply() (*big.Int, error) {
  1427. return _MetaRare.Contract.InitialSupply(&_MetaRare.CallOpts)
  1428. }
  1429. // LockCount is a free data retrieval call binding the contract method 0xdf034586.
  1430. //
  1431. // Solidity: function lockCount(address _holder) view returns(uint256)
  1432. func (_MetaRare *MetaRareCaller) LockCount(opts *bind.CallOpts, _holder common.Address) (*big.Int, error) {
  1433. var out []interface{}
  1434. err := _MetaRare.contract.Call(opts, &out, "lockCount", _holder)
  1435. if err != nil {
  1436. return *new(*big.Int), err
  1437. }
  1438. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  1439. return out0, err
  1440. }
  1441. // LockCount is a free data retrieval call binding the contract method 0xdf034586.
  1442. //
  1443. // Solidity: function lockCount(address _holder) view returns(uint256)
  1444. func (_MetaRare *MetaRareSession) LockCount(_holder common.Address) (*big.Int, error) {
  1445. return _MetaRare.Contract.LockCount(&_MetaRare.CallOpts, _holder)
  1446. }
  1447. // LockCount is a free data retrieval call binding the contract method 0xdf034586.
  1448. //
  1449. // Solidity: function lockCount(address _holder) view returns(uint256)
  1450. func (_MetaRare *MetaRareCallerSession) LockCount(_holder common.Address) (*big.Int, error) {
  1451. return _MetaRare.Contract.LockCount(&_MetaRare.CallOpts, _holder)
  1452. }
  1453. // LockState is a free data retrieval call binding the contract method 0x46cf1bb5.
  1454. //
  1455. // Solidity: function lockState(address _holder, uint256 _idx) view returns(uint256, uint256)
  1456. func (_MetaRare *MetaRareCaller) LockState(opts *bind.CallOpts, _holder common.Address, _idx *big.Int) (*big.Int, *big.Int, error) {
  1457. var out []interface{}
  1458. err := _MetaRare.contract.Call(opts, &out, "lockState", _holder, _idx)
  1459. if err != nil {
  1460. return *new(*big.Int), *new(*big.Int), err
  1461. }
  1462. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  1463. out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
  1464. return out0, out1, err
  1465. }
  1466. // LockState is a free data retrieval call binding the contract method 0x46cf1bb5.
  1467. //
  1468. // Solidity: function lockState(address _holder, uint256 _idx) view returns(uint256, uint256)
  1469. func (_MetaRare *MetaRareSession) LockState(_holder common.Address, _idx *big.Int) (*big.Int, *big.Int, error) {
  1470. return _MetaRare.Contract.LockState(&_MetaRare.CallOpts, _holder, _idx)
  1471. }
  1472. // LockState is a free data retrieval call binding the contract method 0x46cf1bb5.
  1473. //
  1474. // Solidity: function lockState(address _holder, uint256 _idx) view returns(uint256, uint256)
  1475. func (_MetaRare *MetaRareCallerSession) LockState(_holder common.Address, _idx *big.Int) (*big.Int, *big.Int, error) {
  1476. return _MetaRare.Contract.LockState(&_MetaRare.CallOpts, _holder, _idx)
  1477. }
  1478. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  1479. //
  1480. // Solidity: function name() view returns(string)
  1481. func (_MetaRare *MetaRareCaller) Name(opts *bind.CallOpts) (string, error) {
  1482. var out []interface{}
  1483. err := _MetaRare.contract.Call(opts, &out, "name")
  1484. if err != nil {
  1485. return *new(string), err
  1486. }
  1487. out0 := *abi.ConvertType(out[0], new(string)).(*string)
  1488. return out0, err
  1489. }
  1490. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  1491. //
  1492. // Solidity: function name() view returns(string)
  1493. func (_MetaRare *MetaRareSession) Name() (string, error) {
  1494. return _MetaRare.Contract.Name(&_MetaRare.CallOpts)
  1495. }
  1496. // Name is a free data retrieval call binding the contract method 0x06fdde03.
  1497. //
  1498. // Solidity: function name() view returns(string)
  1499. func (_MetaRare *MetaRareCallerSession) Name() (string, error) {
  1500. return _MetaRare.Contract.Name(&_MetaRare.CallOpts)
  1501. }
  1502. // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
  1503. //
  1504. // Solidity: function owner() view returns(address)
  1505. func (_MetaRare *MetaRareCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
  1506. var out []interface{}
  1507. err := _MetaRare.contract.Call(opts, &out, "owner")
  1508. if err != nil {
  1509. return *new(common.Address), err
  1510. }
  1511. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  1512. return out0, err
  1513. }
  1514. // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
  1515. //
  1516. // Solidity: function owner() view returns(address)
  1517. func (_MetaRare *MetaRareSession) Owner() (common.Address, error) {
  1518. return _MetaRare.Contract.Owner(&_MetaRare.CallOpts)
  1519. }
  1520. // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
  1521. //
  1522. // Solidity: function owner() view returns(address)
  1523. func (_MetaRare *MetaRareCallerSession) Owner() (common.Address, error) {
  1524. return _MetaRare.Contract.Owner(&_MetaRare.CallOpts)
  1525. }
  1526. // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
  1527. //
  1528. // Solidity: function symbol() view returns(string)
  1529. func (_MetaRare *MetaRareCaller) Symbol(opts *bind.CallOpts) (string, error) {
  1530. var out []interface{}
  1531. err := _MetaRare.contract.Call(opts, &out, "symbol")
  1532. if err != nil {
  1533. return *new(string), err
  1534. }
  1535. out0 := *abi.ConvertType(out[0], new(string)).(*string)
  1536. return out0, err
  1537. }
  1538. // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
  1539. //
  1540. // Solidity: function symbol() view returns(string)
  1541. func (_MetaRare *MetaRareSession) Symbol() (string, error) {
  1542. return _MetaRare.Contract.Symbol(&_MetaRare.CallOpts)
  1543. }
  1544. // Symbol is a free data retrieval call binding the contract method 0x95d89b41.
  1545. //
  1546. // Solidity: function symbol() view returns(string)
  1547. func (_MetaRare *MetaRareCallerSession) Symbol() (string, error) {
  1548. return _MetaRare.Contract.Symbol(&_MetaRare.CallOpts)
  1549. }
  1550. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  1551. //
  1552. // Solidity: function totalSupply() view returns(uint256)
  1553. func (_MetaRare *MetaRareCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
  1554. var out []interface{}
  1555. err := _MetaRare.contract.Call(opts, &out, "totalSupply")
  1556. if err != nil {
  1557. return *new(*big.Int), err
  1558. }
  1559. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  1560. return out0, err
  1561. }
  1562. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  1563. //
  1564. // Solidity: function totalSupply() view returns(uint256)
  1565. func (_MetaRare *MetaRareSession) TotalSupply() (*big.Int, error) {
  1566. return _MetaRare.Contract.TotalSupply(&_MetaRare.CallOpts)
  1567. }
  1568. // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
  1569. //
  1570. // Solidity: function totalSupply() view returns(uint256)
  1571. func (_MetaRare *MetaRareCallerSession) TotalSupply() (*big.Int, error) {
  1572. return _MetaRare.Contract.TotalSupply(&_MetaRare.CallOpts)
  1573. }
  1574. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  1575. //
  1576. // Solidity: function approve(address spender, uint256 value) returns(bool)
  1577. func (_MetaRare *MetaRareTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) {
  1578. return _MetaRare.contract.Transact(opts, "approve", spender, value)
  1579. }
  1580. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  1581. //
  1582. // Solidity: function approve(address spender, uint256 value) returns(bool)
  1583. func (_MetaRare *MetaRareSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) {
  1584. return _MetaRare.Contract.Approve(&_MetaRare.TransactOpts, spender, value)
  1585. }
  1586. // Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
  1587. //
  1588. // Solidity: function approve(address spender, uint256 value) returns(bool)
  1589. func (_MetaRare *MetaRareTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) {
  1590. return _MetaRare.Contract.Approve(&_MetaRare.TransactOpts, spender, value)
  1591. }
  1592. // Burn is a paid mutator transaction binding the contract method 0x42966c68.
  1593. //
  1594. // Solidity: function burn(uint256 _value) returns()
  1595. func (_MetaRare *MetaRareTransactor) Burn(opts *bind.TransactOpts, _value *big.Int) (*types.Transaction, error) {
  1596. return _MetaRare.contract.Transact(opts, "burn", _value)
  1597. }
  1598. // Burn is a paid mutator transaction binding the contract method 0x42966c68.
  1599. //
  1600. // Solidity: function burn(uint256 _value) returns()
  1601. func (_MetaRare *MetaRareSession) Burn(_value *big.Int) (*types.Transaction, error) {
  1602. return _MetaRare.Contract.Burn(&_MetaRare.TransactOpts, _value)
  1603. }
  1604. // Burn is a paid mutator transaction binding the contract method 0x42966c68.
  1605. //
  1606. // Solidity: function burn(uint256 _value) returns()
  1607. func (_MetaRare *MetaRareTransactorSession) Burn(_value *big.Int) (*types.Transaction, error) {
  1608. return _MetaRare.Contract.Burn(&_MetaRare.TransactOpts, _value)
  1609. }
  1610. // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
  1611. //
  1612. // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
  1613. func (_MetaRare *MetaRareTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
  1614. return _MetaRare.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue)
  1615. }
  1616. // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
  1617. //
  1618. // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
  1619. func (_MetaRare *MetaRareSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
  1620. return _MetaRare.Contract.DecreaseAllowance(&_MetaRare.TransactOpts, spender, subtractedValue)
  1621. }
  1622. // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
  1623. //
  1624. // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
  1625. func (_MetaRare *MetaRareTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
  1626. return _MetaRare.Contract.DecreaseAllowance(&_MetaRare.TransactOpts, spender, subtractedValue)
  1627. }
  1628. // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
  1629. //
  1630. // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
  1631. func (_MetaRare *MetaRareTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
  1632. return _MetaRare.contract.Transact(opts, "increaseAllowance", spender, addedValue)
  1633. }
  1634. // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
  1635. //
  1636. // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
  1637. func (_MetaRare *MetaRareSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
  1638. return _MetaRare.Contract.IncreaseAllowance(&_MetaRare.TransactOpts, spender, addedValue)
  1639. }
  1640. // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
  1641. //
  1642. // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
  1643. func (_MetaRare *MetaRareTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
  1644. return _MetaRare.Contract.IncreaseAllowance(&_MetaRare.TransactOpts, spender, addedValue)
  1645. }
  1646. // Lock is a paid mutator transaction binding the contract method 0xe2ab691d.
  1647. //
  1648. // Solidity: function lock(address _holder, uint256 _amount, uint256 _releaseTime) returns()
  1649. func (_MetaRare *MetaRareTransactor) Lock(opts *bind.TransactOpts, _holder common.Address, _amount *big.Int, _releaseTime *big.Int) (*types.Transaction, error) {
  1650. return _MetaRare.contract.Transact(opts, "lock", _holder, _amount, _releaseTime)
  1651. }
  1652. // Lock is a paid mutator transaction binding the contract method 0xe2ab691d.
  1653. //
  1654. // Solidity: function lock(address _holder, uint256 _amount, uint256 _releaseTime) returns()
  1655. func (_MetaRare *MetaRareSession) Lock(_holder common.Address, _amount *big.Int, _releaseTime *big.Int) (*types.Transaction, error) {
  1656. return _MetaRare.Contract.Lock(&_MetaRare.TransactOpts, _holder, _amount, _releaseTime)
  1657. }
  1658. // Lock is a paid mutator transaction binding the contract method 0xe2ab691d.
  1659. //
  1660. // Solidity: function lock(address _holder, uint256 _amount, uint256 _releaseTime) returns()
  1661. func (_MetaRare *MetaRareTransactorSession) Lock(_holder common.Address, _amount *big.Int, _releaseTime *big.Int) (*types.Transaction, error) {
  1662. return _MetaRare.Contract.Lock(&_MetaRare.TransactOpts, _holder, _amount, _releaseTime)
  1663. }
  1664. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  1665. //
  1666. // Solidity: function transfer(address _to, uint256 _value) returns(bool)
  1667. func (_MetaRare *MetaRareTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) {
  1668. return _MetaRare.contract.Transact(opts, "transfer", _to, _value)
  1669. }
  1670. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  1671. //
  1672. // Solidity: function transfer(address _to, uint256 _value) returns(bool)
  1673. func (_MetaRare *MetaRareSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) {
  1674. return _MetaRare.Contract.Transfer(&_MetaRare.TransactOpts, _to, _value)
  1675. }
  1676. // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
  1677. //
  1678. // Solidity: function transfer(address _to, uint256 _value) returns(bool)
  1679. func (_MetaRare *MetaRareTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) {
  1680. return _MetaRare.Contract.Transfer(&_MetaRare.TransactOpts, _to, _value)
  1681. }
  1682. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  1683. //
  1684. // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool)
  1685. func (_MetaRare *MetaRareTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) {
  1686. return _MetaRare.contract.Transact(opts, "transferFrom", _from, _to, _value)
  1687. }
  1688. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  1689. //
  1690. // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool)
  1691. func (_MetaRare *MetaRareSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) {
  1692. return _MetaRare.Contract.TransferFrom(&_MetaRare.TransactOpts, _from, _to, _value)
  1693. }
  1694. // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
  1695. //
  1696. // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool)
  1697. func (_MetaRare *MetaRareTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) {
  1698. return _MetaRare.Contract.TransferFrom(&_MetaRare.TransactOpts, _from, _to, _value)
  1699. }
  1700. // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
  1701. //
  1702. // Solidity: function transferOwnership(address _newOwner) returns()
  1703. func (_MetaRare *MetaRareTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) {
  1704. return _MetaRare.contract.Transact(opts, "transferOwnership", _newOwner)
  1705. }
  1706. // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
  1707. //
  1708. // Solidity: function transferOwnership(address _newOwner) returns()
  1709. func (_MetaRare *MetaRareSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) {
  1710. return _MetaRare.Contract.TransferOwnership(&_MetaRare.TransactOpts, _newOwner)
  1711. }
  1712. // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
  1713. //
  1714. // Solidity: function transferOwnership(address _newOwner) returns()
  1715. func (_MetaRare *MetaRareTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) {
  1716. return _MetaRare.Contract.TransferOwnership(&_MetaRare.TransactOpts, _newOwner)
  1717. }
  1718. // TransferWithLock is a paid mutator transaction binding the contract method 0xde6baccb.
  1719. //
  1720. // Solidity: function transferWithLock(address _to, uint256 _value, uint256 _releaseTime) returns(bool)
  1721. func (_MetaRare *MetaRareTransactor) TransferWithLock(opts *bind.TransactOpts, _to common.Address, _value *big.Int, _releaseTime *big.Int) (*types.Transaction, error) {
  1722. return _MetaRare.contract.Transact(opts, "transferWithLock", _to, _value, _releaseTime)
  1723. }
  1724. // TransferWithLock is a paid mutator transaction binding the contract method 0xde6baccb.
  1725. //
  1726. // Solidity: function transferWithLock(address _to, uint256 _value, uint256 _releaseTime) returns(bool)
  1727. func (_MetaRare *MetaRareSession) TransferWithLock(_to common.Address, _value *big.Int, _releaseTime *big.Int) (*types.Transaction, error) {
  1728. return _MetaRare.Contract.TransferWithLock(&_MetaRare.TransactOpts, _to, _value, _releaseTime)
  1729. }
  1730. // TransferWithLock is a paid mutator transaction binding the contract method 0xde6baccb.
  1731. //
  1732. // Solidity: function transferWithLock(address _to, uint256 _value, uint256 _releaseTime) returns(bool)
  1733. func (_MetaRare *MetaRareTransactorSession) TransferWithLock(_to common.Address, _value *big.Int, _releaseTime *big.Int) (*types.Transaction, error) {
  1734. return _MetaRare.Contract.TransferWithLock(&_MetaRare.TransactOpts, _to, _value, _releaseTime)
  1735. }
  1736. // Unlock is a paid mutator transaction binding the contract method 0x7eee288d.
  1737. //
  1738. // Solidity: function unlock(address _holder, uint256 i) returns()
  1739. func (_MetaRare *MetaRareTransactor) Unlock(opts *bind.TransactOpts, _holder common.Address, i *big.Int) (*types.Transaction, error) {
  1740. return _MetaRare.contract.Transact(opts, "unlock", _holder, i)
  1741. }
  1742. // Unlock is a paid mutator transaction binding the contract method 0x7eee288d.
  1743. //
  1744. // Solidity: function unlock(address _holder, uint256 i) returns()
  1745. func (_MetaRare *MetaRareSession) Unlock(_holder common.Address, i *big.Int) (*types.Transaction, error) {
  1746. return _MetaRare.Contract.Unlock(&_MetaRare.TransactOpts, _holder, i)
  1747. }
  1748. // Unlock is a paid mutator transaction binding the contract method 0x7eee288d.
  1749. //
  1750. // Solidity: function unlock(address _holder, uint256 i) returns()
  1751. func (_MetaRare *MetaRareTransactorSession) Unlock(_holder common.Address, i *big.Int) (*types.Transaction, error) {
  1752. return _MetaRare.Contract.Unlock(&_MetaRare.TransactOpts, _holder, i)
  1753. }
  1754. // MetaRareApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the MetaRare contract.
  1755. type MetaRareApprovalIterator struct {
  1756. Event *MetaRareApproval // Event containing the contract specifics and raw log
  1757. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1758. event string // Event name to use for unpacking event data
  1759. logs chan types.Log // Log channel receiving the found contract events
  1760. sub ethereum.Subscription // Subscription for errors, completion and termination
  1761. done bool // Whether the subscription completed delivering logs
  1762. fail error // Occurred error to stop iteration
  1763. }
  1764. // Next advances the iterator to the subsequent event, returning whether there
  1765. // are any more events found. In case of a retrieval or parsing error, false is
  1766. // returned and Error() can be queried for the exact failure.
  1767. func (it *MetaRareApprovalIterator) Next() bool {
  1768. // If the iterator failed, stop iterating
  1769. if it.fail != nil {
  1770. return false
  1771. }
  1772. // If the iterator completed, deliver directly whatever's available
  1773. if it.done {
  1774. select {
  1775. case log := <-it.logs:
  1776. it.Event = new(MetaRareApproval)
  1777. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1778. it.fail = err
  1779. return false
  1780. }
  1781. it.Event.Raw = log
  1782. return true
  1783. default:
  1784. return false
  1785. }
  1786. }
  1787. // Iterator still in progress, wait for either a data or an error event
  1788. select {
  1789. case log := <-it.logs:
  1790. it.Event = new(MetaRareApproval)
  1791. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1792. it.fail = err
  1793. return false
  1794. }
  1795. it.Event.Raw = log
  1796. return true
  1797. case err := <-it.sub.Err():
  1798. it.done = true
  1799. it.fail = err
  1800. return it.Next()
  1801. }
  1802. }
  1803. // Error returns any retrieval or parsing error occurred during filtering.
  1804. func (it *MetaRareApprovalIterator) Error() error {
  1805. return it.fail
  1806. }
  1807. // Close terminates the iteration process, releasing any pending underlying
  1808. // resources.
  1809. func (it *MetaRareApprovalIterator) Close() error {
  1810. it.sub.Unsubscribe()
  1811. return nil
  1812. }
  1813. // MetaRareApproval represents a Approval event raised by the MetaRare contract.
  1814. type MetaRareApproval struct {
  1815. Owner common.Address
  1816. Spender common.Address
  1817. Value *big.Int
  1818. Raw types.Log // Blockchain specific contextual infos
  1819. }
  1820. // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  1821. //
  1822. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  1823. func (_MetaRare *MetaRareFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*MetaRareApprovalIterator, error) {
  1824. var ownerRule []interface{}
  1825. for _, ownerItem := range owner {
  1826. ownerRule = append(ownerRule, ownerItem)
  1827. }
  1828. var spenderRule []interface{}
  1829. for _, spenderItem := range spender {
  1830. spenderRule = append(spenderRule, spenderItem)
  1831. }
  1832. logs, sub, err := _MetaRare.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule)
  1833. if err != nil {
  1834. return nil, err
  1835. }
  1836. return &MetaRareApprovalIterator{contract: _MetaRare.contract, event: "Approval", logs: logs, sub: sub}, nil
  1837. }
  1838. // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  1839. //
  1840. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  1841. func (_MetaRare *MetaRareFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *MetaRareApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) {
  1842. var ownerRule []interface{}
  1843. for _, ownerItem := range owner {
  1844. ownerRule = append(ownerRule, ownerItem)
  1845. }
  1846. var spenderRule []interface{}
  1847. for _, spenderItem := range spender {
  1848. spenderRule = append(spenderRule, spenderItem)
  1849. }
  1850. logs, sub, err := _MetaRare.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule)
  1851. if err != nil {
  1852. return nil, err
  1853. }
  1854. return event.NewSubscription(func(quit <-chan struct{}) error {
  1855. defer sub.Unsubscribe()
  1856. for {
  1857. select {
  1858. case log := <-logs:
  1859. // New log arrived, parse the event and forward to the user
  1860. event := new(MetaRareApproval)
  1861. if err := _MetaRare.contract.UnpackLog(event, "Approval", log); err != nil {
  1862. return err
  1863. }
  1864. event.Raw = log
  1865. select {
  1866. case sink <- event:
  1867. case err := <-sub.Err():
  1868. return err
  1869. case <-quit:
  1870. return nil
  1871. }
  1872. case err := <-sub.Err():
  1873. return err
  1874. case <-quit:
  1875. return nil
  1876. }
  1877. }
  1878. }), nil
  1879. }
  1880. // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
  1881. //
  1882. // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
  1883. func (_MetaRare *MetaRareFilterer) ParseApproval(log types.Log) (*MetaRareApproval, error) {
  1884. event := new(MetaRareApproval)
  1885. if err := _MetaRare.contract.UnpackLog(event, "Approval", log); err != nil {
  1886. return nil, err
  1887. }
  1888. event.Raw = log
  1889. return event, nil
  1890. }
  1891. // MetaRareBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the MetaRare contract.
  1892. type MetaRareBurnIterator struct {
  1893. Event *MetaRareBurn // Event containing the contract specifics and raw log
  1894. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1895. event string // Event name to use for unpacking event data
  1896. logs chan types.Log // Log channel receiving the found contract events
  1897. sub ethereum.Subscription // Subscription for errors, completion and termination
  1898. done bool // Whether the subscription completed delivering logs
  1899. fail error // Occurred error to stop iteration
  1900. }
  1901. // Next advances the iterator to the subsequent event, returning whether there
  1902. // are any more events found. In case of a retrieval or parsing error, false is
  1903. // returned and Error() can be queried for the exact failure.
  1904. func (it *MetaRareBurnIterator) Next() bool {
  1905. // If the iterator failed, stop iterating
  1906. if it.fail != nil {
  1907. return false
  1908. }
  1909. // If the iterator completed, deliver directly whatever's available
  1910. if it.done {
  1911. select {
  1912. case log := <-it.logs:
  1913. it.Event = new(MetaRareBurn)
  1914. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1915. it.fail = err
  1916. return false
  1917. }
  1918. it.Event.Raw = log
  1919. return true
  1920. default:
  1921. return false
  1922. }
  1923. }
  1924. // Iterator still in progress, wait for either a data or an error event
  1925. select {
  1926. case log := <-it.logs:
  1927. it.Event = new(MetaRareBurn)
  1928. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1929. it.fail = err
  1930. return false
  1931. }
  1932. it.Event.Raw = log
  1933. return true
  1934. case err := <-it.sub.Err():
  1935. it.done = true
  1936. it.fail = err
  1937. return it.Next()
  1938. }
  1939. }
  1940. // Error returns any retrieval or parsing error occurred during filtering.
  1941. func (it *MetaRareBurnIterator) Error() error {
  1942. return it.fail
  1943. }
  1944. // Close terminates the iteration process, releasing any pending underlying
  1945. // resources.
  1946. func (it *MetaRareBurnIterator) Close() error {
  1947. it.sub.Unsubscribe()
  1948. return nil
  1949. }
  1950. // MetaRareBurn represents a Burn event raised by the MetaRare contract.
  1951. type MetaRareBurn struct {
  1952. Burner common.Address
  1953. Value *big.Int
  1954. Raw types.Log // Blockchain specific contextual infos
  1955. }
  1956. // FilterBurn is a free log retrieval operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5.
  1957. //
  1958. // Solidity: event Burn(address indexed burner, uint256 value)
  1959. func (_MetaRare *MetaRareFilterer) FilterBurn(opts *bind.FilterOpts, burner []common.Address) (*MetaRareBurnIterator, error) {
  1960. var burnerRule []interface{}
  1961. for _, burnerItem := range burner {
  1962. burnerRule = append(burnerRule, burnerItem)
  1963. }
  1964. logs, sub, err := _MetaRare.contract.FilterLogs(opts, "Burn", burnerRule)
  1965. if err != nil {
  1966. return nil, err
  1967. }
  1968. return &MetaRareBurnIterator{contract: _MetaRare.contract, event: "Burn", logs: logs, sub: sub}, nil
  1969. }
  1970. // WatchBurn is a free log subscription operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5.
  1971. //
  1972. // Solidity: event Burn(address indexed burner, uint256 value)
  1973. func (_MetaRare *MetaRareFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *MetaRareBurn, burner []common.Address) (event.Subscription, error) {
  1974. var burnerRule []interface{}
  1975. for _, burnerItem := range burner {
  1976. burnerRule = append(burnerRule, burnerItem)
  1977. }
  1978. logs, sub, err := _MetaRare.contract.WatchLogs(opts, "Burn", burnerRule)
  1979. if err != nil {
  1980. return nil, err
  1981. }
  1982. return event.NewSubscription(func(quit <-chan struct{}) error {
  1983. defer sub.Unsubscribe()
  1984. for {
  1985. select {
  1986. case log := <-logs:
  1987. // New log arrived, parse the event and forward to the user
  1988. event := new(MetaRareBurn)
  1989. if err := _MetaRare.contract.UnpackLog(event, "Burn", log); err != nil {
  1990. return err
  1991. }
  1992. event.Raw = log
  1993. select {
  1994. case sink <- event:
  1995. case err := <-sub.Err():
  1996. return err
  1997. case <-quit:
  1998. return nil
  1999. }
  2000. case err := <-sub.Err():
  2001. return err
  2002. case <-quit:
  2003. return nil
  2004. }
  2005. }
  2006. }), nil
  2007. }
  2008. // ParseBurn is a log parse operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5.
  2009. //
  2010. // Solidity: event Burn(address indexed burner, uint256 value)
  2011. func (_MetaRare *MetaRareFilterer) ParseBurn(log types.Log) (*MetaRareBurn, error) {
  2012. event := new(MetaRareBurn)
  2013. if err := _MetaRare.contract.UnpackLog(event, "Burn", log); err != nil {
  2014. return nil, err
  2015. }
  2016. event.Raw = log
  2017. return event, nil
  2018. }
  2019. // MetaRareLockIterator is returned from FilterLock and is used to iterate over the raw logs and unpacked data for Lock events raised by the MetaRare contract.
  2020. type MetaRareLockIterator struct {
  2021. Event *MetaRareLock // Event containing the contract specifics and raw log
  2022. contract *bind.BoundContract // Generic contract to use for unpacking event data
  2023. event string // Event name to use for unpacking event data
  2024. logs chan types.Log // Log channel receiving the found contract events
  2025. sub ethereum.Subscription // Subscription for errors, completion and termination
  2026. done bool // Whether the subscription completed delivering logs
  2027. fail error // Occurred error to stop iteration
  2028. }
  2029. // Next advances the iterator to the subsequent event, returning whether there
  2030. // are any more events found. In case of a retrieval or parsing error, false is
  2031. // returned and Error() can be queried for the exact failure.
  2032. func (it *MetaRareLockIterator) Next() bool {
  2033. // If the iterator failed, stop iterating
  2034. if it.fail != nil {
  2035. return false
  2036. }
  2037. // If the iterator completed, deliver directly whatever's available
  2038. if it.done {
  2039. select {
  2040. case log := <-it.logs:
  2041. it.Event = new(MetaRareLock)
  2042. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2043. it.fail = err
  2044. return false
  2045. }
  2046. it.Event.Raw = log
  2047. return true
  2048. default:
  2049. return false
  2050. }
  2051. }
  2052. // Iterator still in progress, wait for either a data or an error event
  2053. select {
  2054. case log := <-it.logs:
  2055. it.Event = new(MetaRareLock)
  2056. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2057. it.fail = err
  2058. return false
  2059. }
  2060. it.Event.Raw = log
  2061. return true
  2062. case err := <-it.sub.Err():
  2063. it.done = true
  2064. it.fail = err
  2065. return it.Next()
  2066. }
  2067. }
  2068. // Error returns any retrieval or parsing error occurred during filtering.
  2069. func (it *MetaRareLockIterator) Error() error {
  2070. return it.fail
  2071. }
  2072. // Close terminates the iteration process, releasing any pending underlying
  2073. // resources.
  2074. func (it *MetaRareLockIterator) Close() error {
  2075. it.sub.Unsubscribe()
  2076. return nil
  2077. }
  2078. // MetaRareLock represents a Lock event raised by the MetaRare contract.
  2079. type MetaRareLock struct {
  2080. Holder common.Address
  2081. Value *big.Int
  2082. ReleaseTime *big.Int
  2083. Raw types.Log // Blockchain specific contextual infos
  2084. }
  2085. // FilterLock is a free log retrieval operation binding the contract event 0x49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b.
  2086. //
  2087. // Solidity: event Lock(address indexed holder, uint256 value, uint256 releaseTime)
  2088. func (_MetaRare *MetaRareFilterer) FilterLock(opts *bind.FilterOpts, holder []common.Address) (*MetaRareLockIterator, error) {
  2089. var holderRule []interface{}
  2090. for _, holderItem := range holder {
  2091. holderRule = append(holderRule, holderItem)
  2092. }
  2093. logs, sub, err := _MetaRare.contract.FilterLogs(opts, "Lock", holderRule)
  2094. if err != nil {
  2095. return nil, err
  2096. }
  2097. return &MetaRareLockIterator{contract: _MetaRare.contract, event: "Lock", logs: logs, sub: sub}, nil
  2098. }
  2099. // WatchLock is a free log subscription operation binding the contract event 0x49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b.
  2100. //
  2101. // Solidity: event Lock(address indexed holder, uint256 value, uint256 releaseTime)
  2102. func (_MetaRare *MetaRareFilterer) WatchLock(opts *bind.WatchOpts, sink chan<- *MetaRareLock, holder []common.Address) (event.Subscription, error) {
  2103. var holderRule []interface{}
  2104. for _, holderItem := range holder {
  2105. holderRule = append(holderRule, holderItem)
  2106. }
  2107. logs, sub, err := _MetaRare.contract.WatchLogs(opts, "Lock", holderRule)
  2108. if err != nil {
  2109. return nil, err
  2110. }
  2111. return event.NewSubscription(func(quit <-chan struct{}) error {
  2112. defer sub.Unsubscribe()
  2113. for {
  2114. select {
  2115. case log := <-logs:
  2116. // New log arrived, parse the event and forward to the user
  2117. event := new(MetaRareLock)
  2118. if err := _MetaRare.contract.UnpackLog(event, "Lock", log); err != nil {
  2119. return err
  2120. }
  2121. event.Raw = log
  2122. select {
  2123. case sink <- event:
  2124. case err := <-sub.Err():
  2125. return err
  2126. case <-quit:
  2127. return nil
  2128. }
  2129. case err := <-sub.Err():
  2130. return err
  2131. case <-quit:
  2132. return nil
  2133. }
  2134. }
  2135. }), nil
  2136. }
  2137. // ParseLock is a log parse operation binding the contract event 0x49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b.
  2138. //
  2139. // Solidity: event Lock(address indexed holder, uint256 value, uint256 releaseTime)
  2140. func (_MetaRare *MetaRareFilterer) ParseLock(log types.Log) (*MetaRareLock, error) {
  2141. event := new(MetaRareLock)
  2142. if err := _MetaRare.contract.UnpackLog(event, "Lock", log); err != nil {
  2143. return nil, err
  2144. }
  2145. event.Raw = log
  2146. return event, nil
  2147. }
  2148. // MetaRareOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the MetaRare contract.
  2149. type MetaRareOwnershipRenouncedIterator struct {
  2150. Event *MetaRareOwnershipRenounced // Event containing the contract specifics and raw log
  2151. contract *bind.BoundContract // Generic contract to use for unpacking event data
  2152. event string // Event name to use for unpacking event data
  2153. logs chan types.Log // Log channel receiving the found contract events
  2154. sub ethereum.Subscription // Subscription for errors, completion and termination
  2155. done bool // Whether the subscription completed delivering logs
  2156. fail error // Occurred error to stop iteration
  2157. }
  2158. // Next advances the iterator to the subsequent event, returning whether there
  2159. // are any more events found. In case of a retrieval or parsing error, false is
  2160. // returned and Error() can be queried for the exact failure.
  2161. func (it *MetaRareOwnershipRenouncedIterator) Next() bool {
  2162. // If the iterator failed, stop iterating
  2163. if it.fail != nil {
  2164. return false
  2165. }
  2166. // If the iterator completed, deliver directly whatever's available
  2167. if it.done {
  2168. select {
  2169. case log := <-it.logs:
  2170. it.Event = new(MetaRareOwnershipRenounced)
  2171. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2172. it.fail = err
  2173. return false
  2174. }
  2175. it.Event.Raw = log
  2176. return true
  2177. default:
  2178. return false
  2179. }
  2180. }
  2181. // Iterator still in progress, wait for either a data or an error event
  2182. select {
  2183. case log := <-it.logs:
  2184. it.Event = new(MetaRareOwnershipRenounced)
  2185. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2186. it.fail = err
  2187. return false
  2188. }
  2189. it.Event.Raw = log
  2190. return true
  2191. case err := <-it.sub.Err():
  2192. it.done = true
  2193. it.fail = err
  2194. return it.Next()
  2195. }
  2196. }
  2197. // Error returns any retrieval or parsing error occurred during filtering.
  2198. func (it *MetaRareOwnershipRenouncedIterator) Error() error {
  2199. return it.fail
  2200. }
  2201. // Close terminates the iteration process, releasing any pending underlying
  2202. // resources.
  2203. func (it *MetaRareOwnershipRenouncedIterator) Close() error {
  2204. it.sub.Unsubscribe()
  2205. return nil
  2206. }
  2207. // MetaRareOwnershipRenounced represents a OwnershipRenounced event raised by the MetaRare contract.
  2208. type MetaRareOwnershipRenounced struct {
  2209. PreviousOwner common.Address
  2210. Raw types.Log // Blockchain specific contextual infos
  2211. }
  2212. // FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820.
  2213. //
  2214. // Solidity: event OwnershipRenounced(address indexed previousOwner)
  2215. func (_MetaRare *MetaRareFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*MetaRareOwnershipRenouncedIterator, error) {
  2216. var previousOwnerRule []interface{}
  2217. for _, previousOwnerItem := range previousOwner {
  2218. previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
  2219. }
  2220. logs, sub, err := _MetaRare.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule)
  2221. if err != nil {
  2222. return nil, err
  2223. }
  2224. return &MetaRareOwnershipRenouncedIterator{contract: _MetaRare.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil
  2225. }
  2226. // WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820.
  2227. //
  2228. // Solidity: event OwnershipRenounced(address indexed previousOwner)
  2229. func (_MetaRare *MetaRareFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *MetaRareOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) {
  2230. var previousOwnerRule []interface{}
  2231. for _, previousOwnerItem := range previousOwner {
  2232. previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
  2233. }
  2234. logs, sub, err := _MetaRare.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule)
  2235. if err != nil {
  2236. return nil, err
  2237. }
  2238. return event.NewSubscription(func(quit <-chan struct{}) error {
  2239. defer sub.Unsubscribe()
  2240. for {
  2241. select {
  2242. case log := <-logs:
  2243. // New log arrived, parse the event and forward to the user
  2244. event := new(MetaRareOwnershipRenounced)
  2245. if err := _MetaRare.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil {
  2246. return err
  2247. }
  2248. event.Raw = log
  2249. select {
  2250. case sink <- event:
  2251. case err := <-sub.Err():
  2252. return err
  2253. case <-quit:
  2254. return nil
  2255. }
  2256. case err := <-sub.Err():
  2257. return err
  2258. case <-quit:
  2259. return nil
  2260. }
  2261. }
  2262. }), nil
  2263. }
  2264. // ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820.
  2265. //
  2266. // Solidity: event OwnershipRenounced(address indexed previousOwner)
  2267. func (_MetaRare *MetaRareFilterer) ParseOwnershipRenounced(log types.Log) (*MetaRareOwnershipRenounced, error) {
  2268. event := new(MetaRareOwnershipRenounced)
  2269. if err := _MetaRare.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil {
  2270. return nil, err
  2271. }
  2272. event.Raw = log
  2273. return event, nil
  2274. }
  2275. // MetaRareOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MetaRare contract.
  2276. type MetaRareOwnershipTransferredIterator struct {
  2277. Event *MetaRareOwnershipTransferred // Event containing the contract specifics and raw log
  2278. contract *bind.BoundContract // Generic contract to use for unpacking event data
  2279. event string // Event name to use for unpacking event data
  2280. logs chan types.Log // Log channel receiving the found contract events
  2281. sub ethereum.Subscription // Subscription for errors, completion and termination
  2282. done bool // Whether the subscription completed delivering logs
  2283. fail error // Occurred error to stop iteration
  2284. }
  2285. // Next advances the iterator to the subsequent event, returning whether there
  2286. // are any more events found. In case of a retrieval or parsing error, false is
  2287. // returned and Error() can be queried for the exact failure.
  2288. func (it *MetaRareOwnershipTransferredIterator) Next() bool {
  2289. // If the iterator failed, stop iterating
  2290. if it.fail != nil {
  2291. return false
  2292. }
  2293. // If the iterator completed, deliver directly whatever's available
  2294. if it.done {
  2295. select {
  2296. case log := <-it.logs:
  2297. it.Event = new(MetaRareOwnershipTransferred)
  2298. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2299. it.fail = err
  2300. return false
  2301. }
  2302. it.Event.Raw = log
  2303. return true
  2304. default:
  2305. return false
  2306. }
  2307. }
  2308. // Iterator still in progress, wait for either a data or an error event
  2309. select {
  2310. case log := <-it.logs:
  2311. it.Event = new(MetaRareOwnershipTransferred)
  2312. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2313. it.fail = err
  2314. return false
  2315. }
  2316. it.Event.Raw = log
  2317. return true
  2318. case err := <-it.sub.Err():
  2319. it.done = true
  2320. it.fail = err
  2321. return it.Next()
  2322. }
  2323. }
  2324. // Error returns any retrieval or parsing error occurred during filtering.
  2325. func (it *MetaRareOwnershipTransferredIterator) Error() error {
  2326. return it.fail
  2327. }
  2328. // Close terminates the iteration process, releasing any pending underlying
  2329. // resources.
  2330. func (it *MetaRareOwnershipTransferredIterator) Close() error {
  2331. it.sub.Unsubscribe()
  2332. return nil
  2333. }
  2334. // MetaRareOwnershipTransferred represents a OwnershipTransferred event raised by the MetaRare contract.
  2335. type MetaRareOwnershipTransferred struct {
  2336. PreviousOwner common.Address
  2337. NewOwner common.Address
  2338. Raw types.Log // Blockchain specific contextual infos
  2339. }
  2340. // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
  2341. //
  2342. // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
  2343. func (_MetaRare *MetaRareFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MetaRareOwnershipTransferredIterator, error) {
  2344. var previousOwnerRule []interface{}
  2345. for _, previousOwnerItem := range previousOwner {
  2346. previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
  2347. }
  2348. var newOwnerRule []interface{}
  2349. for _, newOwnerItem := range newOwner {
  2350. newOwnerRule = append(newOwnerRule, newOwnerItem)
  2351. }
  2352. logs, sub, err := _MetaRare.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
  2353. if err != nil {
  2354. return nil, err
  2355. }
  2356. return &MetaRareOwnershipTransferredIterator{contract: _MetaRare.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
  2357. }
  2358. // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
  2359. //
  2360. // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
  2361. func (_MetaRare *MetaRareFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MetaRareOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
  2362. var previousOwnerRule []interface{}
  2363. for _, previousOwnerItem := range previousOwner {
  2364. previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
  2365. }
  2366. var newOwnerRule []interface{}
  2367. for _, newOwnerItem := range newOwner {
  2368. newOwnerRule = append(newOwnerRule, newOwnerItem)
  2369. }
  2370. logs, sub, err := _MetaRare.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
  2371. if err != nil {
  2372. return nil, err
  2373. }
  2374. return event.NewSubscription(func(quit <-chan struct{}) error {
  2375. defer sub.Unsubscribe()
  2376. for {
  2377. select {
  2378. case log := <-logs:
  2379. // New log arrived, parse the event and forward to the user
  2380. event := new(MetaRareOwnershipTransferred)
  2381. if err := _MetaRare.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
  2382. return err
  2383. }
  2384. event.Raw = log
  2385. select {
  2386. case sink <- event:
  2387. case err := <-sub.Err():
  2388. return err
  2389. case <-quit:
  2390. return nil
  2391. }
  2392. case err := <-sub.Err():
  2393. return err
  2394. case <-quit:
  2395. return nil
  2396. }
  2397. }
  2398. }), nil
  2399. }
  2400. // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
  2401. //
  2402. // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
  2403. func (_MetaRare *MetaRareFilterer) ParseOwnershipTransferred(log types.Log) (*MetaRareOwnershipTransferred, error) {
  2404. event := new(MetaRareOwnershipTransferred)
  2405. if err := _MetaRare.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
  2406. return nil, err
  2407. }
  2408. event.Raw = log
  2409. return event, nil
  2410. }
  2411. // MetaRareTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the MetaRare contract.
  2412. type MetaRareTransferIterator struct {
  2413. Event *MetaRareTransfer // Event containing the contract specifics and raw log
  2414. contract *bind.BoundContract // Generic contract to use for unpacking event data
  2415. event string // Event name to use for unpacking event data
  2416. logs chan types.Log // Log channel receiving the found contract events
  2417. sub ethereum.Subscription // Subscription for errors, completion and termination
  2418. done bool // Whether the subscription completed delivering logs
  2419. fail error // Occurred error to stop iteration
  2420. }
  2421. // Next advances the iterator to the subsequent event, returning whether there
  2422. // are any more events found. In case of a retrieval or parsing error, false is
  2423. // returned and Error() can be queried for the exact failure.
  2424. func (it *MetaRareTransferIterator) Next() bool {
  2425. // If the iterator failed, stop iterating
  2426. if it.fail != nil {
  2427. return false
  2428. }
  2429. // If the iterator completed, deliver directly whatever's available
  2430. if it.done {
  2431. select {
  2432. case log := <-it.logs:
  2433. it.Event = new(MetaRareTransfer)
  2434. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2435. it.fail = err
  2436. return false
  2437. }
  2438. it.Event.Raw = log
  2439. return true
  2440. default:
  2441. return false
  2442. }
  2443. }
  2444. // Iterator still in progress, wait for either a data or an error event
  2445. select {
  2446. case log := <-it.logs:
  2447. it.Event = new(MetaRareTransfer)
  2448. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2449. it.fail = err
  2450. return false
  2451. }
  2452. it.Event.Raw = log
  2453. return true
  2454. case err := <-it.sub.Err():
  2455. it.done = true
  2456. it.fail = err
  2457. return it.Next()
  2458. }
  2459. }
  2460. // Error returns any retrieval or parsing error occurred during filtering.
  2461. func (it *MetaRareTransferIterator) Error() error {
  2462. return it.fail
  2463. }
  2464. // Close terminates the iteration process, releasing any pending underlying
  2465. // resources.
  2466. func (it *MetaRareTransferIterator) Close() error {
  2467. it.sub.Unsubscribe()
  2468. return nil
  2469. }
  2470. // MetaRareTransfer represents a Transfer event raised by the MetaRare contract.
  2471. type MetaRareTransfer struct {
  2472. From common.Address
  2473. To common.Address
  2474. Value *big.Int
  2475. Raw types.Log // Blockchain specific contextual infos
  2476. }
  2477. // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  2478. //
  2479. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  2480. func (_MetaRare *MetaRareFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*MetaRareTransferIterator, error) {
  2481. var fromRule []interface{}
  2482. for _, fromItem := range from {
  2483. fromRule = append(fromRule, fromItem)
  2484. }
  2485. var toRule []interface{}
  2486. for _, toItem := range to {
  2487. toRule = append(toRule, toItem)
  2488. }
  2489. logs, sub, err := _MetaRare.contract.FilterLogs(opts, "Transfer", fromRule, toRule)
  2490. if err != nil {
  2491. return nil, err
  2492. }
  2493. return &MetaRareTransferIterator{contract: _MetaRare.contract, event: "Transfer", logs: logs, sub: sub}, nil
  2494. }
  2495. // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  2496. //
  2497. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  2498. func (_MetaRare *MetaRareFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *MetaRareTransfer, from []common.Address, to []common.Address) (event.Subscription, error) {
  2499. var fromRule []interface{}
  2500. for _, fromItem := range from {
  2501. fromRule = append(fromRule, fromItem)
  2502. }
  2503. var toRule []interface{}
  2504. for _, toItem := range to {
  2505. toRule = append(toRule, toItem)
  2506. }
  2507. logs, sub, err := _MetaRare.contract.WatchLogs(opts, "Transfer", fromRule, toRule)
  2508. if err != nil {
  2509. return nil, err
  2510. }
  2511. return event.NewSubscription(func(quit <-chan struct{}) error {
  2512. defer sub.Unsubscribe()
  2513. for {
  2514. select {
  2515. case log := <-logs:
  2516. // New log arrived, parse the event and forward to the user
  2517. event := new(MetaRareTransfer)
  2518. if err := _MetaRare.contract.UnpackLog(event, "Transfer", log); err != nil {
  2519. return err
  2520. }
  2521. event.Raw = log
  2522. select {
  2523. case sink <- event:
  2524. case err := <-sub.Err():
  2525. return err
  2526. case <-quit:
  2527. return nil
  2528. }
  2529. case err := <-sub.Err():
  2530. return err
  2531. case <-quit:
  2532. return nil
  2533. }
  2534. }
  2535. }), nil
  2536. }
  2537. // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
  2538. //
  2539. // Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
  2540. func (_MetaRare *MetaRareFilterer) ParseTransfer(log types.Log) (*MetaRareTransfer, error) {
  2541. event := new(MetaRareTransfer)
  2542. if err := _MetaRare.contract.UnpackLog(event, "Transfer", log); err != nil {
  2543. return nil, err
  2544. }
  2545. event.Raw = log
  2546. return event, nil
  2547. }
  2548. // MetaRareUnlockIterator is returned from FilterUnlock and is used to iterate over the raw logs and unpacked data for Unlock events raised by the MetaRare contract.
  2549. type MetaRareUnlockIterator struct {
  2550. Event *MetaRareUnlock // Event containing the contract specifics and raw log
  2551. contract *bind.BoundContract // Generic contract to use for unpacking event data
  2552. event string // Event name to use for unpacking event data
  2553. logs chan types.Log // Log channel receiving the found contract events
  2554. sub ethereum.Subscription // Subscription for errors, completion and termination
  2555. done bool // Whether the subscription completed delivering logs
  2556. fail error // Occurred error to stop iteration
  2557. }
  2558. // Next advances the iterator to the subsequent event, returning whether there
  2559. // are any more events found. In case of a retrieval or parsing error, false is
  2560. // returned and Error() can be queried for the exact failure.
  2561. func (it *MetaRareUnlockIterator) Next() bool {
  2562. // If the iterator failed, stop iterating
  2563. if it.fail != nil {
  2564. return false
  2565. }
  2566. // If the iterator completed, deliver directly whatever's available
  2567. if it.done {
  2568. select {
  2569. case log := <-it.logs:
  2570. it.Event = new(MetaRareUnlock)
  2571. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2572. it.fail = err
  2573. return false
  2574. }
  2575. it.Event.Raw = log
  2576. return true
  2577. default:
  2578. return false
  2579. }
  2580. }
  2581. // Iterator still in progress, wait for either a data or an error event
  2582. select {
  2583. case log := <-it.logs:
  2584. it.Event = new(MetaRareUnlock)
  2585. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2586. it.fail = err
  2587. return false
  2588. }
  2589. it.Event.Raw = log
  2590. return true
  2591. case err := <-it.sub.Err():
  2592. it.done = true
  2593. it.fail = err
  2594. return it.Next()
  2595. }
  2596. }
  2597. // Error returns any retrieval or parsing error occurred during filtering.
  2598. func (it *MetaRareUnlockIterator) Error() error {
  2599. return it.fail
  2600. }
  2601. // Close terminates the iteration process, releasing any pending underlying
  2602. // resources.
  2603. func (it *MetaRareUnlockIterator) Close() error {
  2604. it.sub.Unsubscribe()
  2605. return nil
  2606. }
  2607. // MetaRareUnlock represents a Unlock event raised by the MetaRare contract.
  2608. type MetaRareUnlock struct {
  2609. Holder common.Address
  2610. Value *big.Int
  2611. Raw types.Log // Blockchain specific contextual infos
  2612. }
  2613. // FilterUnlock is a free log retrieval operation binding the contract event 0x6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1.
  2614. //
  2615. // Solidity: event Unlock(address indexed holder, uint256 value)
  2616. func (_MetaRare *MetaRareFilterer) FilterUnlock(opts *bind.FilterOpts, holder []common.Address) (*MetaRareUnlockIterator, error) {
  2617. var holderRule []interface{}
  2618. for _, holderItem := range holder {
  2619. holderRule = append(holderRule, holderItem)
  2620. }
  2621. logs, sub, err := _MetaRare.contract.FilterLogs(opts, "Unlock", holderRule)
  2622. if err != nil {
  2623. return nil, err
  2624. }
  2625. return &MetaRareUnlockIterator{contract: _MetaRare.contract, event: "Unlock", logs: logs, sub: sub}, nil
  2626. }
  2627. // WatchUnlock is a free log subscription operation binding the contract event 0x6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1.
  2628. //
  2629. // Solidity: event Unlock(address indexed holder, uint256 value)
  2630. func (_MetaRare *MetaRareFilterer) WatchUnlock(opts *bind.WatchOpts, sink chan<- *MetaRareUnlock, holder []common.Address) (event.Subscription, error) {
  2631. var holderRule []interface{}
  2632. for _, holderItem := range holder {
  2633. holderRule = append(holderRule, holderItem)
  2634. }
  2635. logs, sub, err := _MetaRare.contract.WatchLogs(opts, "Unlock", holderRule)
  2636. if err != nil {
  2637. return nil, err
  2638. }
  2639. return event.NewSubscription(func(quit <-chan struct{}) error {
  2640. defer sub.Unsubscribe()
  2641. for {
  2642. select {
  2643. case log := <-logs:
  2644. // New log arrived, parse the event and forward to the user
  2645. event := new(MetaRareUnlock)
  2646. if err := _MetaRare.contract.UnpackLog(event, "Unlock", log); err != nil {
  2647. return err
  2648. }
  2649. event.Raw = log
  2650. select {
  2651. case sink <- event:
  2652. case err := <-sub.Err():
  2653. return err
  2654. case <-quit:
  2655. return nil
  2656. }
  2657. case err := <-sub.Err():
  2658. return err
  2659. case <-quit:
  2660. return nil
  2661. }
  2662. }
  2663. }), nil
  2664. }
  2665. // ParseUnlock is a log parse operation binding the contract event 0x6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1.
  2666. //
  2667. // Solidity: event Unlock(address indexed holder, uint256 value)
  2668. func (_MetaRare *MetaRareFilterer) ParseUnlock(log types.Log) (*MetaRareUnlock, error) {
  2669. event := new(MetaRareUnlock)
  2670. if err := _MetaRare.contract.UnpackLog(event, "Unlock", log); err != nil {
  2671. return nil, err
  2672. }
  2673. event.Raw = log
  2674. return event, nil
  2675. }
  2676. // SafeMathMetaData contains all meta data concerning the SafeMath contract.
  2677. var SafeMathMetaData = &bind.MetaData{
  2678. ABI: "[]",
  2679. Bin: "0x604c6023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820d8bf1103fb5589e40b369ec015db597357add90895c46b5572164bbd74a8cfcb0029",
  2680. }
  2681. // SafeMathABI is the input ABI used to generate the binding from.
  2682. // Deprecated: Use SafeMathMetaData.ABI instead.
  2683. var SafeMathABI = SafeMathMetaData.ABI
  2684. // SafeMathBin is the compiled bytecode used for deploying new contracts.
  2685. // Deprecated: Use SafeMathMetaData.Bin instead.
  2686. var SafeMathBin = SafeMathMetaData.Bin
  2687. // DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it.
  2688. func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) {
  2689. parsed, err := SafeMathMetaData.GetAbi()
  2690. if err != nil {
  2691. return common.Address{}, nil, nil, err
  2692. }
  2693. if parsed == nil {
  2694. return common.Address{}, nil, nil, errors.New("GetABI returned nil")
  2695. }
  2696. address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(SafeMathBin), backend)
  2697. if err != nil {
  2698. return common.Address{}, nil, nil, err
  2699. }
  2700. return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
  2701. }
  2702. // SafeMath is an auto generated Go binding around an Ethereum contract.
  2703. type SafeMath struct {
  2704. SafeMathCaller // Read-only binding to the contract
  2705. SafeMathTransactor // Write-only binding to the contract
  2706. SafeMathFilterer // Log filterer for contract events
  2707. }
  2708. // SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract.
  2709. type SafeMathCaller struct {
  2710. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  2711. }
  2712. // SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract.
  2713. type SafeMathTransactor struct {
  2714. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  2715. }
  2716. // SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  2717. type SafeMathFilterer struct {
  2718. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  2719. }
  2720. // SafeMathSession is an auto generated Go binding around an Ethereum contract,
  2721. // with pre-set call and transact options.
  2722. type SafeMathSession struct {
  2723. Contract *SafeMath // Generic contract binding to set the session for
  2724. CallOpts bind.CallOpts // Call options to use throughout this session
  2725. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  2726. }
  2727. // SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  2728. // with pre-set call options.
  2729. type SafeMathCallerSession struct {
  2730. Contract *SafeMathCaller // Generic contract caller binding to set the session for
  2731. CallOpts bind.CallOpts // Call options to use throughout this session
  2732. }
  2733. // SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  2734. // with pre-set transact options.
  2735. type SafeMathTransactorSession struct {
  2736. Contract *SafeMathTransactor // Generic contract transactor binding to set the session for
  2737. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  2738. }
  2739. // SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract.
  2740. type SafeMathRaw struct {
  2741. Contract *SafeMath // Generic contract binding to access the raw methods on
  2742. }
  2743. // SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  2744. type SafeMathCallerRaw struct {
  2745. Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on
  2746. }
  2747. // SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  2748. type SafeMathTransactorRaw struct {
  2749. Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on
  2750. }
  2751. // NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract.
  2752. func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) {
  2753. contract, err := bindSafeMath(address, backend, backend, backend)
  2754. if err != nil {
  2755. return nil, err
  2756. }
  2757. return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil
  2758. }
  2759. // NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract.
  2760. func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) {
  2761. contract, err := bindSafeMath(address, caller, nil, nil)
  2762. if err != nil {
  2763. return nil, err
  2764. }
  2765. return &SafeMathCaller{contract: contract}, nil
  2766. }
  2767. // NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract.
  2768. func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) {
  2769. contract, err := bindSafeMath(address, nil, transactor, nil)
  2770. if err != nil {
  2771. return nil, err
  2772. }
  2773. return &SafeMathTransactor{contract: contract}, nil
  2774. }
  2775. // NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract.
  2776. func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) {
  2777. contract, err := bindSafeMath(address, nil, nil, filterer)
  2778. if err != nil {
  2779. return nil, err
  2780. }
  2781. return &SafeMathFilterer{contract: contract}, nil
  2782. }
  2783. // bindSafeMath binds a generic wrapper to an already deployed contract.
  2784. func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  2785. parsed, err := abi.JSON(strings.NewReader(SafeMathABI))
  2786. if err != nil {
  2787. return nil, err
  2788. }
  2789. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  2790. }
  2791. // Call invokes the (constant) contract method with params as input values and
  2792. // sets the output to result. The result type might be a single field for simple
  2793. // returns, a slice of interfaces for anonymous returns and a struct for named
  2794. // returns.
  2795. func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  2796. return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...)
  2797. }
  2798. // Transfer initiates a plain transaction to move funds to the contract, calling
  2799. // its default method if one is available.
  2800. func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  2801. return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts)
  2802. }
  2803. // Transact invokes the (paid) contract method with params as input values.
  2804. func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  2805. return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...)
  2806. }
  2807. // Call invokes the (constant) contract method with params as input values and
  2808. // sets the output to result. The result type might be a single field for simple
  2809. // returns, a slice of interfaces for anonymous returns and a struct for named
  2810. // returns.
  2811. func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  2812. return _SafeMath.Contract.contract.Call(opts, result, method, params...)
  2813. }
  2814. // Transfer initiates a plain transaction to move funds to the contract, calling
  2815. // its default method if one is available.
  2816. func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  2817. return _SafeMath.Contract.contract.Transfer(opts)
  2818. }
  2819. // Transact invokes the (paid) contract method with params as input values.
  2820. func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  2821. return _SafeMath.Contract.contract.Transact(opts, method, params...)
  2822. }