coin

package module
v0.0.0-...-f5ef59b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

README

go-connect-eth-contract

golang如何连接以太坊合约。近一段时间在学习以太坊智能合约,在学习过程中走了不少弯路,本文是对此处相关知识的总结希望可以帮助后来者少走弯路。

Solidity合约编写

通过继承zeppelin-solidity提供的功能,编写一个ERC-20代币合约,核心代码甚至只需要定义一下代币数量和名称。
在实际部署合约时候,建议将所有继承到的合约都直接Copy到了源码之中,这样做原因是Solidity目前对于import的支持还很弱,可以避免不必要到错误。在示例代码中为了便于理解,我也做了如上操作。
下面到这个合约SuperCoin,主要除了定义了名称、数量之外,借助继承的合约还具备:白名单管理、铸币到白名单、铸币总量限制等功能,具体怎样实现上述功能可以自行查看源码,此处就不介绍Solidity到基础知识了。

contract SuperCoin is CappedToken, Whitelist {
    string public name = "SuperCoin";
    string public symbol = "SC";
    uint8 public decimals = 18;

    // 初始币量1亿5千万
    uint256 public INITIAL_SUPPLY = 105000000 * (10 ** 18);
    // 总币量2亿1千万
    uint256 public CAP_SUPPLY = 210000000 * (10 ** 18);
    // 每次最多铸币1024个
    uint256 public ONCE_MAX_MINT = 1024 * (10 ** 18);

    function SuperCoin() public CappedToken(CAP_SUPPLY) {
        totalSupply_ = INITIAL_SUPPLY;
        balances[msg.sender] = INITIAL_SUPPLY;
        emit Transfer(0x0, msg.sender, INITIAL_SUPPLY);
    }

    function mint(address to, uint256 amount) onlyOwner canMint onlyWhitelisted(to) public returns (bool) {
        if (amount > ONCE_MAX_MINT) {
            amount = ONCE_MAX_MINT;
        }
        return super.mint(to, amount);
    }
}

使用GanacheTruffle和编写和测试合约

Ganache是一个个人的以太坊客户端,可以启动一个私有链用于开发测试的区块链环境。Truffle framework是一个使用非常广泛的智能合约开发框架,通过Truffle可以快速开发和测试合约。

GanacheTruffle安装

Ganache官方提供的下载地址,下载安装允许即可不需要修改默认设置。

Truffle的目录结构跟Web项目相似度非常高,node_modules和Web一样是用来存放依赖库的目录,同样的安装依赖库也需要使用npm命令,安装方式请参考:npmjs

Trffule官方提供的安装方式便是借助npm的:

npm install -g truffle
zeppelin-solidity安装

zeppelin-solidity是开发基于ERC-20代币必须要用到的库,功能比较完善,通过继承这个库的合约,可以非常方便的实现ERC-20协议、铸币、白名单等常见的功能。

npm install -g zeppelin-solidity

安装按完成后即可通过import方式引入相关依赖合约:

import "zeppelin-solidity/contracts/token/ERC20/CappedToken.sol";
使用Truffle编写和测试合约

安装完成Truffle后,cd到目标文件夹,执行 truffle init 命令,程序便会生成如下图目录,需要注意的示目标文件夹必须是空文件夹:

truffle-1

contracts 目录存放合约文件,migrateions 目录,test 目录存放测试文件。
初始化truffle目录后即可编写合约,详细用法可参考官方文档

  1. 在contracts文件夹下创建SuperCoin.sol文件,写入合约内容,solidity对于import引入方式比较糟糕,并且不同版本solidity语法还略有不同,库所使用的语法可能已经在最新版失效,建议使用过程中直接在node_modules/zeppelin-solidity找到对应需要继承的合约,复制到源码中进行最新版本适配和使用;
  2. migrateions文件夹下创建2_deploy_contracts.js文件,写入合约部署配置,此步骤是固定写法,不需要修改;
  3. 在部署成功后,test文件夹下创建和编写测试脚本,truffle提供了两种脚本文件类型,js文件和sol文件类型,合约运行过程中大部分都是异步操作,个人觉得js类型文件对于异步支持更好,具体测试脚本可以参考/truffle/test目录下提供的范例。
truffle compile             // 构建合约,如果构建成功可以看到新增了build文件夹
truffle migrate             // 部署合约
truffle test                // 执行目录下所有测试文件
truffle test xxx_test.js    // 测试某个test文件

使用truffle migrate不是合约的时候可能会出现Error: No network specified. Cannot determine current network.的错误,可以使用将下面配置测试网络的代码放到truffle.js文件内即可。

networks: {
    development: {
        host: "127.0.0.1",
        port: 7545,
        network_id: "*" // Match any network id
    }
}

使用GethRemix编写和测试合约

什么是Geth?官方解释是:Geth是用Go实现的命令行界面运行的完整功能以太坊节点。借助Geth实现:在主网络挖矿、地址间转账、创建合约和发送交易、浏览区块历史等功能。我们主要需要用Geth创建合约和发送交易等功能。

Geth安装

拉取go-ethereum源码,建议配置命令行科学上网后再尝试:go get -u github.com/ethereum/go-ethereum,go-ethereum是以太坊源码,我们用Golang连接以太坊合约需要便是要借助它来实现。

Geth安装可运行命令行工具,官方分别给出来两个系统下安装包和源码两种方式:WindowsMac
Mac下我推荐使用源码方式安装:

cd $GOPATH/src/github.com/ethereum/go-ethereum
make geth

