Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.solidscipt.zoracle.xyz/llms.txt

Use this file to discover all available pages before exploring further.

This walkthrough starts in an empty directory and ends with a contract deployed through your browser wallet. You will create a project, write an ERC-20 contract in TypeScript, run the build and security pipeline, configure explorer verification, and deploy to Base Sepolia.
1

Create a project

Create a directory, initialize a Node project, install SolidScript, prepare native tools, and scaffold the project layout.
mkdir my-token && cd my-token
npm init -y
npm install solidscript
npx solidscript doctor --fix
npx solidscript init
2

Write the contract

Create the contract file at contracts/MyToken.ts. The class extends ERC20 from the SolidScript standards library. The @onlyOwner decorator restricts the mint function to the contract owner.
contracts/MyToken.ts
import { Address, onlyOwner, msg } from "solidscript";
import { ERC20 } from "solidscript/standards";

export class MyToken extends ERC20 {
  constructor(initialSupply: bigint) {
    super("MyToken", "MTK");
    this._mint(msg.sender, initialSupply);
  }

  @onlyOwner
  mint(to: Address, amount: bigint): void {
    this._mint(to, amount);
  }
}
3

Build and verify

build emits Solidity from your TypeScript source. verify runs the security pipeline — pass --skip fuzz,invariants to skip the slower checks during your first walkthrough. compile produces bytecode from the emitted Solidity.
npx solidscript build contracts
npx solidscript verify contracts --skip fuzz,invariants
npx solidscript compile out/sol
4

Configure explorer verification

Store your Etherscan API key so the deploy step can verify source automatically after the contract lands on-chain.
npx solidscript config set etherscan-key YOUR_KEY
5

Deploy with your browser wallet

Pass the contract name, target network, and constructor argument. SolidScript starts a local browser page at http://127.0.0.1:7654/ where your wallet extension signs the deployment transaction.
npx solidscript deploy MyToken -n base-sepolia -a 1000000
The CLI receives the transaction hash, waits for the receipt, prints the deployed address, and verifies source when an Etherscan key is configured.
✓ deployed MyToken
  network:  base-sepolia
  tx:       0x...
  address:  0x...
✓ Pass - Verified
  https://sepolia.basescan.org/address/0x...#code