Seascape Network
EN
EN
  • Welcome to Seascape
  • Guides
    • How to use the Scape Store Swapping Feature
    • How to Play Profit Circus
    • Guide to NFT Brawl
    • Guide to Staking Saloon
    • Guide to Scape Forum
    • Guide to Zombie Farm
    • Bridge Your MSCP between MOVR and BSC
    • Guide to join the pCWS Pools and NFT Trading
  • SMARTCONTRACTS
    • Addresses
      • Lighthouse
      • Changelog
    • Installation
    • Seascape NFT (SCAPES)
    • Crowns (CWS) token
  • Game for Developers
    • API Urls
    • Seascape Nft
    • Game 2: NFT BRAWL
      • Leaderboard
    • Game 5: Zombie Farm
      • Glossary
      • Reward categories
      • Option categories
      • API call order
  • Scape Store (Marketplace)
    • Config
    • Nft Swap
    • RPC backend
    • Smartcontract Changelog
  • API changelog
  • Seadex
    • Intro
    • Local deployment
    • Addresses
    • Managing Token
      • Add supported token to Factory
  • Lighthouse (IDO)
    • API
    • Smartcontrontracts
      • Tiers
    • Installation
  • Seascape SDK
    • Intro
    • Installation
    • Features
      • Shared Smartcontract Parameters
        • Configuration Format
        • Seascape CDN Config
        • CdnWrite
          • Truffle Framework
          • Hardhat Framework
          • Non-framework update
        • CDN Read
      • Server Proof
        • Smartcontract Data
        • Proof of Server
Powered by GitBook
On this page

Was this helpful?

  1. Seadex
  2. Managing Token

Add supported token to Factory

Support a new token on Seadex.

PreviousManaging TokenNextAPI

Last updated 3 years ago

Was this helpful?

Install Local version

Follow the instructions on .

Once you've have the local version, enter into the seadex-contracts container:

$ docker exec -it seadex-contracts bash

Inside the container install module dependencies:

$ npm intall

Then edit the support-token.js to add your supported token:

/home/node/app/scripts/support-token.js
const { ethers } = require('hardhat');

// Pool creator on Seadex. Factory contract deployed on moonriver
const address = "0xD184B1317125b166f01e8a0d6088ce1de61D00BA";
// ERC20 token on moonriver
const SYMBOL = "0xE3C7487Eb01C74b73B7184D198c7fBF46b34E5AF";  

// Deploy function
async function supportToken() {
   [account] = await ethers.getSigners();
   deployerAddress = account.address;
   console.log(`Deploying contracts using ${deployerAddress}`);

   const Factory = await ethers.getContractFactory('UniswapV2Factory');
   const factory = await Factory.attach(address);


   /// Add supported tokens
   await factory.addSupportedToken(WMOVR);
   console.log(`SYMBOL token supported`);
}

supportToken()
   .then(() => process.exit(0))
   .catch((error) => {
      console.error(error);
      process.exit(1);
   });

Once you finished the edition by adding your own factory address: line 4, and your deployed token address on line 6, you can call the hardhat to run script against moonriver blockchain:

npx hardhat run scripts/support-token.js --network moonriver

Only Seadex deployer can add the supported tokens.

This will add your token to the list. Now, you can follow , to show up token on the interface.

Local deployment
Managing Token