mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-01-08 21:58:07 -05:00
887 lines
57 KiB
Go
887 lines
57 KiB
Go
// Code generated - DO NOT EDIT.
|
|
// This file is a generated binding and any manual changes will be lost.
|
|
|
|
package contracts
|
|
|
|
import (
|
|
"errors"
|
|
"math/big"
|
|
"strings"
|
|
|
|
ethereum "github.com/ethereum/go-ethereum"
|
|
"github.com/ethereum/go-ethereum/accounts/abi"
|
|
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"github.com/ethereum/go-ethereum/core/types"
|
|
"github.com/ethereum/go-ethereum/event"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var (
|
|
_ = errors.New
|
|
_ = big.NewInt
|
|
_ = strings.NewReader
|
|
_ = ethereum.NotFound
|
|
_ = bind.Bind
|
|
_ = common.Big1
|
|
_ = types.BloomLookup
|
|
_ = event.NewSubscription
|
|
_ = abi.ConvertType
|
|
)
|
|
|
|
// TestERC20MetaData contains all meta data concerning the TestERC20 contract.
|
|
var TestERC20MetaData = &bind.MetaData{
|
|
ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"numDecimals\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"initialAccount\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialBalance\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approveInternal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferInternal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
|
|
Bin: "0x60806040526040516200217238038062002172833981810160405281019062000029919062000471565b848481600390816200003c919062000778565b5080600490816200004e919062000778565b50505082600560006101000a81548160ff021916908360ff1602179055506200007e82826200008960201b60201c565b50505050506200097a565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620000fb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000f290620008c0565b60405180910390fd5b6200010f60008383620001f660201b60201c565b806002600082825462000123919062000911565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620001d691906200095d565b60405180910390a3620001f260008383620001fb60201b60201c565b5050565b505050565b505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000269826200021e565b810181811067ffffffffffffffff821117156200028b576200028a6200022f565b5b80604052505050565b6000620002a062000200565b9050620002ae82826200025e565b919050565b600067ffffffffffffffff821115620002d157620002d06200022f565b5b620002dc826200021e565b9050602081019050919050565b60005b8381101562000309578082015181840152602081019050620002ec565b60008484015250505050565b60006200032c6200032684620002b3565b62000294565b9050828152602081018484840111156200034b576200034a62000219565b5b62000358848285620002e9565b509392505050565b600082601f83011262000378576200037762000214565b5b81516200038a84826020860162000315565b91505092915050565b600060ff82169050919050565b620003ab8162000393565b8114620003b757600080fd5b50565b600081519050620003cb81620003a0565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003fe82620003d1565b9050919050565b6200041081620003f1565b81146200041c57600080fd5b50565b600081519050620004308162000405565b92915050565b6000819050919050565b6200044b8162000436565b81146200045757600080fd5b50565b6000815190506200046b8162000440565b92915050565b600080600080600060a0868803121562000490576200048f6200020a565b5b600086015167ffffffffffffffff811115620004b157620004b06200020f565b5b620004bf8882890162000360565b955050602086015167ffffffffffffffff811115620004e357620004e26200020f565b5b620004f18882890162000360565b94505060406200050488828901620003ba565b935050606062000517888289016200041f565b92505060806200052a888289016200045a565b9150509295509295909350565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200058a57607f821691505b602082108103620005a0576200059f62000542565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200060a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620005cb565b620006168683620005cb565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000659620006536200064d8462000436565b6200062e565b62000436565b9050919050565b6000819050919050565b620006758362000638565b6200068d620006848262000660565b848454620005d8565b825550505050565b600090565b620006a462000695565b620006b18184846200066a565b505050565b5b81811015620006d957620006cd6000826200069a565b600181019050620006b7565b5050565b601f8211156200072857620006f281620005a6565b620006fd84620005bb565b810160208510156200070d578190505b620007256200071c85620005bb565b830182620006b6565b50505b505050565b600082821c905092915050565b60006200074d600019846008026200072d565b1980831691505092915050565b60006200076883836200073a565b9150826002028217905092915050565b620007838262000537565b67ffffffffffffffff8111156200079f576200079e6200022f565b5b620007ab825462000571565b620007b8828285620006dd565b600060209050601f831160018114620007f05760008415620007db578287015190505b620007e785826200075a565b86555062000857565b601f1984166200080086620005a6565b60005b828110156200082a5784890151825560018201915060208501945060208101905062000803565b868310156200084a578489015162000846601f8916826200073a565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000620008a8601f836200085f565b9150620008b58262000870565b602082019050919050565b60006020820190508181036000830152620008db8162000899565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006200091e8262000436565b91506200092b8362000436565b9250828201905080821115620009465762000945620008e2565b5b92915050565b620009578162000436565b82525050565b60006020820190506200097460008301846200094c565b92915050565b6117e8806200098a6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806340c10f19116100975780639dc29fac116100665780639dc29fac14610286578063a457c2d7146102a2578063a9059cbb146102d2578063dd62ed3e14610302576100f5565b806340c10f191461020057806356189cb41461021c57806370a082311461023857806395d89b4114610268576100f5565b8063222f5be0116100d3578063222f5be01461016657806323b872dd14610182578063313ce567146101b257806339509351146101d0576100f5565b806306fdde03146100fa578063095ea7b31461011857806318160ddd14610148575b600080fd5b610102610332565b60405161010f9190610f35565b60405180910390f35b610132600480360381019061012d9190610ff0565b6103c4565b60405161013f919061104b565b60405180910390f35b6101506103e7565b60405161015d9190611075565b60405180910390f35b610180600480360381019061017b9190611090565b6103f1565b005b61019c60048036038101906101979190611090565b610401565b6040516101a9919061104b565b60405180910390f35b6101ba610430565b6040516101c791906110ff565b60405180910390f35b6101ea60048036038101906101e59190610ff0565b610447565b6040516101f7919061104b565b60405180910390f35b61021a60048036038101906102159190610ff0565b61047e565b005b61023660048036038101906102319190611090565b61048c565b005b610252600480360381019061024d919061111a565b61049c565b60405161025f9190611075565b60405180910390f35b6102706104e4565b60405161027d9190610f35565b60405180910390f35b6102a0600480360381019061029b9190610ff0565b610576565b005b6102bc60048036038101906102b79190610ff0565b610584565b6040516102c9919061104b565b60405180910390f35b6102ec60048036038101906102e79190610ff0565b6105fb565b6040516102f9919061104b565b60405180910390f35b61031c60048036038101906103179190611147565b61061e565b6040516103299190611075565b60405180910390f35b606060038054610341906111b6565b80601f016020809104026020016040519081016040528092919081815260200182805461036d906111b6565b80156103ba5780601f1061038f576101008083540402835291602001916103ba565b820191906000526020600020905b81548152906001019060200180831161039d57829003601f168201915b5050505050905090565b6000806103cf6106a5565b90506103dc8185856106ad565b600191505092915050565b6000600254905090565b6103fc838383610876565b505050565b60008061040c6106a5565b9050610419858285610aec565b610424858585610876565b60019150509392505050565b6000600560009054906101000a900460ff16905090565b6000806104526106a5565b9050610473818585610464858961061e565b61046e9190611216565b6106ad565b600191505092915050565b6104888282610b78565b5050565b6104978383836106ad565b505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546104f3906111b6565b80601f016020809104026020016040519081016040528092919081815260200182805461051f906111b6565b801561056c5780601f106105415761010080835404028352916020019161056c565b820191906000526020600020905b81548152906001019060200180831161054f57829003601f168201915b5050505050905090565b6105808282610cce565b5050565b60008061058f6106a5565b9050600061059d828661061e565b9050838110156105e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d9906112bc565b60405180910390fd5b6105ef82868684036106ad565b60019250505092915050565b6000806106066106a5565b9050610613818585610876565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361071c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107139061134e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361078b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610782906113e0565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516108699190611075565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108dc90611472565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094b90611504565b60405180910390fd5b61095f838383610e9b565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156109e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dc90611596565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ad39190611075565b60405180910390a3610ae6848484610ea0565b50505050565b6000610af8848461061e565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610b725781811015610b64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5b90611602565b60405180910390fd5b610b7184848484036106ad565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610be7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bde9061166e565b60405180910390fd5b610bf360008383610e9b565b8060026000828254610c059190611216565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610cb69190611075565b60405180910390a3610cca60008383610ea0565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3490611700565b60405180910390fd5b610d4982600083610e9b565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610dcf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc690611792565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e829190611075565b60405180910390a3610e9683600084610ea0565b505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610edf578082015181840152602081019050610ec4565b60008484015250505050565b6000601f19601f8301169050919050565b6000610f0782610ea5565b610f118185610eb0565b9350610f21818560208601610ec1565b610f2a81610eeb565b840191505092915050565b60006020820190508181036000830152610f4f8184610efc565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610f8782610f5c565b9050919050565b610f9781610f7c565b8114610fa257600080fd5b50565b600081359050610fb481610f8e565b92915050565b6000819050919050565b610fcd81610fba565b8114610fd857600080fd5b50565b600081359050610fea81610fc4565b92915050565b6000806040838503121561100757611006610f57565b5b600061101585828601610fa5565b925050602061102685828601610fdb565b9150509250929050565b60008115159050919050565b61104581611030565b82525050565b6000602082019050611060600083018461103c565b92915050565b61106f81610fba565b82525050565b600060208201905061108a6000830184611066565b92915050565b6000806000606084860312156110a9576110a8610f57565b5b60006110b786828701610fa5565b93505060206110c886828701610fa5565b92505060406110d986828701610fdb565b9150509250925092565b600060ff82169050919050565b6110f9816110e3565b82525050565b600060208201905061111460008301846110f0565b92915050565b6000602082840312156111305761112f610f57565b5b600061113e84828501610fa5565b91505092915050565b6000806040838503121561115e5761115d610f57565b5b600061116c85828601610fa5565b925050602061117d85828601610fa5565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806111ce57607f821691505b6020821081036111e1576111e0611187565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061122182610fba565b915061122c83610fba565b9250828201905080821115611244576112436111e7565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b60006112a6602583610eb0565b91506112b18261124a565b604082019050919050565b600060208201905081810360008301526112d581611299565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611338602483610eb0565b9150611343826112dc565b604082019050919050565b600060208201905081810360008301526113678161132b565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006113ca602283610eb0565b91506113d58261136e565b604082019050919050565b600060208201905081810360008301526113f9816113bd565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061145c602583610eb0565b915061146782611400565b604082019050919050565b6000602082019050818103600083015261148b8161144f565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006114ee602383610eb0565b91506114f982611492565b604082019050919050565b6000602082019050818103600083015261151d816114e1565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000611580602683610eb0565b915061158b82611524565b604082019050919050565b600060208201905081810360008301526115af81611573565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b60006115ec601d83610eb0565b91506115f7826115b6565b602082019050919050565b6000602082019050818103600083015261161b816115df565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000611658601f83610eb0565b915061166382611622565b602082019050919050565b600060208201905081810360008301526116878161164b565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006116ea602183610eb0565b91506116f58261168e565b604082019050919050565b60006020820190508181036000830152611719816116dd565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b600061177c602283610eb0565b915061178782611720565b604082019050919050565b600060208201905081810360008301526117ab8161176f565b905091905056fea26469706673582212209d62306fdb6bd6aefa706dfb3c13b494b830ac3d9b65a4af071435a86f0d2c2d64736f6c63430008130033",
|
|
}
|
|
|
|
// TestERC20ABI is the input ABI used to generate the binding from.
|
|
// Deprecated: Use TestERC20MetaData.ABI instead.
|
|
var TestERC20ABI = TestERC20MetaData.ABI
|
|
|
|
// TestERC20Bin is the compiled bytecode used for deploying new contracts.
|
|
// Deprecated: Use TestERC20MetaData.Bin instead.
|
|
var TestERC20Bin = TestERC20MetaData.Bin
|
|
|
|
// DeployTestERC20 deploys a new Ethereum contract, binding an instance of TestERC20 to it.
|
|
func DeployTestERC20(auth *bind.TransactOpts, backend bind.ContractBackend, name string, symbol string, numDecimals uint8, initialAccount common.Address, initialBalance *big.Int) (common.Address, *types.Transaction, *TestERC20, error) {
|
|
parsed, err := TestERC20MetaData.GetAbi()
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
if parsed == nil {
|
|
return common.Address{}, nil, nil, errors.New("GetABI returned nil")
|
|
}
|
|
|
|
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(TestERC20Bin), backend, name, symbol, numDecimals, initialAccount, initialBalance)
|
|
if err != nil {
|
|
return common.Address{}, nil, nil, err
|
|
}
|
|
return address, tx, &TestERC20{TestERC20Caller: TestERC20Caller{contract: contract}, TestERC20Transactor: TestERC20Transactor{contract: contract}, TestERC20Filterer: TestERC20Filterer{contract: contract}}, nil
|
|
}
|
|
|
|
// TestERC20 is an auto generated Go binding around an Ethereum contract.
|
|
type TestERC20 struct {
|
|
TestERC20Caller // Read-only binding to the contract
|
|
TestERC20Transactor // Write-only binding to the contract
|
|
TestERC20Filterer // Log filterer for contract events
|
|
}
|
|
|
|
// TestERC20Caller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type TestERC20Caller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// TestERC20Transactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type TestERC20Transactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// TestERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type TestERC20Filterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// TestERC20Session is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type TestERC20Session struct {
|
|
Contract *TestERC20 // Generic contract binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// TestERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type TestERC20CallerSession struct {
|
|
Contract *TestERC20Caller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// TestERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type TestERC20TransactorSession struct {
|
|
Contract *TestERC20Transactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// TestERC20Raw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type TestERC20Raw struct {
|
|
Contract *TestERC20 // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// TestERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type TestERC20CallerRaw struct {
|
|
Contract *TestERC20Caller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// TestERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type TestERC20TransactorRaw struct {
|
|
Contract *TestERC20Transactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewTestERC20 creates a new instance of TestERC20, bound to a specific deployed contract.
|
|
func NewTestERC20(address common.Address, backend bind.ContractBackend) (*TestERC20, error) {
|
|
contract, err := bindTestERC20(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TestERC20{TestERC20Caller: TestERC20Caller{contract: contract}, TestERC20Transactor: TestERC20Transactor{contract: contract}, TestERC20Filterer: TestERC20Filterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewTestERC20Caller creates a new read-only instance of TestERC20, bound to a specific deployed contract.
|
|
func NewTestERC20Caller(address common.Address, caller bind.ContractCaller) (*TestERC20Caller, error) {
|
|
contract, err := bindTestERC20(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TestERC20Caller{contract: contract}, nil
|
|
}
|
|
|
|
// NewTestERC20Transactor creates a new write-only instance of TestERC20, bound to a specific deployed contract.
|
|
func NewTestERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*TestERC20Transactor, error) {
|
|
contract, err := bindTestERC20(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TestERC20Transactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewTestERC20Filterer creates a new log filterer instance of TestERC20, bound to a specific deployed contract.
|
|
func NewTestERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*TestERC20Filterer, error) {
|
|
contract, err := bindTestERC20(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TestERC20Filterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindTestERC20 binds a generic wrapper to an already deployed contract.
|
|
func bindTestERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := TestERC20MetaData.GetAbi()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
|
|
}
|
|
|
|
// Call invokes the (constant) contract method with params as input values and
|
|
// sets the output to result. The result type might be a single field for simple
|
|
// returns, a slice of interfaces for anonymous returns and a struct for named
|
|
// returns.
|
|
func (_TestERC20 *TestERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _TestERC20.Contract.TestERC20Caller.contract.Call(opts, result, method, params...)
|
|
}
|
|
|
|
// Transfer initiates a plain transaction to move funds to the contract, calling
|
|
// its default method if one is available.
|
|
func (_TestERC20 *TestERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.TestERC20Transactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_TestERC20 *TestERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.TestERC20Transactor.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// Call invokes the (constant) contract method with params as input values and
|
|
// sets the output to result. The result type might be a single field for simple
|
|
// returns, a slice of interfaces for anonymous returns and a struct for named
|
|
// returns.
|
|
func (_TestERC20 *TestERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _TestERC20.Contract.contract.Call(opts, result, method, params...)
|
|
}
|
|
|
|
// Transfer initiates a plain transaction to move funds to the contract, calling
|
|
// its default method if one is available.
|
|
func (_TestERC20 *TestERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_TestERC20 *TestERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
|
|
//
|
|
// Solidity: function allowance(address owner, address spender) view returns(uint256)
|
|
func (_TestERC20 *TestERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _TestERC20.contract.Call(opts, &out, "allowance", owner, spender)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
|
|
//
|
|
// Solidity: function allowance(address owner, address spender) view returns(uint256)
|
|
func (_TestERC20 *TestERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
|
|
return _TestERC20.Contract.Allowance(&_TestERC20.CallOpts, owner, spender)
|
|
}
|
|
|
|
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
|
|
//
|
|
// Solidity: function allowance(address owner, address spender) view returns(uint256)
|
|
func (_TestERC20 *TestERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) {
|
|
return _TestERC20.Contract.Allowance(&_TestERC20.CallOpts, owner, spender)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address account) view returns(uint256)
|
|
func (_TestERC20 *TestERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _TestERC20.contract.Call(opts, &out, "balanceOf", account)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address account) view returns(uint256)
|
|
func (_TestERC20 *TestERC20Session) BalanceOf(account common.Address) (*big.Int, error) {
|
|
return _TestERC20.Contract.BalanceOf(&_TestERC20.CallOpts, account)
|
|
}
|
|
|
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
|
//
|
|
// Solidity: function balanceOf(address account) view returns(uint256)
|
|
func (_TestERC20 *TestERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) {
|
|
return _TestERC20.Contract.BalanceOf(&_TestERC20.CallOpts, account)
|
|
}
|
|
|
|
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
|
|
//
|
|
// Solidity: function decimals() view returns(uint8)
|
|
func (_TestERC20 *TestERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) {
|
|
var out []interface{}
|
|
err := _TestERC20.contract.Call(opts, &out, "decimals")
|
|
|
|
if err != nil {
|
|
return *new(uint8), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
|
|
//
|
|
// Solidity: function decimals() view returns(uint8)
|
|
func (_TestERC20 *TestERC20Session) Decimals() (uint8, error) {
|
|
return _TestERC20.Contract.Decimals(&_TestERC20.CallOpts)
|
|
}
|
|
|
|
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
|
|
//
|
|
// Solidity: function decimals() view returns(uint8)
|
|
func (_TestERC20 *TestERC20CallerSession) Decimals() (uint8, error) {
|
|
return _TestERC20.Contract.Decimals(&_TestERC20.CallOpts)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_TestERC20 *TestERC20Caller) Name(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _TestERC20.contract.Call(opts, &out, "name")
|
|
|
|
if err != nil {
|
|
return *new(string), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_TestERC20 *TestERC20Session) Name() (string, error) {
|
|
return _TestERC20.Contract.Name(&_TestERC20.CallOpts)
|
|
}
|
|
|
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
|
//
|
|
// Solidity: function name() view returns(string)
|
|
func (_TestERC20 *TestERC20CallerSession) Name() (string, error) {
|
|
return _TestERC20.Contract.Name(&_TestERC20.CallOpts)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_TestERC20 *TestERC20Caller) Symbol(opts *bind.CallOpts) (string, error) {
|
|
var out []interface{}
|
|
err := _TestERC20.contract.Call(opts, &out, "symbol")
|
|
|
|
if err != nil {
|
|
return *new(string), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_TestERC20 *TestERC20Session) Symbol() (string, error) {
|
|
return _TestERC20.Contract.Symbol(&_TestERC20.CallOpts)
|
|
}
|
|
|
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
|
//
|
|
// Solidity: function symbol() view returns(string)
|
|
func (_TestERC20 *TestERC20CallerSession) Symbol() (string, error) {
|
|
return _TestERC20.Contract.Symbol(&_TestERC20.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_TestERC20 *TestERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _TestERC20.contract.Call(opts, &out, "totalSupply")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_TestERC20 *TestERC20Session) TotalSupply() (*big.Int, error) {
|
|
return _TestERC20.Contract.TotalSupply(&_TestERC20.CallOpts)
|
|
}
|
|
|
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
|
//
|
|
// Solidity: function totalSupply() view returns(uint256)
|
|
func (_TestERC20 *TestERC20CallerSession) TotalSupply() (*big.Int, error) {
|
|
return _TestERC20.Contract.TotalSupply(&_TestERC20.CallOpts)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address spender, uint256 amount) returns(bool)
|
|
func (_TestERC20 *TestERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.contract.Transact(opts, "approve", spender, amount)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address spender, uint256 amount) returns(bool)
|
|
func (_TestERC20 *TestERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.Approve(&_TestERC20.TransactOpts, spender, amount)
|
|
}
|
|
|
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
|
//
|
|
// Solidity: function approve(address spender, uint256 amount) returns(bool)
|
|
func (_TestERC20 *TestERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.Approve(&_TestERC20.TransactOpts, spender, amount)
|
|
}
|
|
|
|
// ApproveInternal is a paid mutator transaction binding the contract method 0x56189cb4.
|
|
//
|
|
// Solidity: function approveInternal(address owner, address spender, uint256 value) returns()
|
|
func (_TestERC20 *TestERC20Transactor) ApproveInternal(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.contract.Transact(opts, "approveInternal", owner, spender, value)
|
|
}
|
|
|
|
// ApproveInternal is a paid mutator transaction binding the contract method 0x56189cb4.
|
|
//
|
|
// Solidity: function approveInternal(address owner, address spender, uint256 value) returns()
|
|
func (_TestERC20 *TestERC20Session) ApproveInternal(owner common.Address, spender common.Address, value *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.ApproveInternal(&_TestERC20.TransactOpts, owner, spender, value)
|
|
}
|
|
|
|
// ApproveInternal is a paid mutator transaction binding the contract method 0x56189cb4.
|
|
//
|
|
// Solidity: function approveInternal(address owner, address spender, uint256 value) returns()
|
|
func (_TestERC20 *TestERC20TransactorSession) ApproveInternal(owner common.Address, spender common.Address, value *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.ApproveInternal(&_TestERC20.TransactOpts, owner, spender, value)
|
|
}
|
|
|
|
// Burn is a paid mutator transaction binding the contract method 0x9dc29fac.
|
|
//
|
|
// Solidity: function burn(address account, uint256 amount) returns()
|
|
func (_TestERC20 *TestERC20Transactor) Burn(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.contract.Transact(opts, "burn", account, amount)
|
|
}
|
|
|
|
// Burn is a paid mutator transaction binding the contract method 0x9dc29fac.
|
|
//
|
|
// Solidity: function burn(address account, uint256 amount) returns()
|
|
func (_TestERC20 *TestERC20Session) Burn(account common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.Burn(&_TestERC20.TransactOpts, account, amount)
|
|
}
|
|
|
|
// Burn is a paid mutator transaction binding the contract method 0x9dc29fac.
|
|
//
|
|
// Solidity: function burn(address account, uint256 amount) returns()
|
|
func (_TestERC20 *TestERC20TransactorSession) Burn(account common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.Burn(&_TestERC20.TransactOpts, account, amount)
|
|
}
|
|
|
|
// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
|
|
//
|
|
// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
|
|
func (_TestERC20 *TestERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue)
|
|
}
|
|
|
|
// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
|
|
//
|
|
// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
|
|
func (_TestERC20 *TestERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.DecreaseAllowance(&_TestERC20.TransactOpts, spender, subtractedValue)
|
|
}
|
|
|
|
// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7.
|
|
//
|
|
// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool)
|
|
func (_TestERC20 *TestERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.DecreaseAllowance(&_TestERC20.TransactOpts, spender, subtractedValue)
|
|
}
|
|
|
|
// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
|
|
//
|
|
// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
|
|
func (_TestERC20 *TestERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue)
|
|
}
|
|
|
|
// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
|
|
//
|
|
// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
|
|
func (_TestERC20 *TestERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.IncreaseAllowance(&_TestERC20.TransactOpts, spender, addedValue)
|
|
}
|
|
|
|
// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351.
|
|
//
|
|
// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool)
|
|
func (_TestERC20 *TestERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.IncreaseAllowance(&_TestERC20.TransactOpts, spender, addedValue)
|
|
}
|
|
|
|
// Mint is a paid mutator transaction binding the contract method 0x40c10f19.
|
|
//
|
|
// Solidity: function mint(address account, uint256 amount) returns()
|
|
func (_TestERC20 *TestERC20Transactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.contract.Transact(opts, "mint", account, amount)
|
|
}
|
|
|
|
// Mint is a paid mutator transaction binding the contract method 0x40c10f19.
|
|
//
|
|
// Solidity: function mint(address account, uint256 amount) returns()
|
|
func (_TestERC20 *TestERC20Session) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.Mint(&_TestERC20.TransactOpts, account, amount)
|
|
}
|
|
|
|
// Mint is a paid mutator transaction binding the contract method 0x40c10f19.
|
|
//
|
|
// Solidity: function mint(address account, uint256 amount) returns()
|
|
func (_TestERC20 *TestERC20TransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.Mint(&_TestERC20.TransactOpts, account, amount)
|
|
}
|
|
|
|
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
|
//
|
|
// Solidity: function transfer(address to, uint256 amount) returns(bool)
|
|
func (_TestERC20 *TestERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.contract.Transact(opts, "transfer", to, amount)
|
|
}
|
|
|
|
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
|
//
|
|
// Solidity: function transfer(address to, uint256 amount) returns(bool)
|
|
func (_TestERC20 *TestERC20Session) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.Transfer(&_TestERC20.TransactOpts, to, amount)
|
|
}
|
|
|
|
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
|
//
|
|
// Solidity: function transfer(address to, uint256 amount) returns(bool)
|
|
func (_TestERC20 *TestERC20TransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.Transfer(&_TestERC20.TransactOpts, to, amount)
|
|
}
|
|
|
|
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
|
|
//
|
|
// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool)
|
|
func (_TestERC20 *TestERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.contract.Transact(opts, "transferFrom", from, to, amount)
|
|
}
|
|
|
|
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
|
|
//
|
|
// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool)
|
|
func (_TestERC20 *TestERC20Session) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.TransferFrom(&_TestERC20.TransactOpts, from, to, amount)
|
|
}
|
|
|
|
// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.
|
|
//
|
|
// Solidity: function transferFrom(address from, address to, uint256 amount) returns(bool)
|
|
func (_TestERC20 *TestERC20TransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.TransferFrom(&_TestERC20.TransactOpts, from, to, amount)
|
|
}
|
|
|
|
// TransferInternal is a paid mutator transaction binding the contract method 0x222f5be0.
|
|
//
|
|
// Solidity: function transferInternal(address from, address to, uint256 value) returns()
|
|
func (_TestERC20 *TestERC20Transactor) TransferInternal(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.contract.Transact(opts, "transferInternal", from, to, value)
|
|
}
|
|
|
|
// TransferInternal is a paid mutator transaction binding the contract method 0x222f5be0.
|
|
//
|
|
// Solidity: function transferInternal(address from, address to, uint256 value) returns()
|
|
func (_TestERC20 *TestERC20Session) TransferInternal(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.TransferInternal(&_TestERC20.TransactOpts, from, to, value)
|
|
}
|
|
|
|
// TransferInternal is a paid mutator transaction binding the contract method 0x222f5be0.
|
|
//
|
|
// Solidity: function transferInternal(address from, address to, uint256 value) returns()
|
|
func (_TestERC20 *TestERC20TransactorSession) TransferInternal(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) {
|
|
return _TestERC20.Contract.TransferInternal(&_TestERC20.TransactOpts, from, to, value)
|
|
}
|
|
|
|
// TestERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the TestERC20 contract.
|
|
type TestERC20ApprovalIterator struct {
|
|
Event *TestERC20Approval // Event containing the contract specifics and raw log
|
|
|
|
contract *bind.BoundContract // Generic contract to use for unpacking event data
|
|
event string // Event name to use for unpacking event data
|
|
|
|
logs chan types.Log // Log channel receiving the found contract events
|
|
sub ethereum.Subscription // Subscription for errors, completion and termination
|
|
done bool // Whether the subscription completed delivering logs
|
|
fail error // Occurred error to stop iteration
|
|
}
|
|
|
|
// Next advances the iterator to the subsequent event, returning whether there
|
|
// are any more events found. In case of a retrieval or parsing error, false is
|
|
// returned and Error() can be queried for the exact failure.
|
|
func (it *TestERC20ApprovalIterator) Next() bool {
|
|
// If the iterator failed, stop iterating
|
|
if it.fail != nil {
|
|
return false
|
|
}
|
|
// If the iterator completed, deliver directly whatever's available
|
|
if it.done {
|
|
select {
|
|
case log := <-it.logs:
|
|
it.Event = new(TestERC20Approval)
|
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
|
it.fail = err
|
|
return false
|
|
}
|
|
it.Event.Raw = log
|
|
return true
|
|
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
// Iterator still in progress, wait for either a data or an error event
|
|
select {
|
|
case log := <-it.logs:
|
|
it.Event = new(TestERC20Approval)
|
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
|
it.fail = err
|
|
return false
|
|
}
|
|
it.Event.Raw = log
|
|
return true
|
|
|
|
case err := <-it.sub.Err():
|
|
it.done = true
|
|
it.fail = err
|
|
return it.Next()
|
|
}
|
|
}
|
|
|
|
// Error returns any retrieval or parsing error occurred during filtering.
|
|
func (it *TestERC20ApprovalIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *TestERC20ApprovalIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// TestERC20Approval represents a Approval event raised by the TestERC20 contract.
|
|
type TestERC20Approval struct {
|
|
Owner common.Address
|
|
Spender common.Address
|
|
Value *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
|
|
//
|
|
// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
|
|
func (_TestERC20 *TestERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*TestERC20ApprovalIterator, error) {
|
|
|
|
var ownerRule []interface{}
|
|
for _, ownerItem := range owner {
|
|
ownerRule = append(ownerRule, ownerItem)
|
|
}
|
|
var spenderRule []interface{}
|
|
for _, spenderItem := range spender {
|
|
spenderRule = append(spenderRule, spenderItem)
|
|
}
|
|
|
|
logs, sub, err := _TestERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TestERC20ApprovalIterator{contract: _TestERC20.contract, event: "Approval", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
|
|
//
|
|
// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
|
|
func (_TestERC20 *TestERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *TestERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) {
|
|
|
|
var ownerRule []interface{}
|
|
for _, ownerItem := range owner {
|
|
ownerRule = append(ownerRule, ownerItem)
|
|
}
|
|
var spenderRule []interface{}
|
|
for _, spenderItem := range spender {
|
|
spenderRule = append(spenderRule, spenderItem)
|
|
}
|
|
|
|
logs, sub, err := _TestERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return event.NewSubscription(func(quit <-chan struct{}) error {
|
|
defer sub.Unsubscribe()
|
|
for {
|
|
select {
|
|
case log := <-logs:
|
|
// New log arrived, parse the event and forward to the user
|
|
event := new(TestERC20Approval)
|
|
if err := _TestERC20.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return err
|
|
}
|
|
event.Raw = log
|
|
|
|
select {
|
|
case sink <- event:
|
|
case err := <-sub.Err():
|
|
return err
|
|
case <-quit:
|
|
return nil
|
|
}
|
|
case err := <-sub.Err():
|
|
return err
|
|
case <-quit:
|
|
return nil
|
|
}
|
|
}
|
|
}), nil
|
|
}
|
|
|
|
// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.
|
|
//
|
|
// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value)
|
|
func (_TestERC20 *TestERC20Filterer) ParseApproval(log types.Log) (*TestERC20Approval, error) {
|
|
event := new(TestERC20Approval)
|
|
if err := _TestERC20.contract.UnpackLog(event, "Approval", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|
|
|
|
// TestERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the TestERC20 contract.
|
|
type TestERC20TransferIterator struct {
|
|
Event *TestERC20Transfer // Event containing the contract specifics and raw log
|
|
|
|
contract *bind.BoundContract // Generic contract to use for unpacking event data
|
|
event string // Event name to use for unpacking event data
|
|
|
|
logs chan types.Log // Log channel receiving the found contract events
|
|
sub ethereum.Subscription // Subscription for errors, completion and termination
|
|
done bool // Whether the subscription completed delivering logs
|
|
fail error // Occurred error to stop iteration
|
|
}
|
|
|
|
// Next advances the iterator to the subsequent event, returning whether there
|
|
// are any more events found. In case of a retrieval or parsing error, false is
|
|
// returned and Error() can be queried for the exact failure.
|
|
func (it *TestERC20TransferIterator) Next() bool {
|
|
// If the iterator failed, stop iterating
|
|
if it.fail != nil {
|
|
return false
|
|
}
|
|
// If the iterator completed, deliver directly whatever's available
|
|
if it.done {
|
|
select {
|
|
case log := <-it.logs:
|
|
it.Event = new(TestERC20Transfer)
|
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
|
it.fail = err
|
|
return false
|
|
}
|
|
it.Event.Raw = log
|
|
return true
|
|
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
// Iterator still in progress, wait for either a data or an error event
|
|
select {
|
|
case log := <-it.logs:
|
|
it.Event = new(TestERC20Transfer)
|
|
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
|
it.fail = err
|
|
return false
|
|
}
|
|
it.Event.Raw = log
|
|
return true
|
|
|
|
case err := <-it.sub.Err():
|
|
it.done = true
|
|
it.fail = err
|
|
return it.Next()
|
|
}
|
|
}
|
|
|
|
// Error returns any retrieval or parsing error occurred during filtering.
|
|
func (it *TestERC20TransferIterator) Error() error {
|
|
return it.fail
|
|
}
|
|
|
|
// Close terminates the iteration process, releasing any pending underlying
|
|
// resources.
|
|
func (it *TestERC20TransferIterator) Close() error {
|
|
it.sub.Unsubscribe()
|
|
return nil
|
|
}
|
|
|
|
// TestERC20Transfer represents a Transfer event raised by the TestERC20 contract.
|
|
type TestERC20Transfer struct {
|
|
From common.Address
|
|
To common.Address
|
|
Value *big.Int
|
|
Raw types.Log // Blockchain specific contextual infos
|
|
}
|
|
|
|
// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
|
|
//
|
|
// Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
|
|
func (_TestERC20 *TestERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*TestERC20TransferIterator, error) {
|
|
|
|
var fromRule []interface{}
|
|
for _, fromItem := range from {
|
|
fromRule = append(fromRule, fromItem)
|
|
}
|
|
var toRule []interface{}
|
|
for _, toItem := range to {
|
|
toRule = append(toRule, toItem)
|
|
}
|
|
|
|
logs, sub, err := _TestERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &TestERC20TransferIterator{contract: _TestERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil
|
|
}
|
|
|
|
// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
|
|
//
|
|
// Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
|
|
func (_TestERC20 *TestERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *TestERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) {
|
|
|
|
var fromRule []interface{}
|
|
for _, fromItem := range from {
|
|
fromRule = append(fromRule, fromItem)
|
|
}
|
|
var toRule []interface{}
|
|
for _, toItem := range to {
|
|
toRule = append(toRule, toItem)
|
|
}
|
|
|
|
logs, sub, err := _TestERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return event.NewSubscription(func(quit <-chan struct{}) error {
|
|
defer sub.Unsubscribe()
|
|
for {
|
|
select {
|
|
case log := <-logs:
|
|
// New log arrived, parse the event and forward to the user
|
|
event := new(TestERC20Transfer)
|
|
if err := _TestERC20.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return err
|
|
}
|
|
event.Raw = log
|
|
|
|
select {
|
|
case sink <- event:
|
|
case err := <-sub.Err():
|
|
return err
|
|
case <-quit:
|
|
return nil
|
|
}
|
|
case err := <-sub.Err():
|
|
return err
|
|
case <-quit:
|
|
return nil
|
|
}
|
|
}
|
|
}), nil
|
|
}
|
|
|
|
// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.
|
|
//
|
|
// Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
|
|
func (_TestERC20 *TestERC20Filterer) ParseTransfer(log types.Log) (*TestERC20Transfer, error) {
|
|
event := new(TestERC20Transfer)
|
|
if err := _TestERC20.contract.UnpackLog(event, "Transfer", log); err != nil {
|
|
return nil, err
|
|
}
|
|
event.Raw = log
|
|
return event, nil
|
|
}
|