执行完毕上面两个步骤,如果没有报错, build/bin/geth 便是生成好的 geth 可执行文件。
需要注意等是源码方式安装完毕后,需要将可执行文件手动添加到环境变量。

启动Geth客户端

正确执行上一步安装Geth,在命令行输入geth -h可测试geth是否正确安装,也可以通过这个命令查看geth提供的工具。

使用全默认配置启动geth客户端,在命令行输入geth回车执行即可,geth会默认启动一个主网络节点,并尝试连接到其他节点,开始同步全量的区块数据。

启动一个geth开发环境dev节点,这个是我们在本地使用最多的启动方式,命令如下:

geth --networkid=1234 --nodiscover --rpc --rpcport=8545 --ws --wsport=8546 --rpccorsdomain="*" --dev --dev.period 1 --datadir=/Users/james/eth/dev console 2>>eth_dev_log

命令 解释
--networkid=1234 指定网络ID,只有网络ID一致等节点才可以相互链接,以太主网路网络ID是1,不设置情况下默认ID也是1
--nodiscover 设置为不被其他节点发现
--rpc --rpcport=8545 开启RPC连接方式,并设置端口为8545
--rpccorsdomain="*" RPC允许所有跨域连接,这个设置主要是为了Remix在线连接本地开发网络
--ws --wsport=8546 开启WebSocket连接方式,并设置端口为8546
--dev --dev.period 1 开启开发网络无交易时自动挖矿设置,如不添加此设置在没有新交易时,默认不自动挖矿
--datadir=/eth/dev 设置节点区块数据本地磁盘路径,不设置时将使用默认路径
console Geth启动后仍可接收命令行命令,如不开启又需要使用命令行也可以通过geth attach ipc:\\.\pipe\geth.ipc方式连接到当前节点
console 2>>eth_dev_log 将命令行操作记录输出到指定文件

启动的运行效果如下图,geth客户端运行起来后,类似于eth.blockNumber的方法可以在:管理API查阅:

geth-1

更多参数可以使用geth -h方式查看。

Remix介绍

Remix是以太坊官方提供的在线合约构建和debug的IDE和工具集,项目地址: https://github.com/ethereum/remix-ide 、 在线工具: https://remix.ethereum.org

下面简单介绍一下怎样用remix部署合约到前一步geth启动起来的dev环境:

  1. 创建coin.sol文件;
  2. 将编写好的合约代码置于代码区域;
  3. Environment选择Web3 Provider,此步骤将连接本地启动的dev环境;
  4. 选择我们要发布的合约SuperCoin
  5. 点击create按钮部署到dev环境;
  6. 下图2中区域6即为合约所提供到功能,输入相关内容点击按钮即可测试合约;
  7. 下图2中区域7为每一次访问dev网络的记录,点击detail查看详细,点击debug调试功能。

具体操作如下图所示:

remix-1

部署过程中有两个重要生成内容,abi和bin需要保存下来,入下图所示,object里面内容即为bin,内容copy后保存为super_coin.bin文件,abi内容点击复制后,保存为super_coin.abi文件。

remix-2

Golang连接合约

使用abigen生成合约交互工具super_coin.go

ABI是程序的二进制接口。一般来说,ABI是两个程序模块之间的接口,而且通常其中一个程序处于机器级别。也就是说事实上ABI接口就是用于将数据编码/解码到机器代码的方法。
在以太坊上,就是通过ABI把Solidity合约写入到EVM,后续也是借助ABI来从事务中读取到数据的。
具体使用的来说,需要先获取到合约abi文件,再用abigen工具生成super_coin.go,最后程序调用super_coin.go实现合约的部署、方法调用(白名单管理、铸币、转账、余额查询)等交互操作。

生成合约abi文件

可以借助前面提到的Remix工具生成abi文件。

  1. 创建coin.sol文件;
  2. 将编写好的合约代码置于代码区域;
  3. 选择我们要发布的合约SuperCoin
  4. 点击detail按钮;
  5. 找到图2所示abi内容,复制并存储于项目中对应的super_coin.abi文件。 具体操作如下图

gen-abi-1 gen-abi-2

使用abigen生成super_coin.go

abigen是go-ethereum一个内置工具,可以使用下面方法安装

cd $GOPATH/src/github.com/ethereum/go-ethereum
godep go install ./cmd/abigen

abigen --abi super_coin.abi --pkg coin --type SuperCoin --out super_coin.go --bin super_coin.bin

命令 解释
--abi super_coin.abi 指定abi文件来源
--pkg coin 指定输出文件的包名
--type SuperCoin 指定合约结构体名称
--out super_coin.go 指定合约交互文件名称
--bin super_coin.bin 指定合约部署来源

更多使用方法可使用abigen -h命令来查看。

使用super_coin.go实现与合约交互

如下面代码,ethclient.Dial() 创建出来和以太坊的链接,再将这个链接传入 super_coin.goNewSuperCoin() 方法即可创建出来合约对象,super_coin.go 提供了几乎所有程序需要和合约交互的方法,详细使用可以查看示例代码 connecter.go 。或查阅 官方文档

var (
	coinAddr = common.HexToAddress("0x5A4E05aCd772BAe3109e6C424907BE9F4e35b6Db")
	coinHash = coinAddr.Hash()
)

// Connecter SuperCoin连接者
type Connecter struct {
	ctx  context.Context
	conn *ethclient.Client
	coin *SuperCoin
}

