Last active
June 11, 2023 11:31
-
-
Save ajiybanesij/7059f19cc5a533247c13f14371f38e8b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated - DO NOT EDIT. | |
// This file is a generated binding and any manual changes will be lost. | |
package TestToken | |
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 | |
) | |
// TestTokenMetaData contains all meta data concerning the TestToken contract. | |
var TestTokenMetaData = &bind.MetaData{ | |
ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"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\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"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\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"to\",\"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\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", | |
Bin: "0x608060405234801562000010575f80fd5b5060405162001c9f38038062001c9f83398181016040528101906200003691906200020a565b806040518060400160405280600981526020017f54657374546f6b656e00000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f54540000000000000000000000000000000000000000000000000000000000008152508160039081620000b491906200049e565b508060049081620000c691906200049e565b505050620000da81620000e260201b60201c565b505062000582565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620001d482620001a9565b9050919050565b620001e681620001c8565b8114620001f1575f80fd5b50565b5f815190506200020481620001db565b92915050565b5f60208284031215620002225762000221620001a5565b5b5f6200023184828501620001f4565b91505092915050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620002b657607f821691505b602082108103620002cc57620002cb62000271565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302620003307fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620002f3565b6200033c8683620002f3565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f62000386620003806200037a8462000354565b6200035d565b62000354565b9050919050565b5f819050919050565b620003a18362000366565b620003b9620003b0826200038d565b848454620002ff565b825550505050565b5f90565b620003cf620003c1565b620003dc81848462000396565b505050565b5b818110156200040357620003f75f82620003c5565b600181019050620003e2565b5050565b601f82111562000452576200041c81620002d2565b6200042784620002e4565b8101602085101562000437578190505b6200044f6200044685620002e4565b830182620003e1565b50505b505050565b5f82821c905092915050565b5f620004745f198460080262000457565b1980831691505092915050565b5f6200048e838362000463565b9150826002028217905092915050565b620004a9826200023a565b67ffffffffffffffff811115620004c557620004c462000244565b5b620004d182546200029e565b620004de82828562000407565b5f60209050601f83116001811462000514575f8415620004ff578287015190505b6200050b858262000481565b8655506200057a565b601f1984166200052486620002d2565b5f5b828110156200054d5784890151825560018201915060208501945060208101905062000526565b868310156200056d578489015162000569601f89168262000463565b8355505b6001600288020188555050505b505050505050565b61170f80620005905f395ff3fe608060405234801561000f575f80fd5b50600436106100f3575f3560e01c806370a0823111610095578063a457c2d711610064578063a457c2d714610273578063a9059cbb146102a3578063dd62ed3e146102d3578063f2fde38b14610303576100f3565b806370a08231146101fd578063715018a61461022d5780638da5cb5b1461023757806395d89b4114610255576100f3565b806323b872dd116100d157806323b872dd14610163578063313ce5671461019357806339509351146101b157806340c10f19146101e1576100f3565b806306fdde03146100f7578063095ea7b31461011557806318160ddd14610145575b5f80fd5b6100ff61031f565b60405161010c9190610ea3565b60405180910390f35b61012f600480360381019061012a9190610f54565b6103af565b60405161013c9190610fac565b60405180910390f35b61014d6103d1565b60405161015a9190610fd4565b60405180910390f35b61017d60048036038101906101789190610fed565b6103da565b60405161018a9190610fac565b60405180910390f35b61019b610408565b6040516101a89190611058565b60405180910390f35b6101cb60048036038101906101c69190610f54565b610410565b6040516101d89190610fac565b60405180910390f35b6101fb60048036038101906101f69190610f54565b610446565b005b61021760048036038101906102129190611071565b61045c565b6040516102249190610fd4565b60405180910390f35b6102356104a1565b005b61023f6104b4565b60405161024c91906110ab565b60405180910390f35b61025d6104dc565b60405161026a9190610ea3565b60405180910390f35b61028d60048036038101906102889190610f54565b61056c565b60405161029a9190610fac565b60405180910390f35b6102bd60048036038101906102b89190610f54565b6105e1565b6040516102ca9190610fac565b60405180910390f35b6102ed60048036038101906102e891906110c4565b610603565b6040516102fa9190610fd4565b60405180910390f35b61031d60048036038101906103189190611071565b610685565b005b60606003805461032e9061112f565b80601f016020809104026020016040519081016040528092919081815260200182805461035a9061112f565b80156103a55780601f1061037c576101008083540402835291602001916103a5565b820191905f5260205f20905b81548152906001019060200180831161038857829003601f168201915b5050505050905090565b5f806103b9610707565b90506103c681858561070e565b600191505092915050565b5f600254905090565b5f806103e4610707565b90506103f18582856108d1565b6103fc85858561095c565b60019150509392505050565b5f6012905090565b5f8061041a610707565b905061043b81858561042c8589610603565b610436919061118c565b61070e565b600191505092915050565b61044e610a48565b6104588282610ac6565b5050565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6104a9610a48565b6104b25f610b43565b565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546104eb9061112f565b80601f01602080910402602001604051908101604052809291908181526020018280546105179061112f565b80156105625780601f1061053957610100808354040283529160200191610562565b820191905f5260205f20905b81548152906001019060200180831161054557829003601f168201915b5050505050905090565b5f80610576610707565b90505f6105838286610603565b9050838110156105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105bf9061122f565b60405180910390fd5b6105d5828686840361070e565b60019250505092915050565b5f806105eb610707565b90506105f881858561095c565b600191505092915050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b61068d610a48565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036106fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f2906112bd565b60405180910390fd5b61070481610b43565b50565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361077c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107739061134b565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e1906113d9565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516108c49190610fd4565b60405180910390a3505050565b5f6108dc8484610603565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146109565781811015610948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093f90611441565b60405180910390fd5b610955848484840361070e565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036109ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c1906114cf565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610a38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2f9061155d565b60405180910390fd5b610a43838383610c06565b505050565b610a50610707565b73ffffffffffffffffffffffffffffffffffffffff16610a6e6104b4565b73ffffffffffffffffffffffffffffffffffffffff1614610ac4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abb906115c5565b60405180910390fd5b565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2b9061162d565b60405180910390fd5b610b3f5f8383610c06565b5050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c56578060025f828254610c4a919061118c565b92505081905550610d1e565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610cd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd0906116bb565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d65578060025f8282540392505081905550610daf565b805f808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610e0c9190610fd4565b60405180910390a3505050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610e50578082015181840152602081019050610e35565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610e7582610e19565b610e7f8185610e23565b9350610e8f818560208601610e33565b610e9881610e5b565b840191505092915050565b5f6020820190508181035f830152610ebb8184610e6b565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610ef082610ec7565b9050919050565b610f0081610ee6565b8114610f0a575f80fd5b50565b5f81359050610f1b81610ef7565b92915050565b5f819050919050565b610f3381610f21565b8114610f3d575f80fd5b50565b5f81359050610f4e81610f2a565b92915050565b5f8060408385031215610f6a57610f69610ec3565b5b5f610f7785828601610f0d565b9250506020610f8885828601610f40565b9150509250929050565b5f8115159050919050565b610fa681610f92565b82525050565b5f602082019050610fbf5f830184610f9d565b92915050565b610fce81610f21565b82525050565b5f602082019050610fe75f830184610fc5565b92915050565b5f805f6060848603121561100457611003610ec3565b5b5f61101186828701610f0d565b935050602061102286828701610f0d565b925050604061103386828701610f40565b9150509250925092565b5f60ff82169050919050565b6110528161103d565b82525050565b5f60208201905061106b5f830184611049565b92915050565b5f6020828403121561108657611085610ec3565b5b5f61109384828501610f0d565b91505092915050565b6110a581610ee6565b82525050565b5f6020820190506110be5f83018461109c565b92915050565b5f80604083850312156110da576110d9610ec3565b5b5f6110e785828601610f0d565b92505060206110f885828601610f0d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061114657607f821691505b60208210810361115957611158611102565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61119682610f21565b91506111a183610f21565b92508282019050808211156111b9576111b861115f565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f611219602583610e23565b9150611224826111bf565b604082019050919050565b5f6020820190508181035f8301526112468161120d565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f6112a7602683610e23565b91506112b28261124d565b604082019050919050565b5f6020820190508181035f8301526112d48161129b565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f611335602483610e23565b9150611340826112db565b604082019050919050565b5f6020820190508181035f83015261136281611329565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6113c3602283610e23565b91506113ce82611369565b604082019050919050565b5f6020820190508181035f8301526113f0816113b7565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f61142b601d83610e23565b9150611436826113f7565b602082019050919050565b5f6020820190508181035f8301526114588161141f565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f6114b9602583610e23565b91506114c48261145f565b604082019050919050565b5f6020820190508181035f8301526114e6816114ad565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f611547602383610e23565b9150611552826114ed565b604082019050919050565b5f6020820190508181035f8301526115748161153b565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6115af602083610e23565b91506115ba8261157b565b602082019050919050565b5f6020820190508181035f8301526115dc816115a3565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f2061646472657373005f82015250565b5f611617601f83610e23565b9150611622826115e3565b602082019050919050565b5f6020820190508181035f8301526116448161160b565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f6116a5602683610e23565b91506116b08261164b565b604082019050919050565b5f6020820190508181035f8301526116d281611699565b905091905056fea264697066735822122044f334593a82b4b3f5c7cb39fff90d228d93c891577d229ba3b8ba087384251264736f6c63430008140033", | |
} | |
// TestTokenABI is the input ABI used to generate the binding from. | |
// Deprecated: Use TestTokenMetaData.ABI instead. | |
var TestTokenABI = TestTokenMetaData.ABI | |
// TestTokenBin is the compiled bytecode used for deploying new contracts. | |
// Deprecated: Use TestTokenMetaData.Bin instead. | |
var TestTokenBin = TestTokenMetaData.Bin | |
// DeployTestToken deploys a new Ethereum contract, binding an instance of TestToken to it. | |
func DeployTestToken(auth *bind.TransactOpts, backend bind.ContractBackend, initialOwner common.Address) (common.Address, *types.Transaction, *TestToken, error) { | |
parsed, err := TestTokenMetaData.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(TestTokenBin), backend, initialOwner) | |
if err != nil { | |
return common.Address{}, nil, nil, err | |
} | |
return address, tx, &TestToken{TestTokenCaller: TestTokenCaller{contract: contract}, TestTokenTransactor: TestTokenTransactor{contract: contract}, TestTokenFilterer: TestTokenFilterer{contract: contract}}, nil | |
} | |
// TestToken is an auto generated Go binding around an Ethereum contract. | |
type TestToken struct { | |
TestTokenCaller // Read-only binding to the contract | |
TestTokenTransactor // Write-only binding to the contract | |
TestTokenFilterer // Log filterer for contract events | |
} | |
// TestTokenCaller is an auto generated read-only Go binding around an Ethereum contract. | |
type TestTokenCaller struct { | |
contract *bind.BoundContract // Generic contract wrapper for the low level calls | |
} | |
// TestTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. | |
type TestTokenTransactor struct { | |
contract *bind.BoundContract // Generic contract wrapper for the low level calls | |
} | |
// TestTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. | |
type TestTokenFilterer struct { | |
contract *bind.BoundContract // Generic contract wrapper for the low level calls | |
} | |
// TestTokenSession is an auto generated Go binding around an Ethereum contract, | |
// with pre-set call and transact options. | |
type TestTokenSession struct { | |
Contract *TestToken // 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 | |
} | |
// TestTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, | |
// with pre-set call options. | |
type TestTokenCallerSession struct { | |
Contract *TestTokenCaller // Generic contract caller binding to set the session for | |
CallOpts bind.CallOpts // Call options to use throughout this session | |
} | |
// TestTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, | |
// with pre-set transact options. | |
type TestTokenTransactorSession struct { | |
Contract *TestTokenTransactor // Generic contract transactor binding to set the session for | |
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session | |
} | |
// TestTokenRaw is an auto generated low-level Go binding around an Ethereum contract. | |
type TestTokenRaw struct { | |
Contract *TestToken // Generic contract binding to access the raw methods on | |
} | |
// TestTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. | |
type TestTokenCallerRaw struct { | |
Contract *TestTokenCaller // Generic read-only contract binding to access the raw methods on | |
} | |
// TestTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. | |
type TestTokenTransactorRaw struct { | |
Contract *TestTokenTransactor // Generic write-only contract binding to access the raw methods on | |
} | |
// NewTestToken creates a new instance of TestToken, bound to a specific deployed contract. | |
func NewTestToken(address common.Address, backend bind.ContractBackend) (*TestToken, error) { | |
contract, err := bindTestToken(address, backend, backend, backend) | |
if err != nil { | |
return nil, err | |
} | |
return &TestToken{TestTokenCaller: TestTokenCaller{contract: contract}, TestTokenTransactor: TestTokenTransactor{contract: contract}, TestTokenFilterer: TestTokenFilterer{contract: contract}}, nil | |
} | |
// NewTestTokenCaller creates a new read-only instance of TestToken, bound to a specific deployed contract. | |
func NewTestTokenCaller(address common.Address, caller bind.ContractCaller) (*TestTokenCaller, error) { | |
contract, err := bindTestToken(address, caller, nil, nil) | |
if err != nil { | |
return nil, err | |
} | |
return &TestTokenCaller{contract: contract}, nil | |
} | |
// NewTestTokenTransactor creates a new write-only instance of TestToken, bound to a specific deployed contract. | |
func NewTestTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TestTokenTransactor, error) { | |
contract, err := bindTestToken(address, nil, transactor, nil) | |
if err != nil { | |
return nil, err | |
} | |
return &TestTokenTransactor{contract: contract}, nil | |
} | |
// NewTestTokenFilterer creates a new log filterer instance of TestToken, bound to a specific deployed contract. | |
func NewTestTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TestTokenFilterer, error) { | |
contract, err := bindTestToken(address, nil, nil, filterer) | |
if err != nil { | |
return nil, err | |
} | |
return &TestTokenFilterer{contract: contract}, nil | |
} | |
// bindTestToken binds a generic wrapper to an already deployed contract. | |
func bindTestToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { | |
parsed, err := TestTokenMetaData.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 (_TestToken *TestTokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { | |
return _TestToken.Contract.TestTokenCaller.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 (_TestToken *TestTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { | |
return _TestToken.Contract.TestTokenTransactor.contract.Transfer(opts) | |
} | |
// Transact invokes the (paid) contract method with params as input values. | |
func (_TestToken *TestTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { | |
return _TestToken.Contract.TestTokenTransactor.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 (_TestToken *TestTokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { | |
return _TestToken.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 (_TestToken *TestTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { | |
return _TestToken.Contract.contract.Transfer(opts) | |
} | |
// Transact invokes the (paid) contract method with params as input values. | |
func (_TestToken *TestTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { | |
return _TestToken.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 (_TestToken *TestTokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { | |
var out []interface{} | |
err := _TestToken.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 (_TestToken *TestTokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { | |
return _TestToken.Contract.Allowance(&_TestToken.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 (_TestToken *TestTokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { | |
return _TestToken.Contract.Allowance(&_TestToken.CallOpts, owner, spender) | |
} | |
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. | |
// | |
// Solidity: function balanceOf(address account) view returns(uint256) | |
func (_TestToken *TestTokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { | |
var out []interface{} | |
err := _TestToken.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 (_TestToken *TestTokenSession) BalanceOf(account common.Address) (*big.Int, error) { | |
return _TestToken.Contract.BalanceOf(&_TestToken.CallOpts, account) | |
} | |
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. | |
// | |
// Solidity: function balanceOf(address account) view returns(uint256) | |
func (_TestToken *TestTokenCallerSession) BalanceOf(account common.Address) (*big.Int, error) { | |
return _TestToken.Contract.BalanceOf(&_TestToken.CallOpts, account) | |
} | |
// Decimals is a free data retrieval call binding the contract method 0x313ce567. | |
// | |
// Solidity: function decimals() view returns(uint8) | |
func (_TestToken *TestTokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) { | |
var out []interface{} | |
err := _TestToken.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 (_TestToken *TestTokenSession) Decimals() (uint8, error) { | |
return _TestToken.Contract.Decimals(&_TestToken.CallOpts) | |
} | |
// Decimals is a free data retrieval call binding the contract method 0x313ce567. | |
// | |
// Solidity: function decimals() view returns(uint8) | |
func (_TestToken *TestTokenCallerSession) Decimals() (uint8, error) { | |
return _TestToken.Contract.Decimals(&_TestToken.CallOpts) | |
} | |
// Name is a free data retrieval call binding the contract method 0x06fdde03. | |
// | |
// Solidity: function name() view returns(string) | |
func (_TestToken *TestTokenCaller) Name(opts *bind.CallOpts) (string, error) { | |
var out []interface{} | |
err := _TestToken.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 (_TestToken *TestTokenSession) Name() (string, error) { | |
return _TestToken.Contract.Name(&_TestToken.CallOpts) | |
} | |
// Name is a free data retrieval call binding the contract method 0x06fdde03. | |
// | |
// Solidity: function name() view returns(string) | |
func (_TestToken *TestTokenCallerSession) Name() (string, error) { | |
return _TestToken.Contract.Name(&_TestToken.CallOpts) | |
} | |
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. | |
// | |
// Solidity: function owner() view returns(address) | |
func (_TestToken *TestTokenCaller) Owner(opts *bind.CallOpts) (common.Address, error) { | |
var out []interface{} | |
err := _TestToken.contract.Call(opts, &out, "owner") | |
if err != nil { | |
return *new(common.Address), err | |
} | |
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) | |
return out0, err | |
} | |
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. | |
// | |
// Solidity: function owner() view returns(address) | |
func (_TestToken *TestTokenSession) Owner() (common.Address, error) { | |
return _TestToken.Contract.Owner(&_TestToken.CallOpts) | |
} | |
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. | |
// | |
// Solidity: function owner() view returns(address) | |
func (_TestToken *TestTokenCallerSession) Owner() (common.Address, error) { | |
return _TestToken.Contract.Owner(&_TestToken.CallOpts) | |
} | |
// Symbol is a free data retrieval call binding the contract method 0x95d89b41. | |
// | |
// Solidity: function symbol() view returns(string) | |
func (_TestToken *TestTokenCaller) Symbol(opts *bind.CallOpts) (string, error) { | |
var out []interface{} | |
err := _TestToken.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 (_TestToken *TestTokenSession) Symbol() (string, error) { | |
return _TestToken.Contract.Symbol(&_TestToken.CallOpts) | |
} | |
// Symbol is a free data retrieval call binding the contract method 0x95d89b41. | |
// | |
// Solidity: function symbol() view returns(string) | |
func (_TestToken *TestTokenCallerSession) Symbol() (string, error) { | |
return _TestToken.Contract.Symbol(&_TestToken.CallOpts) | |
} | |
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. | |
// | |
// Solidity: function totalSupply() view returns(uint256) | |
func (_TestToken *TestTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { | |
var out []interface{} | |
err := _TestToken.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 (_TestToken *TestTokenSession) TotalSupply() (*big.Int, error) { | |
return _TestToken.Contract.TotalSupply(&_TestToken.CallOpts) | |
} | |
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. | |
// | |
// Solidity: function totalSupply() view returns(uint256) | |
func (_TestToken *TestTokenCallerSession) TotalSupply() (*big.Int, error) { | |
return _TestToken.Contract.TotalSupply(&_TestToken.CallOpts) | |
} | |
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. | |
// | |
// Solidity: function approve(address spender, uint256 amount) returns(bool) | |
func (_TestToken *TestTokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.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 (_TestToken *TestTokenSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.Approve(&_TestToken.TransactOpts, spender, amount) | |
} | |
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. | |
// | |
// Solidity: function approve(address spender, uint256 amount) returns(bool) | |
func (_TestToken *TestTokenTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.Approve(&_TestToken.TransactOpts, spender, amount) | |
} | |
// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. | |
// | |
// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) | |
func (_TestToken *TestTokenTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { | |
return _TestToken.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 (_TestToken *TestTokenSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.DecreaseAllowance(&_TestToken.TransactOpts, spender, subtractedValue) | |
} | |
// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. | |
// | |
// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) | |
func (_TestToken *TestTokenTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.DecreaseAllowance(&_TestToken.TransactOpts, spender, subtractedValue) | |
} | |
// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. | |
// | |
// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) | |
func (_TestToken *TestTokenTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { | |
return _TestToken.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 (_TestToken *TestTokenSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.IncreaseAllowance(&_TestToken.TransactOpts, spender, addedValue) | |
} | |
// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. | |
// | |
// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) | |
func (_TestToken *TestTokenTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.IncreaseAllowance(&_TestToken.TransactOpts, spender, addedValue) | |
} | |
// Mint is a paid mutator transaction binding the contract method 0x40c10f19. | |
// | |
// Solidity: function mint(address to, uint256 amount) returns() | |
func (_TestToken *TestTokenTransactor) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.contract.Transact(opts, "mint", to, amount) | |
} | |
// Mint is a paid mutator transaction binding the contract method 0x40c10f19. | |
// | |
// Solidity: function mint(address to, uint256 amount) returns() | |
func (_TestToken *TestTokenSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.Mint(&_TestToken.TransactOpts, to, amount) | |
} | |
// Mint is a paid mutator transaction binding the contract method 0x40c10f19. | |
// | |
// Solidity: function mint(address to, uint256 amount) returns() | |
func (_TestToken *TestTokenTransactorSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.Mint(&_TestToken.TransactOpts, to, amount) | |
} | |
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. | |
// | |
// Solidity: function renounceOwnership() returns() | |
func (_TestToken *TestTokenTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { | |
return _TestToken.contract.Transact(opts, "renounceOwnership") | |
} | |
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. | |
// | |
// Solidity: function renounceOwnership() returns() | |
func (_TestToken *TestTokenSession) RenounceOwnership() (*types.Transaction, error) { | |
return _TestToken.Contract.RenounceOwnership(&_TestToken.TransactOpts) | |
} | |
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. | |
// | |
// Solidity: function renounceOwnership() returns() | |
func (_TestToken *TestTokenTransactorSession) RenounceOwnership() (*types.Transaction, error) { | |
return _TestToken.Contract.RenounceOwnership(&_TestToken.TransactOpts) | |
} | |
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. | |
// | |
// Solidity: function transfer(address to, uint256 amount) returns(bool) | |
func (_TestToken *TestTokenTransactor) Transfer(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.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 (_TestToken *TestTokenSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.Transfer(&_TestToken.TransactOpts, to, amount) | |
} | |
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. | |
// | |
// Solidity: function transfer(address to, uint256 amount) returns(bool) | |
func (_TestToken *TestTokenTransactorSession) Transfer(to common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.Transfer(&_TestToken.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 (_TestToken *TestTokenTransactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.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 (_TestToken *TestTokenSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.TransferFrom(&_TestToken.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 (_TestToken *TestTokenTransactorSession) TransferFrom(from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) { | |
return _TestToken.Contract.TransferFrom(&_TestToken.TransactOpts, from, to, amount) | |
} | |
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. | |
// | |
// Solidity: function transferOwnership(address newOwner) returns() | |
func (_TestToken *TestTokenTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { | |
return _TestToken.contract.Transact(opts, "transferOwnership", newOwner) | |
} | |
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. | |
// | |
// Solidity: function transferOwnership(address newOwner) returns() | |
func (_TestToken *TestTokenSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { | |
return _TestToken.Contract.TransferOwnership(&_TestToken.TransactOpts, newOwner) | |
} | |
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. | |
// | |
// Solidity: function transferOwnership(address newOwner) returns() | |
func (_TestToken *TestTokenTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { | |
return _TestToken.Contract.TransferOwnership(&_TestToken.TransactOpts, newOwner) | |
} | |
// TestTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the TestToken contract. | |
type TestTokenApprovalIterator struct { | |
Event *TestTokenApproval // 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 *TestTokenApprovalIterator) 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(TestTokenApproval) | |
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(TestTokenApproval) | |
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 *TestTokenApprovalIterator) Error() error { | |
return it.fail | |
} | |
// Close terminates the iteration process, releasing any pending underlying | |
// resources. | |
func (it *TestTokenApprovalIterator) Close() error { | |
it.sub.Unsubscribe() | |
return nil | |
} | |
// TestTokenApproval represents a Approval event raised by the TestToken contract. | |
type TestTokenApproval 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 (_TestToken *TestTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*TestTokenApprovalIterator, 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 := _TestToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) | |
if err != nil { | |
return nil, err | |
} | |
return &TestTokenApprovalIterator{contract: _TestToken.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 (_TestToken *TestTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *TestTokenApproval, 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 := _TestToken.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(TestTokenApproval) | |
if err := _TestToken.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 (_TestToken *TestTokenFilterer) ParseApproval(log types.Log) (*TestTokenApproval, error) { | |
event := new(TestTokenApproval) | |
if err := _TestToken.contract.UnpackLog(event, "Approval", log); err != nil { | |
return nil, err | |
} | |
event.Raw = log | |
return event, nil | |
} | |
// TestTokenOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TestToken contract. | |
type TestTokenOwnershipTransferredIterator struct { | |
Event *TestTokenOwnershipTransferred // 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 *TestTokenOwnershipTransferredIterator) 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(TestTokenOwnershipTransferred) | |
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(TestTokenOwnershipTransferred) | |
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 *TestTokenOwnershipTransferredIterator) Error() error { | |
return it.fail | |
} | |
// Close terminates the iteration process, releasing any pending underlying | |
// resources. | |
func (it *TestTokenOwnershipTransferredIterator) Close() error { | |
it.sub.Unsubscribe() | |
return nil | |
} | |
// TestTokenOwnershipTransferred represents a OwnershipTransferred event raised by the TestToken contract. | |
type TestTokenOwnershipTransferred struct { | |
PreviousOwner common.Address | |
NewOwner common.Address | |
Raw types.Log // Blockchain specific contextual infos | |
} | |
// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. | |
// | |
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) | |
func (_TestToken *TestTokenFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TestTokenOwnershipTransferredIterator, error) { | |
var previousOwnerRule []interface{} | |
for _, previousOwnerItem := range previousOwner { | |
previousOwnerRule = append(previousOwnerRule, previousOwnerItem) | |
} | |
var newOwnerRule []interface{} | |
for _, newOwnerItem := range newOwner { | |
newOwnerRule = append(newOwnerRule, newOwnerItem) | |
} | |
logs, sub, err := _TestToken.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) | |
if err != nil { | |
return nil, err | |
} | |
return &TestTokenOwnershipTransferredIterator{contract: _TestToken.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil | |
} | |
// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. | |
// | |
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) | |
func (_TestToken *TestTokenFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TestTokenOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { | |
var previousOwnerRule []interface{} | |
for _, previousOwnerItem := range previousOwner { | |
previousOwnerRule = append(previousOwnerRule, previousOwnerItem) | |
} | |
var newOwnerRule []interface{} | |
for _, newOwnerItem := range newOwner { | |
newOwnerRule = append(newOwnerRule, newOwnerItem) | |
} | |
logs, sub, err := _TestToken.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) | |
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(TestTokenOwnershipTransferred) | |
if err := _TestToken.contract.UnpackLog(event, "OwnershipTransferred", 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 | |
} | |
// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. | |
// | |
// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) | |
func (_TestToken *TestTokenFilterer) ParseOwnershipTransferred(log types.Log) (*TestTokenOwnershipTransferred, error) { | |
event := new(TestTokenOwnershipTransferred) | |
if err := _TestToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { | |
return nil, err | |
} | |
event.Raw = log | |
return event, nil | |
} | |
// TestTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the TestToken contract. | |
type TestTokenTransferIterator struct { | |
Event *TestTokenTransfer // 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 *TestTokenTransferIterator) 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(TestTokenTransfer) | |
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(TestTokenTransfer) | |
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 *TestTokenTransferIterator) Error() error { | |
return it.fail | |
} | |
// Close terminates the iteration process, releasing any pending underlying | |
// resources. | |
func (it *TestTokenTransferIterator) Close() error { | |
it.sub.Unsubscribe() | |
return nil | |
} | |
// TestTokenTransfer represents a Transfer event raised by the TestToken contract. | |
type TestTokenTransfer 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 (_TestToken *TestTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*TestTokenTransferIterator, 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 := _TestToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) | |
if err != nil { | |
return nil, err | |
} | |
return &TestTokenTransferIterator{contract: _TestToken.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 (_TestToken *TestTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *TestTokenTransfer, 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 := _TestToken.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(TestTokenTransfer) | |
if err := _TestToken.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 (_TestToken *TestTokenFilterer) ParseTransfer(log types.Log) (*TestTokenTransfer, error) { | |
event := new(TestTokenTransfer) | |
if err := _TestToken.contract.UnpackLog(event, "Transfer", log); err != nil { | |
return nil, err | |
} | |
event.Raw = log | |
return event, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment