Skip to content Search Apps Documentation Source Content Run Reset Eval Playground 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.

portbook source realm

Package portbook is the on-chain Solidity -> Gno Migration Registry & Request Board powered by Smelt ([https://smeltc...

Overview

Package portbook is the on-chain Solidity -> Gno Migration Registry & Request Board powered by Smelt (https://smeltcli.xyz).

Functions 9

func FulfillRequest

crossing Action
1func FulfillRequest(cur realm, requestID uint64, portID uint64)
source

FulfillRequest links an open community request to a registered PortEntry. Callable by the port author, the requester, or the realm admin.

func RegisterPort

crossing Action
 1func RegisterPort(
 2	cur realm,
 3	name string,
 4	category string,
 5	sourceURL string,
 6	solHash string,
 7	realmPath string,
 8	mode string,
 9	cleanFuncs int,
10	totalFuncs int,
11	warns int,
12	holes int,
13	summary string,
14) uint64
source

RegisterPort publishes a Solidity -> Gno migration record on-chain.

func Render

1func Render(path string) string
source

Render exposes the interactive Markdown UI in gnoweb with clickable Adena txlinks.

func RequestPort

crossing Action
1func RequestPort(
2	cur realm,
3	contractName string,
4	category string,
5	sourceURL string,
6	notes string,
7) uint64
source

RequestPort submits a Solidity contract that the community wants ported to Gno.land. Automatically casts the requester's initial vote.

func Stats

Action
1func Stats() (ports uint64, requests uint64, openRequests uint64, votes uint64, uniqueContributors int)
source

Stats returns aggregate registry counters for indexers, tests, and cross-realm reads.

func UpvotePort

crossing Action
1func UpvotePort(cur realm, portID uint64)
source

UpvotePort casts a single upvote per address on a registered port.

func VoteRequest

crossing Action
1func VoteRequest(cur realm, requestID uint64)
source

VoteRequest casts a single vote per address on an open port request.

func GetPort

Action
1func GetPort(id uint64) *PortEntry
source

GetPort returns a registered port by ID, or nil if it does not exist.

func GetRequest

Action
1func GetRequest(id uint64) *PortRequest
source

GetRequest returns a community port request by ID, or nil if it does not exist.

Types 2

type PortEntry

struct
 1type PortEntry struct {
 2	ID         uint64
 3	Name       string
 4	Category   string
 5	SourceURL  string
 6	SolHash    string
 7	RealmPath  string
 8	Mode       string // "strict", "idiomatic", or "ai-assisted"
 9	CleanFuncs int
10	TotalFuncs int
11	Warns      int
12	Holes      int
13	Summary    string
14	Author     address
15	CreatedAt  int64
16	Upvotes    uint64
17}
source

PortEntry records a Solidity contract transpiled and deployed to Gno.land.

Methods on PortEntry

func DeterministicPct

method on PortEntry
1func (p *PortEntry) DeterministicPct() int
source

DeterministicPct returns the integer percentage (0..100) of clean deterministic functions.

type PortRequest

struct
 1type PortRequest struct {
 2	ID              uint64
 3	ContractName    string
 4	Category        string
 5	SourceURL       string
 6	Notes           string
 7	Requester       address
 8	CreatedAt       int64
 9	Votes           uint64
10	FulfilledPortID uint64
11}
source

PortRequest records a community request to port a Solidity contract to Gno.land.

Dependencies

Source Files 4