Docs
Start

Quick start on the testnet

From an empty folder to a verified contract on the testnet. You need Foundry and a wallet address.

1. Add the testnet to your wallet#

Use the Add Testnet to wallet button on Network parameters, or enter the values by hand: network name OysBio Chain Testnet, RPC https://testnet-rpc.oys.bio, chain ID 69798, symbol tOYS, explorer https://explorer-testnet.oys.bio.

2. Get test coins#

Open faucet.oys.bio, paste your address and send. You get tOYS for gas and a set of test tokens (tUSD, tUSDC and others), once per address and once per connection every 24 hours. One faucet drop pays for hundreds of contract deployments; testnet coins have no value.

3. Start from the template#

The template is a Foundry project: an ERC-20 token (burnable, EIP-2612 permit, owner can mint) on OpenZeppelin 5.4, tests and a deployment script, already set to evm_version = "paris" and Solidity 0.8.28.

curl -fsSLO https://docs.oys.bio/downloads/oysbio-foundry-template.zip
unzip oysbio-foundry-template.zip -d my-token && cd my-token
forge install foundry-rs/[email protected] OpenZeppelin/[email protected] --no-git --shallow
forge build && forge test

4. Deploy#

Keep the key in .env (listed in .gitignore) or in an environment variable, never in a file you commit. The token name, symbol and supply come from .env too.

cp .env.example .env               # set PRIVATE_KEY: a testnet-only key funded from the faucet
source .env                        # PowerShell: $env:PRIVATE_KEY="0x..."
forge script script/Deploy.s.sol --rpc-url oysbio_testnet --broadcast

The script prints the contract address. Open it on explorer-testnet.oys.bio.

5. Verify the source#

The explorer answers the Sourcify API, so Foundry verifies without an account or a key:

forge verify-contract <address> src/MyToken.sol:MyToken \
  --chain-id 69798 --verifier sourcify --verifier-url https://explorer-testnet.oys.bio/api/sourcify/ --watch

Or with the SDK command: npx -p @oysbio/sdk oysbio verify <address> src/MyToken.sol:MyToken --network testnet. Once verified, the explorer shows the source and the Read contract and Write contract tabs work with any wallet.

6. Wait for finality in your app#

A transaction is final when its block is safe. With viem and the SDK (npm install @oysbio/sdk viem):

import { createPublicClient, http } from 'viem';
import { oysbioTestnet, waitForSafe } from '@oysbio/sdk';

const client = createPublicClient({ chain: oysbioTestnet, transport: http() });
const receipt = await waitForSafe(client, { hash });   // 'included', then 'safe'

Next#