chain

package
v1.13.5 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package chain provides functions for dealing with Ontology smart contracts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BalanceOf

func BalanceOf(acct common.Address, contract common.Address) (*big.Int, error)

BalanceOf calls the contract's balanceOf method with the given account.

func Exec

func Exec(contract common.Address, method string, params []interface{}) (*states.PreExecResult, error)

Exec executes a method on the contract with the given parameters.

Types

type Transfer

type Transfer struct {
	Payer  common.Address
	From   common.Address
	To     common.Address
	Amount *big.Int
}

Transfer represents a transfer within an Ontology transaction. The field ordering must match the internal parameter order.

func ParsePayload

func ParsePayload(code []byte) ([]*Transfer, common.Address, error)

ParsePayload processes the given transaction payload for transfer operations.

Jump to

Keyboard shortcuts

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