Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

gnofish source realm

Package gnofish is the GnoFish sale NFT. A listed wallet mints for free. Anyone else pays exactly 100 GNOT. An addres...

Overview

Package gnofish is the GnoFish sale NFT. A listed wallet mints for free. Anyone else pays exactly 100 GNOT. An address may mint as many times as the 10000 cap allows. The portrait is rolled in the same call. Every NFT is owned by the admin. The whole 100 GNOT is sent to that admin. This realm does not add FISH liquidity. The height and the next id are public before the transaction, so the roll can be predicted. This is not drand. Adena reads OwnerOf, BalanceOf, TokenURI (the https image) and TokenMetadata (JSON, traitType). NewToken and Transfer come from the GRC721 ledger. This package does not swim, settle, or draw FISH. fishlive stays untouched. Nomaq lists with List, UpdatePrice, Cancel, and Buy. ItemLine and ListOpen feed the page. gnofish-1.

Functions 44

func Approve

crossing Action
1func Approve(cur realm, to address, id int)
source

Approve lets to move this fish once. The caller must own it.

func Buy

crossing Action
1func Buy(cur realm, id int)
source

Buy pays the ask, in full, to the seller and gives the fish to the buyer.

func Cancel

crossing Action
1func Cancel(cur realm, id int)
source

Cancel returns a listed fish to its seller. The call sends no coins.

func Grant

crossing Action
1func Grant(cur realm, who address)
source

Grant lets that wallet mint without paying. Admin only. There is no per-address cap.

func Init

crossing Action
1func Init(cur realm)
source

Init opens the sale. The caller becomes the admin and the owner of every mint. No coins.

func List

crossing Action
1func List(cur realm, id int, priceUgnot int64)
source

List escrows the fish to this realm and puts it on sale. The caller sends no coins.

func Mint

crossing Action
1func Mint(cur realm) int
source

Mint rolls one fish and gives it to the admin. A listed wallet sends nothing. Everyone else sends 100 GNOT, and that full amount goes to the admin.

func Revoke

crossing Action
1func Revoke(cur realm, who address)
source

Revoke removes the free mint.

func Roll

Action
1func Roll(caller address, height int64, id int) (rarity string, trait string, bite int, hp int, speed int, tier int)
source

Roll is sha256 of caller|height|id. mythic 1/10000, legendary 3, epic 10, rare 40, uncommon 200, the rest common.

func SetApprovalForAll

crossing Action
1func SetApprovalForAll(cur realm, operator address, approved bool)
source

SetApprovalForAll lets operator move every fish of the caller, or revokes it.

func TokenMetadata

Action
1func TokenMetadata(tid grc721.TokenID) (string, error)
source

TokenMetadata is the JSON Adena reads. Attribute keys are traitType.

func TokenURI

Action
1func TokenURI(tid grc721.TokenID) (string, error)
source

TokenURI is the https image Adena puts in an img tag.

func Transfer

crossing Action
1func Transfer(cur realm, to address, id int)
source

Transfer moves a fish the caller owns. The call sends no coins.

func TransferAdmin

crossing Action
1func TransferAdmin(cur realm, next address)
source

TransferAdmin moves the wallet that receives NFTs and GNOT.

func TransferFrom

crossing Action
1func TransferFrom(cur realm, from, to address, id int)
source

TransferFrom moves a fish. The caller must own it or be approved for it.

func UpdatePrice

crossing Action
1func UpdatePrice(cur realm, id int, priceUgnot int64)
source

UpdatePrice changes the ask of a fish the caller is selling.

Dependencies

Source Files 2