Documentation
¶
Overview ¶
Package core defines the core interfaces required for smart contracts to interact with the VM system Contract developers only need to understand and use the interfaces in this file to write smart contracts
Index ¶
- Variables
- func Assert(condition any)
- func Balance(addr Address) uint64
- func BlockHeight() uint64
- func BlockTime() int64
- func Call(contract Address, function string, args ...any) ([]byte, error)
- func DeleteObject(id ObjectID)
- func Error(msg string) error
- func Log(eventName string, keyValues ...interface{})
- func Receive(amount uint64) error
- func SetContext(c types.Context)
- func TransferTo(to Address, amount uint64) error
- type Address
- type Hash
- type Object
- type ObjectID
Constants ¶
This section is empty.
Variables ¶
View Source
var ZeroAddress = Address{}
View Source
var ZeroHash = Hash{}
View Source
var ZeroObjectID = ObjectID{}
Functions ¶
func BlockHeight ¶ added in v0.1.2
func BlockHeight() uint64
func DeleteObject ¶ added in v0.1.2
func DeleteObject(id ObjectID)
func SetContext ¶ added in v0.1.2
func TransferTo ¶ added in v0.1.4
Types ¶
type Address ¶
func AddressFromString ¶
func ContractAddress ¶ added in v0.1.2
func ContractAddress() Address
type Hash ¶
func HashFromString ¶
type Object ¶
func CreateObject ¶ added in v0.1.2
func CreateObject() Object
Object storage related - Basic state operations use panic instead of returning error
func GetObjectWithOwner ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.