Skip to content

Repository files navigation

Deployment and Execution Guide

This guide details the steps for deploying smart contracts, executing test suites.

Prerequisites

Ensure your development setup includes the following tools:

Project configuration

You can find the configuration example in .env.example

Deploying the Smart Contract

  1. Build the contract: Compile your contract in the project root:

    anchor build

    Run anchor keys list to get the new program id

    Replace the program id on lib.rs, .env, Anchor.toml with the new one

  2. Deploy the contract: Deploy to the network with Anchor:

    anchor deploy
  3. Upload program's IDL: anchor idl init -f target/idl/remitano_test.json

Running Tests

The cluster property in Anchor.toml should be localnet

Execute the Anchor-generated test suite:

anchor test

Script

Remember to update the .env

The script will read wallet path from .env, so don't replace wallet.json if you want to run script.

  • Create token: yarn run createToken
  • Init: yarn run init {tokenAddress}
  • Provide liquidity: yarn run provideLiquidity {configPDA} {tokenAmount} {lamportAmount}
  • Swap: yarn run swap {configPDA} {amount} {isSolToToken}. With isSolToToken = 1 or 0

Deployments

Devnet

  • Program ID => 9ZXve67dGXtRVTiK9CyiFHX6wQXJALxY6bKhm4Tn6mx9
  • Token => A48JQmCwFdyVzUc5azETuMaLg9ZRCHnUARjWkbmkFXAd
  • Config => 6WLpiybuKshXkJ38e8xf68n5SWg2URkrQpSH2EyBHFmp

Transactions

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages