Search Apps Documentation Source Content File Folder Download Copy Actions Download

block package

Functions

BalanceOf

func BalanceOf(user address, tokenID grc1155.TokenID) int64
Execute

Params

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.BalanceOf(,)"

Result

BalanceOfBatch

func BalanceOfBatch(ul []address, tokenIDs []grc1155.TokenID) []int64
Execute

Params

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.BalanceOfBatch(,)"

Result

BatchTransferFrom

func BatchTransferFrom(cur realm, from, to address, tokenIDs []grc1155.TokenID, amounts []int64)
Execute

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "BatchTransferFrom" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "BatchTransferFrom" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

Burn

func Burn(cur realm, from address, tokeID grc1155.TokenID, amount int64)
Execute

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "Burn" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "Burn" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

BurnBatch

func BurnBatch(cur realm, from address, tokeIDs []grc1155.TokenID, amounts []int64)
Execute

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "BurnBatch" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "BurnBatch" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

CreateBlock

func CreateBlock( cur realm, name, blockType, layer, drawType, textureLayer, textureURL, previewURL string, maxSupply, mintPrice, usePrice, installerBPS, shape, state uint32, emission uint8, option string, ) uint32
Execute

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "CreateBlock" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "CreateBlock" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

CreateSystemBlock

func CreateSystemBlock( cur realm, blockID uint32, name, blockType, layer, drawType, textureLayer, textureURL, previewURL string, maxSupply int64, mintPrice, usePrice, installerBPS, shape, state uint32, emission uint8, option string, )
Execute

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "CreateSystemBlock" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "CreateSystemBlock" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

DeleteBlock

func DeleteBlock(cur realm, blockID uint32)
Execute

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "DeleteBlock" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "DeleteBlock" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

DeleteSystemBlock

func DeleteSystemBlock(cur realm, blockID uint32)
Execute

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "DeleteSystemBlock" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "DeleteSystemBlock" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

GetCreatorBPS

func GetCreatorBPS() int
Execute

GetCreatorBPS returns the current creator revenue share in basis points

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.GetCreatorBPS()"

Result

GetCurrentBlockID

func GetCurrentBlockID() uint32
Execute

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.GetCurrentBlockID()"

Result

GetInventory

func GetInventory(user address) []map[string]string
Execute

GetInventory returns all block tokens owned by user with their balances

Param

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.GetInventory()"

Result

GetListLimit

func GetListLimit() int
Execute

GetListLimit returns the max items per list query

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.GetListLimit()"

Result

GetTotalBlockSize

func GetTotalBlockSize() int
Execute

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.GetTotalBlockSize()"

Result

HasInstalled

func HasInstalled(position string) bool
Execute

HasInstalled checks if a block is installed at position

Param

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.HasInstalled()"

Result

Install

func Install(cur realm, position string, blockID uint32, content string, option string)
Execute

Install installs a block at position with handler integration

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "Install" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "Install" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

IsApprovedForAll

func IsApprovedForAll(owner, operator address) bool
Execute

Params

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.IsApprovedForAll(,)"

Result

ListBlocks

func ListBlocks(page, count int) []map[string]string
Execute

Params

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.ListBlocks(,)"

Result

ListBlocksByIDs

func ListBlocksByIDs(blockIDs ...uint32) []map[string]string
Execute

Param

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.ListBlocksByIDs()"

Result

ListBlocksByType

func ListBlocksByType(blockType string) []map[string]string
Execute

Param

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.ListBlocksByType()"

Result

ListBlocksFromTo

func ListBlocksFromTo(from, to, limit uint32) []map[string]string
Execute

Params

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.ListBlocksFromTo(,,)"

Result

ListInstalled

func ListInstalled(positions ...string) []map[string]string
Execute

ListInstalled returns installed blocks for given positions position format: "{type}|{worldId}|{owner}|{xIndex}|{zIndex}|{blockIndex}"

Param

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.ListInstalled()"

Result

ListSupplies

func ListSupplies(tokeIDs ...grc1155.TokenID) []map[string]string
Execute

Param

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.ListSupplies()"

Result

ListUseLogs

func ListUseLogs(user address, limit int) []map[string]string
Execute

ListUseLogs returns user's block use logs (newest first, limited)

Params

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.ListUseLogs(,)"

Result

Mint

func Mint(cur realm, to address, blockID uint32, amount int64)
Execute

Mint mints block tokens with payment (anyone can mint)

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "Mint" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "Mint" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

Read

func Read(position string) string
Execute

Read reads block data at position (query-only)

Param

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.Read()"

Result

Render

func Render(iUrl string) string
Execute

Param

Command

gnokey query vm/qeval -remote "gnoland:26657" -data "gno.land/r/akkadia/block.Render()"

Result

SetApprovalForAll

func SetApprovalForAll(cur realm, operator address, approved bool)
Execute

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "SetApprovalForAll" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "SetApprovalForAll" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

SetBlockProperty

func SetBlockProperty(cur realm, blockID uint32, key string, value string)
Execute

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "SetBlockProperty" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "SetBlockProperty" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

SetCreatorBPS

func SetCreatorBPS(cur realm, bps int)
Execute

SetCreatorBPS sets the creator revenue share in basis points (admin only) BPS must be between 0 and 10000 (0% to 100%)

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "SetCreatorBPS" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "SetCreatorBPS" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

SetListLimit

func SetListLimit(cur realm, limit int)
Execute

SetListLimit sets the max items per list query (admin only)

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "SetListLimit" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "SetListLimit" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

TransferFrom

func TransferFrom(cur realm, from, to address, tokenID grc1155.TokenID, amount int64)
Execute

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "TransferFrom" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "TransferFrom" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

Uninstall

func Uninstall(cur realm, position string)
Execute

Uninstall uninstalls a block at position

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "Uninstall" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "Uninstall" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx
  

Use

func Use(cur realm, position string)
Execute

Use uses a block at position and updates its option

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "Use" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "dev" -remote "gnoland:26657" ADDRESSgnokey query -remote "gnoland:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/akkadia/block" -func "Use" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "gnoland:26657" call.tx