// NewConnecter 生成一个SuperCoin连接者
func NewConnecter() *Connecter {
	// Dial这里支持传入 ws、http、ipc的多种链接
	// 如果是经常需要调用最好还是使用 ws 方式保持通讯状态
	conn, err := ethclient.Dial("ws://127.0.0.1:8546")
	if err != nil {
		panic(err)
	}
	coin, err := NewSuperCoin(coinAddr, conn)
	if err != nil {
		panic(err)
	}
	return &Connecter{
		ctx:  context.Background(),
		conn: conn,
		coin: coin,
	}
}

借助Infura连接主网络或测试网络

项目开发过程中,测试阶段使用dev网络是没问题的,开发完毕后我们需要在测试运行,以及正式部署运行,这时候往往会发现 geth 运行起来的节点如果在国内的服务器上,经常会出现链接不到节点,或者链接不稳定的情况。这个时候你可能会考虑将 geth 运行在国外的服务器,实际上这个时候我们可以选择使用 InfuraInfura 可以给我们提供稳定的测试网络 RinkebyRopsten 和主网络 Mainnet的链接,使用也毫无门槛,只需要如下将 ethclient.Dial() url替换即可。

官网地址: http://infura.io/

conn, err := ethclient.Dial("https://mainnet.infura.io/LQ........bg")
if err != nil {
    panic(err)
}

Documentation

Index

Constants

View Source
const SuperCoinABI = "" /* 6575-byte string literal not displayed */

SuperCoinABI is the input ABI used to generate the binding from.

View Source
const SuperCoinBin = `` /* 18232-byte string literal not displayed */

SuperCoinBin is the compiled bytecode used for deploying new contracts.

Variables

View Source
var (
	// CoinAddr superCoin 合约地址
	CoinAddr = common.HexToAddress("0x84F70FEa5Ba54323C0EF85c58A47c98E1a2fe2Db")
	// CoinHash superCoin 合约地址Hash
	CoinHash = CoinAddr.Hash()
)

Functions

func AuthAccount

func AuthAccount(key, passphrase string) *bind.TransactOpts

AuthAccount 解锁账户 正式使用时候,此处应该限制GasPrice和GasLimit

Types

type Connecter

type Connecter struct {
	// contains filtered or unexported fields
}

Connecter SuperCoin连接者

func NewConnecter

func NewConnecter() *Connecter

NewConnecter 生成一个SuperCoin连接者

func NewConnecterWithDeploy

func NewConnecterWithDeploy(ownerAuth *bind.TransactOpts) *Connecter

NewConnecterWithDeploy 部署合约,并创建一个connecter

func (*Connecter) AddToWhitelist

func (c *Connecter) AddToWhitelist(ownerAuth *bind.TransactOpts, addr common.Address) bool

AddToWhitelist 地址是否在白名单

func (*Connecter) BalanceOfCoin

func (c *Connecter) BalanceOfCoin(addr common.Address) *big.Int

BalanceOfCoin SuperCoin余额

func (*Connecter) BalanceOfEth

func (c *Connecter) BalanceOfEth(addr common.Address) *big.Int

BalanceOfEth 以太币余额

func (*Connecter) BlockNumber

func (c *Connecter) BlockNumber() *big.Int

BlockNumber 当前块高度

func (*Connecter) ContractName

func (c *Connecter) ContractName() string

ContractName SuperCoin名称

func (*Connecter) ExistsWhiteList

func (c *Connecter) ExistsWhiteList(addr common.Address) bool

ExistsWhiteList 地址是否在白名单

func (*Connecter) Mint

func (c *Connecter) Mint(ownerAuth *bind.TransactOpts, addr common.Address, amount *big.Int) bool

Mint 给白名单地址铸币

func (*Connecter) MintLogs

func (c *Connecter) MintLogs()

MintLogs 铸币记录

func (*Connecter) RemoveFromWhitelist

func (c *Connecter) RemoveFromWhitelist(ownerAuth *bind.TransactOpts, addr common.Address) bool

RemoveFromWhitelist 地址是否在白名单

func (*Connecter) TotalSupply

func (c *Connecter) TotalSupply() *big.Int

TotalSupply SuperCoin已铸币量

func (*Connecter) TransferCoin

func (c *Connecter) TransferCoin(fromAuth *bind.TransactOpts, to common.Address, amount *big.Int) bool

TransferCoin SuperCoin转账

func (*Connecter) TransferLogs

func (c *Connecter) TransferLogs(froms []common.Address, tos []common.Address)

TransferLogs SuperCoin转账记录

func (*Connecter) WatchTransferAndMint

func (c *Connecter) WatchTransferAndMint()

WatchTransferAndMint 监听transfer和mint事件

type SuperCoin

type SuperCoin struct {
	SuperCoinCaller     // Read-only binding to the contract
	SuperCoinTransactor // Write-only binding to the contract
	SuperCoinFilterer   // Log filterer for contract events
}

SuperCoin is an auto generated Go binding around an Ethereum contract.

func DeploySuperCoin

func DeploySuperCoin(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SuperCoin, error)

DeploySuperCoin deploys a new Ethereum contract, binding an instance of SuperCoin to it.

func NewSuperCoin

func NewSuperCoin(address common.Address, backend bind.ContractBackend) (*SuperCoin, error)

NewSuperCoin creates a new instance of SuperCoin, bound to a specific deployed contract.

type SuperCoinApproval

type SuperCoinApproval struct {
	Owner   common.Address
	Spender common.Address
	Value   *big.Int
	Raw     types.Log // Blockchain specific contextual infos
}

