Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_1_filetest.gno

4.57 Kb Β· 111 lines
  1// PKGPATH: gno.land/r/gnops/valopers_test
  2// SEND: 20000000ugnot
  3
  4package valopers_test
  5
  6import (
  7	"testing"
  8
  9	"gno.land/p/nt/testutils"
 10	"gno.land/r/gnops/valopers"
 11)
 12
 13var g1user = testutils.TestAddress("g1user") // g1vuch2um9wf047h6lta047h6lta047h6l2ewm6w
 14
 15const (
 16	validMoniker     = "test-1"
 17	validDescription = "test-1's description"
 18	validServerType  = valopers.ServerTypeOnPrem
 19	validAddress     = address("g1sp8v98h2gadm5jggtzz9w5ksexqn68ympsd68h")
 20	validPubKey      = "gpub1pggj7ard9eg82cjtv4u52epjx56nzwgjyg9zqwpdwpd0f9fvqla089ndw5g9hcsufad77fml2vlu73fk8q8sh8v72cza5p"
 21)
 22
 23func init() {
 24	testing.SetOriginCaller(g1user)
 25
 26	// Register a validator and add the proposal
 27	valopers.Register(cross, validMoniker, validDescription, validServerType, validAddress, validPubKey)
 28}
 29
 30func main() {
 31	println(valopers.Render(""))
 32}
 33
 34// Output:
 35//
 36// # Welcome to the **Valopers** realm
 37//
 38// ## πŸ“Œ Purpose of this Contract
 39//
 40// The **Valopers** contract is designed to maintain a registry of **validator profiles**. This registry provides essential information to **GovDAO members**, enabling them to make informed decisions when voting on the inclusion of new validators into the **valset**.
 41//
 42// By registering your validator profile, you contribute to a transparent and well-informed governance process within **gno.land**.
 43//
 44// ---
 45//
 46// ## πŸ“ How to Register Your Validator Node
 47//
 48// To add your validator node to the registry, use the [**Register**](/r/gnops/valopers$help&func=Register) function with the following parameters:
 49//
 50// - **Moniker** (Validator Name)
 51//   - Must be **human-readable**
 52//   - **Max length**: **32 characters**
 53//   - **Allowed characters**: Letters, numbers, spaces, hyphens (**-**), and underscores (**_**)
 54//   - **No special characters** at the beginning or end
 55//
 56// - **Description** (Introduction & Validator Details)
 57//   - **Max length**: **2048 characters**
 58//   - Must include answers to the questions listed below
 59//
 60// - **Server Type** (Infrastructure Type)
 61//   - Must be one of the following values:
 62//     - **cloud**: For validators running on cloud infrastructure (AWS, GCP, Azure, etc.)
 63//     - **on-prem**: For validators running on on-premises infrastructure
 64//     - **data-center**: For validators running in dedicated data centers
 65//
 66// - **Validator Address**
 67//   - Your validator node's address
 68//
 69// - **Validator Public Key**
 70//   - Your validator node's public key
 71//
 72// ### ✍️ Required Information for the Description
 73//
 74// Please provide detailed answers to the following questions to ensure transparency and improve your chances of being accepted:
 75//
 76// 1. The name of your validator
 77// 2. Networks you are currently validating and your total AuM (assets under management)
 78// 3. Links to your **digital presence** (website, social media, etc.). Please include your Discord handle to be added to our main comms channel, the gno.land valoper Discord channel.
 79// 4. Contact details
 80// 5. Why are you interested in validating on **gno.land**?
 81// 6. What contributions have you made or are willing to make to **gno.land**?
 82//
 83// ---
 84//
 85// ## πŸ”„ Updating Your Validator Information
 86//
 87// After registration, you can update your validator details using the **update functions** provided by the contract.
 88//
 89// ---
 90//
 91// ## πŸ“’ Submitting a Proposal to Join the Validator Set
 92//
 93// Once you're satisfied with your **valoper** profile, you need to notify GovDAO; only a GovDAO member can submit a proposal to add you to the validator set.
 94//
 95// If you are a GovDAO member, you can nominate yourself by executing the following function: [**r/gnops/valopers/proposal.ProposeNewValidator**](/r/gnops/valopers/proposal$help&func=ProposeNewValidator)
 96//
 97// This will initiate a governance process where **GovDAO** members will vote on your proposal.
 98//
 99// ---
100//
101// πŸš€ **Register now and become a part of gno.land’s validator ecosystem!**
102//
103// Read more: [How to become a testnet validator](https://gnops.io/articles/guides/become-testnet-validator/) <!-- XXX: replace with a r/gnops/blog:xxx link -->
104//
105// Disclaimer: Please note, registering your validator profile and/or validating on testnets does not guarantee a validator slot on the gno.land beta mainnet. However, active participation and contributions to testnets will help establish credibility and may improve your chances for future validator acceptance. The initial validator amount and valset will ultimately be selected through GovDAO governance proposals and acceptance.
106//
107// ---
108//
109//
110//
111//  * [test-1](/r/gnops/valopers:g1sp8v98h2gadm5jggtzz9w5ksexqn68ympsd68h) - [profile](/r/demo/profile:u/g1vuch2um9wf047h6lta047h6lta047h6l2ewm6w)