contracts

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	bind.ContractBackend
	TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
	// BalanceAt gets balance of specified account at the block specified by parameter blockNum. If blockNum is nil, will be the latest one.
	BalanceAt(ctx context.Context, address common.Address, blockNum *big.Int) (*big.Int, error)
}

Backend wraps all methods required for campaign operation.

type CampaignWrapper

type CampaignWrapper struct {
	*campaign.CampaignSession
	// contains filtered or unexported fields
}

func DeployCampaign

func DeployCampaign(transactOpts *bind.TransactOpts, contractBackend Backend, admissionContractAddr common.Address, rewardContractAddr common.Address) (common.Address, *CampaignWrapper, error)

func NewCampaignWrapper

func NewCampaignWrapper(transactOpts *bind.TransactOpts, contractAddr common.Address, contractBackend Backend) (*CampaignWrapper, error)

func (*CampaignWrapper) ClaimCampaign

func (self *CampaignWrapper) ClaimCampaign(numOfCampaign *big.Int, cpuNonce uint64, cpuBlockNumber *big.Int,
	memoryNonce uint64, memoryBlockNumber *big.Int, version *big.Int) (*types.Transaction, error)

func (*CampaignWrapper) MaximumNoc

func (self *CampaignWrapper) MaximumNoc() (*big.Int, error)

Jump to

Keyboard shortcuts

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