SuperCoinApproval represents a Approval event raised by the SuperCoin contract.

type SuperCoinApprovalIterator

type SuperCoinApprovalIterator struct {
	Event *SuperCoinApproval // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SuperCoinApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the SuperCoin contract.

func (*SuperCoinApprovalIterator) Close

func (it *SuperCoinApprovalIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*SuperCoinApprovalIterator) Error

func (it *SuperCoinApprovalIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*SuperCoinApprovalIterator) Next

func (it *SuperCoinApprovalIterator) Next() bool

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.

type SuperCoinCaller

type SuperCoinCaller struct {
	// contains filtered or unexported fields
}

SuperCoinCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewSuperCoinCaller

func NewSuperCoinCaller(address common.Address, caller bind.ContractCaller) (*SuperCoinCaller, error)

NewSuperCoinCaller creates a new read-only instance of SuperCoin, bound to a specific deployed contract.

func (*SuperCoinCaller) Allowance

func (_SuperCoin *SuperCoinCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(uint256)

func (*SuperCoinCaller) BalanceOf

func (_SuperCoin *SuperCoinCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(balance uint256)

func (*SuperCoinCaller) CAPSUPPLY

func (_SuperCoin *SuperCoinCaller) CAPSUPPLY(opts *bind.CallOpts) (*big.Int, error)

CAPSUPPLY is a free data retrieval call binding the contract method 0x070c0c4e.

Solidity: function CAP_SUPPLY() constant returns(uint256)

func (*SuperCoinCaller) Cap

func (_SuperCoin *SuperCoinCaller) Cap(opts *bind.CallOpts) (*big.Int, error)

Cap is a free data retrieval call binding the contract method 0x355274ea.

Solidity: function cap() constant returns(uint256)

func (*SuperCoinCaller) Decimals

func (_SuperCoin *SuperCoinCaller) Decimals(opts *bind.CallOpts) (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() constant returns(uint8)

func (*SuperCoinCaller) ExistedOnWhitelist

func (_SuperCoin *SuperCoinCaller) ExistedOnWhitelist(opts *bind.CallOpts, addr common.Address) (bool, error)

ExistedOnWhitelist is a free data retrieval call binding the contract method 0x8ab905d4.

Solidity: function existedOnWhitelist(addr address) constant returns(bool)

func (*SuperCoinCaller) INITIALSUPPLY

func (_SuperCoin *SuperCoinCaller) INITIALSUPPLY(opts *bind.CallOpts) (*big.Int, error)

INITIALSUPPLY is a free data retrieval call binding the contract method 0x2ff2e9dc.

Solidity: function INITIAL_SUPPLY() constant returns(uint256)

func (*SuperCoinCaller) MintingFinished

func (_SuperCoin *SuperCoinCaller) MintingFinished(opts *bind.CallOpts) (bool, error)

MintingFinished is a free data retrieval call binding the contract method 0x05d2035b.

Solidity: function mintingFinished() constant returns(bool)

func (*SuperCoinCaller) Name

func (_SuperCoin *SuperCoinCaller) Name(opts *bind.CallOpts) (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*SuperCoinCaller) ONCEMAXMINT

func (_SuperCoin *SuperCoinCaller) ONCEMAXMINT(opts *bind.CallOpts) (*big.Int, error)

ONCEMAXMINT is a free data retrieval call binding the contract method 0x9aabb18c.

Solidity: function ONCE_MAX_MINT() constant returns(uint256)

func (*SuperCoinCaller) Owner

func (_SuperCoin *SuperCoinCaller) Owner(opts *bind.CallOpts) (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() constant returns(address)

func (*SuperCoinCaller) Symbol

func (_SuperCoin *SuperCoinCaller) Symbol(opts *bind.CallOpts) (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*SuperCoinCaller) TotalSupply

func (_SuperCoin *SuperCoinCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

func (*SuperCoinCaller) Whitelist

func (_SuperCoin *SuperCoinCaller) Whitelist(opts *bind.CallOpts, arg0 common.Address) (bool, error)

Whitelist is a free data retrieval call binding the contract method 0x9b19251a.

Solidity: function whitelist( address) constant returns(bool)

type SuperCoinCallerRaw

type SuperCoinCallerRaw struct {
	Contract *SuperCoinCaller // Generic read-only contract binding to access the raw methods on
}

SuperCoinCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*SuperCoinCallerRaw) Call

func (_SuperCoin *SuperCoinCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

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.

type SuperCoinCallerSession

type SuperCoinCallerSession struct {
	Contract *SuperCoinCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts    // Call options to use throughout this session
}

SuperCoinCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*SuperCoinCallerSession) Allowance

func (_SuperCoin *SuperCoinCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(uint256)

func (*SuperCoinCallerSession) BalanceOf

func (_SuperCoin *SuperCoinCallerSession) BalanceOf(_owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(balance uint256)

func (*SuperCoinCallerSession) CAPSUPPLY

func (_SuperCoin *SuperCoinCallerSession) CAPSUPPLY() (*big.Int, error)

CAPSUPPLY is a free data retrieval call binding the contract method 0x070c0c4e.

Solidity: function CAP_SUPPLY() constant returns(uint256)

func (*SuperCoinCallerSession) Cap

func (_SuperCoin *SuperCoinCallerSession) Cap() (*big.Int, error)

Cap is a free data retrieval call binding the contract method 0x355274ea.

Solidity: function cap() constant returns(uint256)

func (*SuperCoinCallerSession) Decimals

func (_SuperCoin *SuperCoinCallerSession) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() constant returns(uint8)

func (*SuperCoinCallerSession) ExistedOnWhitelist

func (_SuperCoin *SuperCoinCallerSession) ExistedOnWhitelist(addr common.Address) (bool, error)

ExistedOnWhitelist is a free data retrieval call binding the contract method 0x8ab905d4.

Solidity: function existedOnWhitelist(addr address) constant returns(bool)

func (*SuperCoinCallerSession) INITIALSUPPLY

func (_SuperCoin *SuperCoinCallerSession) INITIALSUPPLY() (*big.Int, error)

INITIALSUPPLY is a free data retrieval call binding the contract method 0x2ff2e9dc.

Solidity: function INITIAL_SUPPLY() constant returns(uint256)

func (*SuperCoinCallerSession) MintingFinished

func (_SuperCoin *SuperCoinCallerSession) MintingFinished() (bool, error)

MintingFinished is a free data retrieval call binding the contract method 0x05d2035b.

Solidity: function mintingFinished() constant returns(bool)

func (*SuperCoinCallerSession) Name

func (_SuperCoin *SuperCoinCallerSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*SuperCoinCallerSession) ONCEMAXMINT

func (_SuperCoin *SuperCoinCallerSession) ONCEMAXMINT() (*big.Int, error)

ONCEMAXMINT is a free data retrieval call binding the contract method 0x9aabb18c.

Solidity: function ONCE_MAX_MINT() constant returns(uint256)

func (*SuperCoinCallerSession) Owner

func (_SuperCoin *SuperCoinCallerSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() constant returns(address)

func (*SuperCoinCallerSession) Symbol

func (_SuperCoin *SuperCoinCallerSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*SuperCoinCallerSession) TotalSupply

func (_SuperCoin *SuperCoinCallerSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

func (*SuperCoinCallerSession) Whitelist

func (_SuperCoin *SuperCoinCallerSession) Whitelist(arg0 common.Address) (bool, error)

Whitelist is a free data retrieval call binding the contract method 0x9b19251a.

Solidity: function whitelist( address) constant returns(bool)

type SuperCoinFilterer

type SuperCoinFilterer struct {
	// contains filtered or unexported fields
}

SuperCoinFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewSuperCoinFilterer

func NewSuperCoinFilterer(address common.Address, filterer bind.ContractFilterer) (*SuperCoinFilterer, error)

NewSuperCoinFilterer creates a new log filterer instance of SuperCoin, bound to a specific deployed contract.

func (*SuperCoinFilterer) FilterApproval

func (_SuperCoin *SuperCoinFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*SuperCoinApprovalIterator, error)

FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(owner indexed address, spender indexed address, value uint256)

func (*SuperCoinFilterer) FilterMint

func (_SuperCoin *SuperCoinFilterer) FilterMint(opts *bind.FilterOpts, to []common.Address) (*SuperCoinMintIterator, error)

FilterMint is a free log retrieval operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885.

Solidity: event Mint(to indexed address, amount uint256)

func (*SuperCoinFilterer) FilterMintFinished

func (_SuperCoin *SuperCoinFilterer) FilterMintFinished(opts *bind.FilterOpts) (*SuperCoinMintFinishedIterator, error)

FilterMintFinished is a free log retrieval operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08.

Solidity: event MintFinished()

func (*SuperCoinFilterer) FilterOwnershipTransferred

func (_SuperCoin *SuperCoinFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*SuperCoinOwnershipTransferredIterator, error)

FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.

Solidity: event OwnershipTransferred(previousOwner indexed address, newOwner indexed address)

func (*SuperCoinFilterer) FilterTransfer

func (_SuperCoin *SuperCoinFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*SuperCoinTransferIterator, error)

FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(from indexed address, to indexed address, value uint256)

func (*SuperCoinFilterer) FilterWhitelistedAddressAdded

func (_SuperCoin *SuperCoinFilterer) FilterWhitelistedAddressAdded(opts *bind.FilterOpts) (*SuperCoinWhitelistedAddressAddedIterator, error)

FilterWhitelistedAddressAdded is a free log retrieval operation binding the contract event 0xd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f.

Solidity: event WhitelistedAddressAdded(addr address)

func (*SuperCoinFilterer) FilterWhitelistedAddressRemoved

func (_SuperCoin *SuperCoinFilterer) FilterWhitelistedAddressRemoved(opts *bind.FilterOpts) (*SuperCoinWhitelistedAddressRemovedIterator, error)

FilterWhitelistedAddressRemoved is a free log retrieval operation binding the contract event 0xf1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a.

Solidity: event WhitelistedAddressRemoved(addr address)

func (*SuperCoinFilterer) WatchApproval

func (_SuperCoin *SuperCoinFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *SuperCoinApproval, owner []common.Address, spender []common.Address) (event.Subscription, error)

WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(owner indexed address, spender indexed address, value uint256)

func (*SuperCoinFilterer) WatchMint

func (_SuperCoin *SuperCoinFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *SuperCoinMint, to []common.Address) (event.Subscription, error)

WatchMint is a free log subscription operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885.

Solidity: event Mint(to indexed address, amount uint256)

func (*SuperCoinFilterer) WatchMintFinished

func (_SuperCoin *SuperCoinFilterer) WatchMintFinished(opts *bind.WatchOpts, sink chan<- *SuperCoinMintFinished) (event.Subscription, error)

WatchMintFinished is a free log subscription operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08.

Solidity: event MintFinished()

func (*SuperCoinFilterer) WatchOwnershipTransferred

func (_SuperCoin *SuperCoinFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *SuperCoinOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error)

WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.

Solidity: event OwnershipTransferred(previousOwner indexed address, newOwner indexed address)

func (*SuperCoinFilterer) WatchTransfer

func (_SuperCoin *SuperCoinFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *SuperCoinTransfer, from []common.Address, to []common.Address) (event.Subscription, error)

WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(from indexed address, to indexed address, value uint256)

func (*SuperCoinFilterer) WatchWhitelistedAddressAdded

func (_SuperCoin *SuperCoinFilterer) WatchWhitelistedAddressAdded(opts *bind.WatchOpts, sink chan<- *SuperCoinWhitelistedAddressAdded) (event.Subscription, error)

WatchWhitelistedAddressAdded is a free log subscription operation binding the contract event 0xd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f.

Solidity: event WhitelistedAddressAdded(addr address)

func (*SuperCoinFilterer) WatchWhitelistedAddressRemoved

func (_SuperCoin *SuperCoinFilterer) WatchWhitelistedAddressRemoved(opts *bind.WatchOpts, sink chan<- *SuperCoinWhitelistedAddressRemoved) (event.Subscription, error)

WatchWhitelistedAddressRemoved is a free log subscription operation binding the contract event 0xf1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a.

Solidity: event WhitelistedAddressRemoved(addr address)

type SuperCoinMint

type SuperCoinMint struct {
	To     common.Address
	Amount *big.Int
	Raw    types.Log // Blockchain specific contextual infos
}

SuperCoinMint represents a Mint event raised by the SuperCoin contract.

func (*SuperCoinMint) String

func (s *SuperCoinMint) String() string

type SuperCoinMintFinished

type SuperCoinMintFinished struct {
	Raw types.Log // Blockchain specific contextual infos
}

SuperCoinMintFinished represents a MintFinished event raised by the SuperCoin contract.

type SuperCoinMintFinishedIterator

type SuperCoinMintFinishedIterator struct {
	Event *SuperCoinMintFinished // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SuperCoinMintFinishedIterator is returned from FilterMintFinished and is used to iterate over the raw logs and unpacked data for MintFinished events raised by the SuperCoin contract.

func (*SuperCoinMintFinishedIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*SuperCoinMintFinishedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*SuperCoinMintFinishedIterator) Next

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.

type SuperCoinMintIterator

type SuperCoinMintIterator struct {
	Event *SuperCoinMint // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SuperCoinMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the SuperCoin contract.

func (*SuperCoinMintIterator) Close

func (it *SuperCoinMintIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*SuperCoinMintIterator) Error

func (it *SuperCoinMintIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*SuperCoinMintIterator) Next

func (it *SuperCoinMintIterator) Next() bool

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.

type SuperCoinOwnershipTransferred

type SuperCoinOwnershipTransferred struct {
	PreviousOwner common.Address
	NewOwner      common.Address
	Raw           types.Log // Blockchain specific contextual infos
}

SuperCoinOwnershipTransferred represents a OwnershipTransferred event raised by the SuperCoin contract.

type SuperCoinOwnershipTransferredIterator

type SuperCoinOwnershipTransferredIterator struct {
	Event *SuperCoinOwnershipTransferred // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SuperCoinOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the SuperCoin contract.

func (*SuperCoinOwnershipTransferredIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*SuperCoinOwnershipTransferredIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*SuperCoinOwnershipTransferredIterator) Next

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.

type SuperCoinRaw

type SuperCoinRaw struct {
	Contract *SuperCoin // Generic contract binding to access the raw methods on
}

SuperCoinRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*SuperCoinRaw) Call

func (_SuperCoin *SuperCoinRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

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 (*SuperCoinRaw) Transact

func (_SuperCoin *SuperCoinRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*SuperCoinRaw) Transfer

func (_SuperCoin *SuperCoinRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type SuperCoinSession

type SuperCoinSession struct {
	Contract     *SuperCoin        // 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
}

SuperCoinSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*SuperCoinSession) AddToWhitelist

func (_SuperCoin *SuperCoinSession) AddToWhitelist(addr common.Address) (*types.Transaction, error)

AddToWhitelist is a paid mutator transaction binding the contract method 0xe43252d7.

Solidity: function addToWhitelist(addr address) returns(bool)

func (*SuperCoinSession) Allowance

func (_SuperCoin *SuperCoinSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(uint256)

func (*SuperCoinSession) Approve

func (_SuperCoin *SuperCoinSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(bool)

func (*SuperCoinSession) BalanceOf

func (_SuperCoin *SuperCoinSession) BalanceOf(_owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(balance uint256)

func (*SuperCoinSession) CAPSUPPLY

func (_SuperCoin *SuperCoinSession) CAPSUPPLY() (*big.Int, error)

CAPSUPPLY is a free data retrieval call binding the contract method 0x070c0c4e.

Solidity: function CAP_SUPPLY() constant returns(uint256)

func (*SuperCoinSession) Cap

func (_SuperCoin *SuperCoinSession) Cap() (*big.Int, error)

Cap is a free data retrieval call binding the contract method 0x355274ea.

Solidity: function cap() constant returns(uint256)

func (*SuperCoinSession) Decimals

func (_SuperCoin *SuperCoinSession) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() constant returns(uint8)

func (*SuperCoinSession) DecreaseApproval

func (_SuperCoin *SuperCoinSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error)

DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463.

Solidity: function decreaseApproval(_spender address, _subtractedValue uint256) returns(bool)

func (*SuperCoinSession) ExistedOnWhitelist

func (_SuperCoin *SuperCoinSession) ExistedOnWhitelist(addr common.Address) (bool, error)

ExistedOnWhitelist is a free data retrieval call binding the contract method 0x8ab905d4.

Solidity: function existedOnWhitelist(addr address) constant returns(bool)

func (*SuperCoinSession) FinishMinting

func (_SuperCoin *SuperCoinSession) FinishMinting() (*types.Transaction, error)

FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4.

Solidity: function finishMinting() returns(bool)

func (*SuperCoinSession) INITIALSUPPLY

func (_SuperCoin *SuperCoinSession) INITIALSUPPLY() (*big.Int, error)

INITIALSUPPLY is a free data retrieval call binding the contract method 0x2ff2e9dc.

Solidity: function INITIAL_SUPPLY() constant returns(uint256)

func (*SuperCoinSession) IncreaseApproval

func (_SuperCoin *SuperCoinSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error)

IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623.

Solidity: function increaseApproval(_spender address, _addedValue uint256) returns(bool)

func (*SuperCoinSession) Mint

func (_SuperCoin *SuperCoinSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0x40c10f19.

Solidity: function mint(to address, amount uint256) returns(bool)

func (*SuperCoinSession) MintingFinished

func (_SuperCoin *SuperCoinSession) MintingFinished() (bool, error)

MintingFinished is a free data retrieval call binding the contract method 0x05d2035b.

Solidity: function mintingFinished() constant returns(bool)

func (*SuperCoinSession) Name

func (_SuperCoin *SuperCoinSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*SuperCoinSession) ONCEMAXMINT

func (_SuperCoin *SuperCoinSession) ONCEMAXMINT() (*big.Int, error)

ONCEMAXMINT is a free data retrieval call binding the contract method 0x9aabb18c.

Solidity: function ONCE_MAX_MINT() constant returns(uint256)

func (*SuperCoinSession) Owner

func (_SuperCoin *SuperCoinSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() constant returns(address)

func (*SuperCoinSession) RemoveFromWhitelist

func (_SuperCoin *SuperCoinSession) RemoveFromWhitelist(addr common.Address) (*types.Transaction, error)

RemoveFromWhitelist is a paid mutator transaction binding the contract method 0x8ab1d681.

Solidity: function removeFromWhitelist(addr address) returns(bool)

func (*SuperCoinSession) Symbol

func (_SuperCoin *SuperCoinSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*SuperCoinSession) TotalSupply

func (_SuperCoin *SuperCoinSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

func (*SuperCoinSession) Transfer

func (_SuperCoin *SuperCoinSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(bool)

func (*SuperCoinSession) TransferFrom

func (_SuperCoin *SuperCoinSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(bool)

func (*SuperCoinSession) TransferOwnership

func (_SuperCoin *SuperCoinSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(newOwner address) returns()

func (*SuperCoinSession) Whitelist

func (_SuperCoin *SuperCoinSession) Whitelist(arg0 common.Address) (bool, error)

Whitelist is a free data retrieval call binding the contract method 0x9b19251a.

Solidity: function whitelist( address) constant returns(bool)

type SuperCoinTransactor

type SuperCoinTransactor struct {
	// contains filtered or unexported fields
}

SuperCoinTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewSuperCoinTransactor

func NewSuperCoinTransactor(address common.Address, transactor bind.ContractTransactor) (*SuperCoinTransactor, error)

NewSuperCoinTransactor creates a new write-only instance of SuperCoin, bound to a specific deployed contract.

func (*SuperCoinTransactor) AddToWhitelist

func (_SuperCoin *SuperCoinTransactor) AddToWhitelist(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error)

AddToWhitelist is a paid mutator transaction binding the contract method 0xe43252d7.

Solidity: function addToWhitelist(addr address) returns(bool)

func (*SuperCoinTransactor) Approve

func (_SuperCoin *SuperCoinTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(bool)

func (*SuperCoinTransactor) DecreaseApproval

func (_SuperCoin *SuperCoinTransactor) DecreaseApproval(opts *bind.TransactOpts, _spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error)

DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463.

Solidity: function decreaseApproval(_spender address, _subtractedValue uint256) returns(bool)

func (*SuperCoinTransactor) FinishMinting

func (_SuperCoin *SuperCoinTransactor) FinishMinting(opts *bind.TransactOpts) (*types.Transaction, error)

FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4.

Solidity: function finishMinting() returns(bool)

func (*SuperCoinTransactor) IncreaseApproval

func (_SuperCoin *SuperCoinTransactor) IncreaseApproval(opts *bind.TransactOpts, _spender common.Address, _addedValue *big.Int) (*types.Transaction, error)

IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623.

Solidity: function increaseApproval(_spender address, _addedValue uint256) returns(bool)

func (*SuperCoinTransactor) Mint

func (_SuperCoin *SuperCoinTransactor) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0x40c10f19.

Solidity: function mint(to address, amount uint256) returns(bool)

func (*SuperCoinTransactor) RemoveFromWhitelist

func (_SuperCoin *SuperCoinTransactor) RemoveFromWhitelist(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error)

RemoveFromWhitelist is a paid mutator transaction binding the contract method 0x8ab1d681.

Solidity: function removeFromWhitelist(addr address) returns(bool)

func (*SuperCoinTransactor) Transfer

func (_SuperCoin *SuperCoinTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(bool)

func (*SuperCoinTransactor) TransferFrom

func (_SuperCoin *SuperCoinTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(bool)

func (*SuperCoinTransactor) TransferOwnership

func (_SuperCoin *SuperCoinTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(newOwner address) returns()

type SuperCoinTransactorRaw

type SuperCoinTransactorRaw struct {
	Contract *SuperCoinTransactor // Generic write-only contract binding to access the raw methods on
}

SuperCoinTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*SuperCoinTransactorRaw) Transact

func (_SuperCoin *SuperCoinTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*SuperCoinTransactorRaw) Transfer

func (_SuperCoin *SuperCoinTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type SuperCoinTransactorSession

type SuperCoinTransactorSession struct {
	Contract     *SuperCoinTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts    // Transaction auth options to use throughout this session
}

SuperCoinTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*SuperCoinTransactorSession) AddToWhitelist

func (_SuperCoin *SuperCoinTransactorSession) AddToWhitelist(addr common.Address) (*types.Transaction, error)

AddToWhitelist is a paid mutator transaction binding the contract method 0xe43252d7.

Solidity: function addToWhitelist(addr address) returns(bool)

func (*SuperCoinTransactorSession) Approve

func (_SuperCoin *SuperCoinTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(bool)

func (*SuperCoinTransactorSession) DecreaseApproval

func (_SuperCoin *SuperCoinTransactorSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error)

DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463.

Solidity: function decreaseApproval(_spender address, _subtractedValue uint256) returns(bool)

func (*SuperCoinTransactorSession) FinishMinting

func (_SuperCoin *SuperCoinTransactorSession) FinishMinting() (*types.Transaction, error)

FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4.

Solidity: function finishMinting() returns(bool)

func (*SuperCoinTransactorSession) IncreaseApproval

func (_SuperCoin *SuperCoinTransactorSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error)

IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623.

Solidity: function increaseApproval(_spender address, _addedValue uint256) returns(bool)

func (*SuperCoinTransactorSession) Mint

func (_SuperCoin *SuperCoinTransactorSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error)

Mint is a paid mutator transaction binding the contract method 0x40c10f19.

Solidity: function mint(to address, amount uint256) returns(bool)

func (*SuperCoinTransactorSession) RemoveFromWhitelist

func (_SuperCoin *SuperCoinTransactorSession) RemoveFromWhitelist(addr common.Address) (*types.Transaction, error)

RemoveFromWhitelist is a paid mutator transaction binding the contract method 0x8ab1d681.

Solidity: function removeFromWhitelist(addr address) returns(bool)

func (*SuperCoinTransactorSession) Transfer

func (_SuperCoin *SuperCoinTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(bool)

func (*SuperCoinTransactorSession) TransferFrom

func (_SuperCoin *SuperCoinTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(bool)

func (*SuperCoinTransactorSession) TransferOwnership

func (_SuperCoin *SuperCoinTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(newOwner address) returns()

type SuperCoinTransfer

type SuperCoinTransfer struct {
	From  common.Address
	To    common.Address
	Value *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

SuperCoinTransfer represents a Transfer event raised by the SuperCoin contract.

func (*SuperCoinTransfer) String

func (s *SuperCoinTransfer) String() string

type SuperCoinTransferIterator

type SuperCoinTransferIterator struct {
	Event *SuperCoinTransfer // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SuperCoinTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the SuperCoin contract.

func (*SuperCoinTransferIterator) Close

func (it *SuperCoinTransferIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*SuperCoinTransferIterator) Error

func (it *SuperCoinTransferIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*SuperCoinTransferIterator) Next

func (it *SuperCoinTransferIterator) Next() bool

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.

type SuperCoinWhitelistedAddressAdded

type SuperCoinWhitelistedAddressAdded struct {
	Addr common.Address
	Raw  types.Log // Blockchain specific contextual infos
}

SuperCoinWhitelistedAddressAdded represents a WhitelistedAddressAdded event raised by the SuperCoin contract.

type SuperCoinWhitelistedAddressAddedIterator

type SuperCoinWhitelistedAddressAddedIterator struct {
	Event *SuperCoinWhitelistedAddressAdded // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SuperCoinWhitelistedAddressAddedIterator is returned from FilterWhitelistedAddressAdded and is used to iterate over the raw logs and unpacked data for WhitelistedAddressAdded events raised by the SuperCoin contract.

func (*SuperCoinWhitelistedAddressAddedIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*SuperCoinWhitelistedAddressAddedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*SuperCoinWhitelistedAddressAddedIterator) Next

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.

type SuperCoinWhitelistedAddressRemoved

type SuperCoinWhitelistedAddressRemoved struct {
	Addr common.Address
	Raw  types.Log // Blockchain specific contextual infos
}

SuperCoinWhitelistedAddressRemoved represents a WhitelistedAddressRemoved event raised by the SuperCoin contract.

type SuperCoinWhitelistedAddressRemovedIterator

type SuperCoinWhitelistedAddressRemovedIterator struct {
	Event *SuperCoinWhitelistedAddressRemoved // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

SuperCoinWhitelistedAddressRemovedIterator is returned from FilterWhitelistedAddressRemoved and is used to iterate over the raw logs and unpacked data for WhitelistedAddressRemoved events raised by the SuperCoin contract.

func (*SuperCoinWhitelistedAddressRemovedIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*SuperCoinWhitelistedAddressRemovedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*SuperCoinWhitelistedAddressRemovedIterator) Next

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL