Documentation ¶
Index ¶
- Constants
- type GetMaintenance
- type GetProxyCount
- type GetRank
- type GetTxVolume
- type GetUploadReward
- type IsProxy
- type PrimitiveContractsInterface
- type PrimitiveContractsInterfaceCaller
- type PrimitiveContractsInterfaceCallerRaw
- type PrimitiveContractsInterfaceCallerSession
- type PrimitiveContractsInterfaceFilterer
- type PrimitiveContractsInterfaceRaw
- func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
- func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type PrimitiveContractsInterfaceSession
- type PrimitiveContractsInterfaceTransactor
- type PrimitiveContractsInterfaceTransactorRaw
- func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type PrimitiveContractsInterfaceTransactorSession
- type RptEvaluator
- func (re *RptEvaluator) Maintenance(address common.Address, number uint64) (int64, error)
- func (re *RptEvaluator) ProxyInfo(address common.Address, number uint64) (int64, int64, error)
- func (re *RptEvaluator) Rank(address common.Address, number uint64) (int64, error)
- func (re *RptEvaluator) TxVolume(address common.Address, number uint64) (int64, error)
- func (re *RptEvaluator) UploadCount(address common.Address, number uint64) (int64, error)
- type RptPrimitiveBackend
Constants ¶
const ( Created = iota Finished )
const PrimitiveContractsInterfaceABI = "[]"
PrimitiveContractsInterfaceABI is the input ABI used to generate the binding from.
const PrimitiveContractsInterfaceBin = `` /* 242-byte string literal not displayed */
PrimitiveContractsInterfaceBin is the compiled bytecode used for deploying new contracts.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetMaintenance ¶
type GetMaintenance struct {
Backend RptPrimitiveBackend
}
func (*GetMaintenance) RequiredGas ¶
func (c *GetMaintenance) RequiredGas(input []byte) uint64
type GetProxyCount ¶
type GetProxyCount struct {
Backend RptPrimitiveBackend
}
GetProxyCount returns the count of transactions processed by the proxy specified by given account address
func (*GetProxyCount) RequiredGas ¶
func (c *GetProxyCount) RequiredGas(input []byte) uint64
type GetTxVolume ¶
type GetTxVolume struct {
Backend RptPrimitiveBackend
}
func (*GetTxVolume) RequiredGas ¶
func (c *GetTxVolume) RequiredGas(input []byte) uint64
type GetUploadReward ¶
type GetUploadReward struct {
Backend RptPrimitiveBackend
}
func (*GetUploadReward) RequiredGas ¶
func (c *GetUploadReward) RequiredGas(input []byte) uint64
type PrimitiveContractsInterface ¶
type PrimitiveContractsInterface struct { PrimitiveContractsInterfaceCaller // Read-only binding to the contract PrimitiveContractsInterfaceTransactor // Write-only binding to the contract PrimitiveContractsInterfaceFilterer // Log filterer for contract events }
PrimitiveContractsInterface is an auto generated Go binding around an cpchain contract.
func DeployPrimitiveContractsInterface ¶
func DeployPrimitiveContractsInterface(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *PrimitiveContractsInterface, error)
DeployPrimitiveContractsInterface deploys a new cpchain contract, binding an instance of PrimitiveContractsInterface to it.
func NewPrimitiveContractsInterface ¶
func NewPrimitiveContractsInterface(address common.Address, backend bind.ContractBackend) (*PrimitiveContractsInterface, error)
NewPrimitiveContractsInterface creates a new instance of PrimitiveContractsInterface, bound to a specific deployed contract.
type PrimitiveContractsInterfaceCaller ¶
type PrimitiveContractsInterfaceCaller struct {
// contains filtered or unexported fields
}
PrimitiveContractsInterfaceCaller is an auto generated read-only Go binding around an cpchain contract.
func NewPrimitiveContractsInterfaceCaller ¶
func NewPrimitiveContractsInterfaceCaller(address common.Address, caller bind.ContractCaller) (*PrimitiveContractsInterfaceCaller, error)
NewPrimitiveContractsInterfaceCaller creates a new read-only instance of PrimitiveContractsInterface, bound to a specific deployed contract.
type PrimitiveContractsInterfaceCallerRaw ¶
type PrimitiveContractsInterfaceCallerRaw struct {
Contract *PrimitiveContractsInterfaceCaller // Generic read-only contract binding to access the raw methods on
}
PrimitiveContractsInterfaceCallerRaw is an auto generated low-level read-only Go binding around an cpchain contract.
func (*PrimitiveContractsInterfaceCallerRaw) Call ¶
func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceCallerRaw) 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 PrimitiveContractsInterfaceCallerSession ¶
type PrimitiveContractsInterfaceCallerSession struct { Contract *PrimitiveContractsInterfaceCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
PrimitiveContractsInterfaceCallerSession is an auto generated read-only Go binding around an cpchain contract, with pre-set call options.
type PrimitiveContractsInterfaceFilterer ¶
type PrimitiveContractsInterfaceFilterer struct {
// contains filtered or unexported fields
}
PrimitiveContractsInterfaceFilterer is an auto generated log filtering Go binding around an cpchain contract events.
func NewPrimitiveContractsInterfaceFilterer ¶
func NewPrimitiveContractsInterfaceFilterer(address common.Address, filterer bind.ContractFilterer) (*PrimitiveContractsInterfaceFilterer, error)
NewPrimitiveContractsInterfaceFilterer creates a new log filterer instance of PrimitiveContractsInterface, bound to a specific deployed contract.
type PrimitiveContractsInterfaceRaw ¶
type PrimitiveContractsInterfaceRaw struct {
Contract *PrimitiveContractsInterface // Generic contract binding to access the raw methods on
}
PrimitiveContractsInterfaceRaw is an auto generated low-level Go binding around an cpchain contract.
func (*PrimitiveContractsInterfaceRaw) Call ¶
func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceRaw) 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 (*PrimitiveContractsInterfaceRaw) Transact ¶
func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*PrimitiveContractsInterfaceRaw) Transfer ¶
func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceRaw) 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 PrimitiveContractsInterfaceSession ¶
type PrimitiveContractsInterfaceSession struct { Contract *PrimitiveContractsInterface // 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 }
PrimitiveContractsInterfaceSession is an auto generated Go binding around an cpchain contract, with pre-set call and transact options.
type PrimitiveContractsInterfaceTransactor ¶
type PrimitiveContractsInterfaceTransactor struct {
// contains filtered or unexported fields
}
PrimitiveContractsInterfaceTransactor is an auto generated write-only Go binding around an cpchain contract.
func NewPrimitiveContractsInterfaceTransactor ¶
func NewPrimitiveContractsInterfaceTransactor(address common.Address, transactor bind.ContractTransactor) (*PrimitiveContractsInterfaceTransactor, error)
NewPrimitiveContractsInterfaceTransactor creates a new write-only instance of PrimitiveContractsInterface, bound to a specific deployed contract.
type PrimitiveContractsInterfaceTransactorRaw ¶
type PrimitiveContractsInterfaceTransactorRaw struct {
Contract *PrimitiveContractsInterfaceTransactor // Generic write-only contract binding to access the raw methods on
}
PrimitiveContractsInterfaceTransactorRaw is an auto generated low-level write-only Go binding around an cpchain contract.
func (*PrimitiveContractsInterfaceTransactorRaw) Transact ¶
func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*PrimitiveContractsInterfaceTransactorRaw) Transfer ¶
func (_PrimitiveContractsInterface *PrimitiveContractsInterfaceTransactorRaw) 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 PrimitiveContractsInterfaceTransactorSession ¶
type PrimitiveContractsInterfaceTransactorSession struct { Contract *PrimitiveContractsInterfaceTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
PrimitiveContractsInterfaceTransactorSession is an auto generated write-only Go binding around an cpchain contract, with pre-set transact options.
type RptEvaluator ¶
type RptEvaluator struct { ContractClient bind.ContractBackend ChainClient *primitive_backend.ApiClient }
func NewRptEvaluator ¶
func NewRptEvaluator(contractClient bind.ContractBackend, chainClient *primitive_backend.ApiClient) (*RptEvaluator, error)
func (*RptEvaluator) Maintenance ¶
leader:0,committee:1,rNode:2,nil:3
func (*RptEvaluator) UploadCount ¶
UploadCount is the func to get uploadnumber to rpt
type RptPrimitiveBackend ¶
type RptPrimitiveBackend interface { // Rank returns the rank for given account address at the given block number. Rank(address common.Address, number uint64) (int64, error) // TxVolume returns the transaction volumn for given account address at the given block number. TxVolume(address common.Address, number uint64) (int64, error) // Maintenance returns the maintenance score for given account address at the given block number. Maintenance(address common.Address, number uint64) (int64, error) // UploadCount returns the upload score for given account address at the given block number. UploadCount(address common.Address, number uint64) (int64, error) // ProxyInfo returns a value indicating whether the given address is proxy and the count of transactions processed // by the proxy at the given block number. ProxyInfo(address common.Address, number uint64) (isProxy int64, proxyCount int64, err error) }