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

forge/v0 package

Overview

Package forge is an on-chain software forge: repos, an append-only reference log, issues, change requests and reviews, browsable through gnoweb and writable only through signed transactions.

It is the realm half of gno.land/p/moul/forge/v0, which holds the whole domain model; this file is wiring. Every exported mutation is a crossing function that resolves the caller, forwards to the library, aborts on error (the only way to revert state in gno) and emits an event for indexers.

What the chain stores is NOT the code. Git objects stay in git (a mirror, an IPFS CID, a peer) and the realm records what a forge is actually trusted for: which object a ref points at, in what order, on whose authority, under what review policy, and what got merged. See the package README for the design, the threat model and what this deliberately does not do.

A caller may be a user or another realm: a repo whose owner is a DAO realm is a repo whose merge button is a governance vote.

Function

DeleteRef

func DeleteRef(cur realm, repoID, name, expectedOID, note string)

DeleteRef removes a ref by compare-and-swap (maintainer). The default branch is not deletable.

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/moul/forge/v0" -func "DeleteRef" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/forge/v0" -func "DeleteRef" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx