data

package
v1.6.16 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: GPL-3.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DelegationData

type DelegationData struct {
	Address string   `json:"address"`
	Value   *big.Int `json:"value"`
	// contains filtered or unexported fields
}

DelegationData specify the delegation address and the balance provided

func (*DelegationData) AddressBytes

func (dd *DelegationData) AddressBytes() []byte

AddressBytes will return the delegation address as raw bytes

func (*DelegationData) Clone

func (dd *DelegationData) Clone() *DelegationData

Clone will return a new instance of the delegation data holding the same information

func (*DelegationData) GetAddress

func (dd *DelegationData) GetAddress() string

GetAddress returns the address as string

func (*DelegationData) GetValue

func (dd *DelegationData) GetValue() *big.Int

GetValue returns the delegated value

func (*DelegationData) IsInterfaceNil

func (dd *DelegationData) IsInterfaceNil() bool

IsInterfaceNil returns if underlying object is true

func (*DelegationData) MarshalJSON

func (dd *DelegationData) MarshalJSON() ([]byte, error)

MarshalJSON is the function called when trying to serialize the object using the JSON marshaler

func (*DelegationData) SetAddressBytes

func (dd *DelegationData) SetAddressBytes(address []byte)

SetAddressBytes will set the delegation address as raw bytes

func (*DelegationData) UnmarshalJSON

func (dd *DelegationData) UnmarshalJSON(data []byte) error

UnmarshalJSON is the function called when trying to de-serialize the object using the JSON marshaler

type InitialAccount

type InitialAccount struct {
	Address      string          `json:"address"`
	Supply       *big.Int        `json:"supply"`
	Balance      *big.Int        `json:"balance"`
	StakingValue *big.Int        `json:"stakingvalue"`
	Delegation   *DelegationData `json:"delegation"`
	// contains filtered or unexported fields
}

InitialAccount provides information about one entry in the genesis file

func (*InitialAccount) AddressBytes

func (ia *InitialAccount) AddressBytes() []byte

AddressBytes will return the address as raw bytes

func (*InitialAccount) Clone

Clone will return a new instance of the initial account holding the same information

func (*InitialAccount) GetAddress

func (ia *InitialAccount) GetAddress() string

GetAddress returns the address of the initial account

func (*InitialAccount) GetBalanceValue

func (ia *InitialAccount) GetBalanceValue() *big.Int

GetBalanceValue returns the initial balance value

func (*InitialAccount) GetDelegationHandler

func (ia *InitialAccount) GetDelegationHandler() genesis.DelegationDataHandler

GetDelegationHandler returns the delegation handler

func (*InitialAccount) GetStakingValue

func (ia *InitialAccount) GetStakingValue() *big.Int

GetStakingValue returns the staking value

func (*InitialAccount) GetSupply

func (ia *InitialAccount) GetSupply() *big.Int

GetSupply returns the account's supply value

func (*InitialAccount) IsInterfaceNil

func (ia *InitialAccount) IsInterfaceNil() bool

IsInterfaceNil returns if underlying object is true

func (*InitialAccount) MarshalJSON

func (ia *InitialAccount) MarshalJSON() ([]byte, error)

MarshalJSON is the function called when trying to serialize the object using the JSON marshaler

func (*InitialAccount) SetAddressBytes

func (ia *InitialAccount) SetAddressBytes(address []byte)

SetAddressBytes will set the address as raw bytes

func (*InitialAccount) UnmarshalJSON

func (ia *InitialAccount) UnmarshalJSON(data []byte) error

UnmarshalJSON is the function called when trying to de-serialize the object using the JSON marshaler

type InitialSmartContract

type InitialSmartContract struct {
	Owner          string `json:"owner"`
	Filename       string `json:"filename"`
	VmType         string `json:"vm-type"`
	InitParameters string `json:"init-parameters"`
	Type           string `json:"type"`
	Version        string `json:"version"`
	// contains filtered or unexported fields
}

InitialSmartContract provides the information regarding initial deployed SC

func (*InitialSmartContract) AddAddress

func (isc *InitialSmartContract) AddAddress(address string)

AddAddress adds a deployed address to the initial smart contract addresses as string

func (*InitialSmartContract) AddAddressBytes

func (isc *InitialSmartContract) AddAddressBytes(addressBytes []byte)

AddAddressBytes adds a deployed address to the initial smart contract

func (*InitialSmartContract) Addresses

func (isc *InitialSmartContract) Addresses() []string

Addresses returns the smart contract addresses string

func (*InitialSmartContract) AddressesBytes

func (isc *InitialSmartContract) AddressesBytes() [][]byte

AddressesBytes returns the smart contract addresses bytes

func (*InitialSmartContract) GetFilename

func (isc *InitialSmartContract) GetFilename() string

GetFilename returns the filename

func (*InitialSmartContract) GetInitParameters

func (isc *InitialSmartContract) GetInitParameters() string

GetInitParameters returns the init parameters for the smart contract

func (*InitialSmartContract) GetOwner

func (isc *InitialSmartContract) GetOwner() string

GetOwner returns the smart contract owner address

func (*InitialSmartContract) GetType

func (isc *InitialSmartContract) GetType() string

GetType returns the smart contract's type

func (*InitialSmartContract) GetVersion

func (isc *InitialSmartContract) GetVersion() string

GetVersion returns the recorded version (if existing) of the SC

func (*InitialSmartContract) GetVmType

func (isc *InitialSmartContract) GetVmType() string

GetVmType returns the vm type string

func (*InitialSmartContract) IsInterfaceNil

func (isc *InitialSmartContract) IsInterfaceNil() bool

IsInterfaceNil returns if underlying object is true

func (*InitialSmartContract) OwnerBytes

func (isc *InitialSmartContract) OwnerBytes() []byte

OwnerBytes will return the owner's address as raw bytes

func (*InitialSmartContract) SetOwnerBytes

func (isc *InitialSmartContract) SetOwnerBytes(owner []byte)

SetOwnerBytes will set the owner address as raw bytes

func (*InitialSmartContract) SetVmTypeBytes

func (isc *InitialSmartContract) SetVmTypeBytes(vmType []byte)

SetVmTypeBytes sets the vm type as raw bytes

func (*InitialSmartContract) VmTypeBytes

func (isc *InitialSmartContract) VmTypeBytes() []byte

VmTypeBytes returns the vm type as raw bytes

Jump to

Keyboard shortcuts

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