Script Network Documentation
  • Getting Started Guides
    • How to Sign Up + Sign In to Script TV
    • Using the Live TV player
    • Navigating the Script TV Dashboard (Test Phase)
    • Testnet, Explorer + Creating a Wallet (Test Phase)
    • Reward System: Script Points, Zealy, Galxe + more
  • ScriptGLASS - How to mint
  • 🎬About Script Network
    • Introduction
    • Products
    • Why Script TV?
    • How it works
    • Understanding the Script Blockchain
    • Script TV + Web3
    • Market Strategy
    • Benefits
    • Comparison
  • 🗺️Roadmap
  • 🪙Script Tokens
    • SCPT
      • Detailed SCPT Tokenomics
    • SPAY
      • 💰SPAY Tokenomics
        • 🕶️ScriptGLASS explained
          • Economics
        • Allowable/Earnable Watch Time
      • Mechanism Design of Glasses
        • Glass Types
        • Glass Payouts
          • Durability
        • Gems
        • Levels
        • Recharge Vouchers
        • Recharge Voucher Mechanism
        • Recharge Costs
        • Glass Minting
        • Game Theory
  • 🦸For Users
    • ⛓️Blockchain Integration
      • Installation guide for Script Node setup for Win , Mac and Linux
      • Build and Install
      • Run Unit Tests
      • Launch Script Node
      • Command Line Tool
      • Steps To Upgrade The Chain
      • Account/Wallet Management
      • Call Smart Contract
      • Turing-Complete Smart Contract Support
    • Basic Concept
    • Tokens
    • Script NFTs
    • Transactions
    • Script Wallet
    • Faucet (Technical)
    • Smart Contracts
  • 🌐Script Network Explorer
    • Block APIs
    • Transaction APIs
    • Account APIs
    • Stake APIs
  • 🔯Nodes
    • Node Token Emissions
    • Lightning Node Overview
      • Validator / Lightning Node Setup
        • Steps To Change Node Password
        • Stake to the Lightning node
    • Lightning Staking Process
      • Lightning Stake Withdrawal Process
        • Staking through Web Wallet
  • 💠Validators
    • Block Settlement
    • Steps To Migrate Lightning/Validator
  • 📒Edge Documentation
    • Introduction
    • What is Edge
    • How it works
    • Edge Uses
    • Possibilities with Edge
    • Edge Features
    • Benefits
    • Use Cases
  • 🔗Smart Contract Development
    • 💻 How to quickly deploy a smart contract on Script Blockchain
  • Smart Contract & App Development
    • Turing-Complete Smart Contract
    • Ethereum RPC API support
    • Setup the ETH RPC Adaptor for the Script Testnet
    • Metamask
    • Truffle
    • Hardhat
    • Remix
    • Web3.js
    • Explorer Tools for DApp Development
    • Script Blockchain SRC20 Token Integration Guide
  • 📔API References
    • Metamask Script Network RPC Details (Testnet)
    • RPC API Reference
      • Examples
      • GetBlock
        • Transaction Types
        • Request
        • GetBlockByHeight
      • GetTransaction
        • GetPendingTransactions
    • Tx APIs
      • Broadcast Raw Transaction
      • BroadcastRawTransactionAsync
    • ScriptCli APIs
      • Account APIs
        • NewKey API
        • ListKeys
        • UnlockKey
        • LockKey
        • IsKeyUnlocked
      • Tx APIs
        • Send
        • Configuration for the Script Blockchain Node
  • 🤝Referrals/Network Effects
  • 🛡️ Audits
  • 📊Script Network Blockchain Summary
  • Disclaimer
  • Frequently Asked Question
    • To resolve the block height issue
    • Update seed peer to resolve connectivity issue
Powered by GitBook
On this page

Was this helpful?

  1. For Users

Faucet (Technical)

Obtain tokens from the Faucet

If we run a testnet node we would use a faucet or token fountain, usually found in testnet nodes.

Every script node has a faucet service that would kindly transfer you funds on request. No questions. The objective of testnet is to give users the opportunity to test the system with ‘play money’

However if we run a mainnet node we would use an exchange and buy tokens instead.

Before asking the faucet let’s use an address we control.

If you wanted to fund this-node address, your node, such address can be obtained in the following way:

        stv:~$ scriptcli query status
                {
                    "address": "0x8d1F3236d790415d631d554091dE7A25913FB561",                       <=== address
                    "chain_id": "testnet",
                    "current_epoch": "1019",
                    "current_hash": "0x44d71c52e6ddc4a905dc1901e7cc1a5b9bceed11ab4ea4cd023bb3b82b8d9147",
                    "current_height": "1017",
                    "current_time": "1721812158",
                    "genesis_block_hash": "0x42a81f3f7ef0a5297997c8428ae945d5176f07082224b006f1979a5ebbe2744c",
                    "latest_finalized_block_epoch": "1017",
                    "latest_finalized_block_hash": "0x270bdf99bea4a90554ef13138721d33a4302f9c55925e0a14f8ca2ef8bda3359",
                    "latest_finalized_block_height": "1017",
                    "latest_finalized_block_time": "1721812142",
                    "peer_id": "0x8d1F3236d790415d631d554091dE7A25913FB561",
                    "snapshot_block_hash": "0x42a81f3f7ef0a5297997c8428ae945d5176f07082224b006f1979a5ebbe2744c",
                    "snapshot_block_height": "0",
                    "syncing": false,
                    "tip_hash": "0xc7134d79a766cef0bcd32f267c0662fa6cafb7e4a22c73620ad5baeff1238ff3"
                }

Our address can be found on the response, 0x8d1F3236d790415d631d554091dE7A25913FB561.

Let’s then invoke stvtool to obtain funds for this aforementioned address, we do it with the command query_faucet, passing the recipient address as argument:

        stv:~$ bin/stvtool query_faucet 0x8d1F3236d790415d631d554091dE7A25913FB561

The command can be repeated as many times as wished up to a balance limit of 1M. We can easy earn tokens this way.

By feeding with tokens your node address your faucet is automatically enabled using it as source of funds and making the faucet service available to other participants in the script network.

After a few seconds from ordering the transfer we can check our balance:

        stv:~$ scriptcli query account --address=0x8d1F3236d790415d631d554091dE7A25913FB561
                {
                    "code": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
                    "coins": {
                        "scptwei": "12000000000000000000000",
                        "spaywei": "1200000000000000000000"
                    },
                    "last_updated_block_height": "1180",
                    "reserved_funds": [],
                    "root": "0x0000000000000000000000000000000000000000000000000000000000000000",
                    "sequence": "0"
                }

Which effectively shows the expected amounts given to us by the remote faucet.

Removing 18 trailing zeroes we obtain our balance of tokens (provided you called the faucet 12 times)

    SCPT token: 12000;  SPAY token:1200

Other nodes offer the same service on URsL:

    * Human: https://wallet-testnet.<your-domain>
            * API: https://backend-wallet-testnet.<your-domain>
PreviousScript WalletNextSmart Contracts

Last updated 7 months ago

Was this helpful?

The command will use by default the Script Network reference Node at

🦸
https://backend-wallet-testnet.script.tv