system

package
v0.0.0-...-d2d1786 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AN = eos.AN
View Source
var ActN = eos.ActN
View Source
var PN = eos.PN

Functions

func NewBuyRAM

func NewBuyRAM(payer, receiver eos.AccountName, eosQuantity uint64) *eos.Action

func NewBuyRAMBytes

func NewBuyRAMBytes(payer, receiver eos.AccountName, bytes uint32) *eos.Action

NewBuyRAMBytes will buy at current market price a given number of bytes of RAM, and grant them to the `receiver` account.

func NewDelegateBW

func NewDelegateBW(from, receiver eos.AccountName, stakeCPU, stakeNet eos.Asset, transfer bool) *eos.Action

NewDelegateBW returns a `delegatebw` action that lives on the `eosio.system` contract.

func NewNewAccount

func NewNewAccount(creator, newAccount eos.AccountName, publicKey ecc.PublicKey) *eos.Action

NewNewAccount returns a `newaccount` action that lives on the `eosio.system` contract.

func NewNonce

func NewNonce(nonce string) *eos.Action

NewNonce returns a `nonce` action that lives on the `eosio.bios` contract. It should exist only when booting a new network, as it is replaced using the `eos-bios` boot process by the `eosio.system` contract.

func NewRegProducer

func NewRegProducer(producer eos.AccountName, producerKey ecc.PublicKey, url string) *eos.Action

NewRegProducer returns a `regproducer` action that lives on the `eosio.system` contract.

func NewSetCodeTx

func NewSetCodeTx(account eos.AccountName, wasmPath, abiPath string) (out *eos.Transaction, err error)

func NewSetPriv

func NewSetPriv(account eos.AccountName) *eos.Action

NewSetPriv returns a `setpriv` action that lives on the `eosio.bios` contract. It should exist only when booting a new network, as it is replaced using the `eos-bios` boot process by the `eosio.system` contract.

func NewSetProds

func NewSetProds(producers []ProducerKey) *eos.Action

NewSetPriv returns a `setpriv` action that lives on the `eosio.bios` contract. It should exist only when booting a new network, as it is replaced using the `eos-bios` boot process by the `eosio.system` contract.

func NewSetRAM

func NewSetRAM(maxRAMSize uint64) *eos.Action

func NewUpdateAuth

func NewUpdateAuth(account eos.AccountName, permission, parent eos.PermissionName, authority eos.Authority, usingPermission eos.PermissionName) *eos.Action

NewUpdateAuth creates an action from the `eosio.system` contract called `updateauth`.

usingPermission needs to be `owner` if you want to modify the `owner` authorization, otherwise `active` will do for the rest.

func NewVoteProducer

func NewVoteProducer(voter eos.AccountName, proxy eos.AccountName, producers ...eos.AccountName) *eos.Action

NewNonce returns a `nonce` action that lives on the `eosio.bios` contract. It should exist only when booting a new network, as it is replaced using the `eos-bios` boot process by the `eosio.system` contract.

Types

type BlockchainParameters

type BlockchainParameters struct {
	MaxBlockNetUsage               uint64 `json:"max_block_net_usage"`
	TargetBlockNetUsagePct         uint32 `json:"target_block_net_usage_pct"`
	MaxTransactionNetUsage         uint32 `json:"max_transaction_net_usage"`
	BasePerTransactionNetUsage     uint32 `json:"base_per_transaction_net_usage"`
	NetUsageLeeway                 uint32 `json:"net_usage_leeway"`
	ContextFreeDiscountNetUsageNum uint32 `json:"context_free_discount_net_usage_num"`
	ContextFreeDiscountNetUsageDen uint32 `json:"context_free_discount_net_usage_den"`
	MaxBlockCPUUsage               uint32 `json:"max_block_cpu_usage"`
	TargetBlockCPUUsagePct         uint32 `json:"target_block_cpu_usage_pct"`
	MaxTransactionCPUUsage         uint32 `json:"max_transaction_cpu_usage"`
	MinTransactionCPUUsage         uint32 `json:"min_transaction_cpu_usage"`
	MaxTransactionLifetime         uint32 `json:"max_transaction_lifetime"`
	DeferredTrxExpirationWindow    uint32 `json:"deferred_trx_expiration_window"`
	MaxTransactionDelay            uint32 `json:"max_transaction_delay"`
	MaxInlineActionSize            uint32 `json:"max_inline_action_size"`
	MaxInlineActionDepth           uint16 `json:"max_inline_action_depth"`
	MaxAuthorityDepth              uint16 `json:"max_authority_depth"`
	MaxGeneratedTransactionCount   uint32 `json:"max_generated_transaction_count"`
}

BlockchainParameters are all the params we can set through `setparams`.

type BuyRAM

type BuyRAM struct {
	Payer    eos.AccountName `json:"payer"`
	Receiver eos.AccountName `json:"receiver"`
	Quantity eos.Asset       `json:"quant"` // specified in EOS
}

BuyRAM represents the `eosio.system::buyram` action.

type BuyRAMBytes

