Add supported token to Factory
Support a new token on Seadex.

Install Local version

Follow the instructions on Local deployment.
Once you've have the local version, enter into the seadex-contracts container:
1
$ docker exec -it seadex-contracts bash
Copied!
Inside the container install module dependencies:
1
$ npm intall
Copied!
Then edit the support-token.js to add your supported token:
/home/node/app/scripts/support-token.js
1
const { ethers } = require('hardhat');
2
3
// Pool creator on Seadex. Factory contract deployed on moonriver
4
const address = "0xD184B1317125b166f01e8a0d6088ce1de61D00BA";
5
// ERC20 token on moonriver
6
const SYMBOL = "0xE3C7487Eb01C74b73B7184D198c7fBF46b34E5AF";
7
8
// Deploy function
9
async function supportToken() {
10
[account] = await ethers.getSigners();
11
deployerAddress = account.address;
12
console.log(`Deploying contracts using ${deployerAddress}`);
13
14
const Factory = await ethers.getContractFactory('UniswapV2Factory');
15
const factory = await Factory.attach(address);
16
17
18
/// Add supported tokens
19
await factory.addSupportedToken(WMOVR);
20
console.log(`SYMBOL token supported`);
21
}
22
23
supportToken()
24
.then(() => process.exit(0))
25
.catch((error) => {
26
console.error(error);
27
process.exit(1);
28
});
29
Copied!
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:
1
npx hardhat run scripts/support-token.js --network moonriver
Copied!
This will add your token to the list. Now, you can follow Managing Token, to show up token on the interface.
Only Seadex deployer can add the supported tokens.
Copy link