type BuyRAMBytes struct {
	Payer    eos.AccountName `json:"payer"`
	Receiver eos.AccountName `json:"receiver"`
	Bytes    uint32          `json:"bytes"`
}

BuyRAMBytes represents the `eosio.system::buyrambytes` action.

type ClaimRewards

type ClaimRewards struct {
	Owner eos.AccountName `json:"owner"`
}

ClaimRewards repreents the `eosio.system::claimrewards` action

type DelegateBW

type DelegateBW struct {
	From     eos.AccountName `json:"from"`
	Receiver eos.AccountName `json:"receiver"`
	StakeNet eos.Asset       `json:"stake_net"`
	StakeCPU eos.Asset       `json:"stake_cpu"`
	Transfer bool            `json:"transfer"`
}

DelegateBW represents the `eosio.system::delegatebw` action.

type EOSIOGlobalState

type EOSIOGlobalState struct {
	BlockchainParameters
	TotalStorageBytesReserved uint64 `json:"total_storage_bytes_reserved"`
	TotalStorageStake         uint64 `json:"total_storage_stake"`
	PaymentPerBlock           uint64 `json:"payment_per_block"`
}

type NewAccount

type NewAccount struct {
	Creator eos.AccountName `json:"creator"`
	Name    eos.AccountName `json:"name"`
	Owner   eos.Authority   `json:"owner"`
	Active  eos.Authority   `json:"active"`
}

NewAccount represents a `newaccount` action on the `eosio.system` contract. It is one of the rare ones to be hard-coded into the blockchain.

type Nonce

type Nonce struct {
	Value string `json:"value"`
}

Nonce represents the `eosio.system::nonce` action. It is used to add variability in a transaction, so you can send the same many times in the same block, without it having the same Tx hash.

type ProducerKey

type ProducerKey struct {
	ProducerName    eos.AccountName `json:"producer_name"`
	BlockSigningKey ecc.PublicKey   `json:"block_signing_key"`
}

type Refund

type Refund struct {
	Owner eos.AccountName `json:"owner"`
}

Refund represents the `eosio.system::refund` action

type RegProducer

type RegProducer struct {
	Producer    eos.AccountName `json:"producer"`
	ProducerKey ecc.PublicKey   `json:"producer_key"`
	URL         string          `json:"url"`
	Location    uint16          `json:"location"` // what,s the meaning of that anyway ?
}

RegProducer represents the `eosio.system::regproducer` action

type RegProxy

type RegProxy struct {
	Proxy eos.AccountName `json:"proxy"`
}

RegProxy represents the `eosio.system::regproxy` action

type SetABI

type SetABI struct {
	Account eos.AccountName `json:"account"`
	ABI     eos.HexBytes    `json:"abi"`
}

SetABI represents the hard-coded `setabi` action.

type SetCode

type SetCode struct {
	Account   eos.AccountName `json:"account"`
	VMType    byte            `json:"vmtype"`
	VMVersion byte            `json:"vmversion"`
	Code      eos.HexBytes    `json:"code"`
}

SetCode represents the hard-coded `setcode` action.

type SetPriv

type SetPriv struct {
	Account eos.AccountName `json:"account"`
	IsPriv  bool            `json:"is_priv"`
}

SetPriv sets privileged account status. Used in the bios boot mechanism.

type SetProds

type SetProds struct {
	Schedule []ProducerKey `json:"schedule"`
}

SetProds is present in `eosio.bios` contract. Used only at boot time.

type SetRAM

type SetRAM struct {
	MaxRAMSize uint64 `json:"max_ram_size"`
}

SetRAM represents the hard-coded `setram` action.

type UndelegateBW

type UndelegateBW struct {
	From         eos.AccountName `json:"from"`
	Receiver     eos.AccountName `json:"receiver"`
	UnstakeNet   eos.Asset       `json:"unstake_net"`
	UnstakeCPU   eos.Asset       `json:"unstake_cpu"`
	UnstakeBytes uint64          `json:"unstake_bytes"`
}

UndelegateBW represents the `eosio.system::undelegatebw` action.

type UnregProducer

type UnregProducer struct {
	Producer eos.AccountName `json:"producer"`
}

UnregProducer represents the `eosio.system::unregprod` action

type UnregProxy

type UnregProxy struct {
	Proxy eos.AccountName `json:"proxy"`
}

UnregProxy represents the `eosio.system::unregproxy` action

type UpdateAuth

type UpdateAuth struct {
	Account    eos.AccountName    `json:"account"`
	Permission eos.PermissionName `json:"permission"`
	Parent     eos.PermissionName `json:"parent"`
	Auth       eos.Authority      `json:"auth"`
}

UpdateAuth represents the hard-coded `updateauth` action.

If you change the `active` permission, `owner` is the required parent.

If you change the `owner` permission, there should be no parent.

type VoteProducer

type VoteProducer struct {
	Voter     eos.AccountName   `json:"voter"`
	Proxy     eos.AccountName   `json:"proxy"`
	Producers []eos.AccountName `json:"producers"`
}

VoteProducer represents the `eosio.system::voteproducer` action

Jump to

Keyboard shortcuts

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