Skip to content

Commit 2ff1a29

Browse files
authored
fix: update interchain token developer guides to use sepolia (#1276)
1 parent 278ed4e commit 2ff1a29

File tree

3 files changed

+46
-46
lines changed

3 files changed

+46
-46
lines changed

src/content/docs/dev/send-tokens/interchain-tokens/developer-guides/link-custom-tokens-deployed-across-multiple-chains-into-interchain-tokens.mdx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ async function deployTokenManager() {
232232
const interchainTokenServiceContract = await getContractInstance(
233233
interchainTokenServiceContractAddress,
234234
interchainTokenServiceContractABI,
235-
signer
235+
signer,
236236
);
237237

238238
// Generate a random salt
@@ -241,7 +241,7 @@ async function deployTokenManager() {
241241
// Create params
242242
const params = ethers.utils.defaultAbiCoder.encode(
243243
["bytes", "address"],
244-
[signer.address, fantomCustomTokenAddress]
244+
[signer.address, fantomCustomTokenAddress],
245245
);
246246

247247
// Deploy the token manager
@@ -250,13 +250,13 @@ async function deployTokenManager() {
250250
"",
251251
MINT_BURN,
252252
params,
253-
ethers.utils.parseEther("0.01")
253+
ethers.utils.parseEther("0.01"),
254254
);
255255

256256
// Get the tokenId
257257
const tokenId = await interchainTokenServiceContract.interchainTokenId(
258258
signer.address,
259-
salt
259+
salt,
260260
);
261261

262262
// Get the token manager address
@@ -269,7 +269,7 @@ async function deployTokenManager() {
269269
Transaction Hash: ${deployTxData.hash},
270270
Token ID: ${tokenId},
271271
Expected token manager address: ${expectedTokenManagerAddress},
272-
`
272+
`,
273273
);
274274
}
275275
```
@@ -345,7 +345,7 @@ async function gasEstimator() {
345345
EvmChain.POLYGON,
346346
GasToken.FTM,
347347
700000,
348-
1.1
348+
1.1,
349349
);
350350

351351
return gas;
@@ -370,13 +370,13 @@ async function deployRemoteTokenManager() {
370370
const interchainTokenServiceContract = await getContractInstance(
371371
interchainTokenServiceContractAddress,
372372
interchainTokenServiceContractABI,
373-
signer
373+
signer,
374374
);
375375

376376
// Create params
377377
const param = ethers.utils.defaultAbiCoder.encode(
378378
["bytes", "address"],
379-
[signer.address, polygonCustomTokenAddress]
379+
[signer.address, polygonCustomTokenAddress],
380380
);
381381

382382
const gasAmount = await gasEstimator();
@@ -388,13 +388,13 @@ async function deployRemoteTokenManager() {
388388
MINT_BURN,
389389
param,
390390
ethers.utils.parseEther("0.01"),
391-
{ value: gasAmount }
391+
{ value: gasAmount },
392392
);
393393

394394
// Get the tokenId
395395
const tokenId = await interchainTokenServiceContract.interchainTokenId(
396396
signer.address,
397-
"0x7f5fe989334ad23b77e8da841f672394d021ae83ff0a24afb461ba19d72e3553" // change salt
397+
"0x7f5fe989334ad23b77e8da841f672394d021ae83ff0a24afb461ba19d72e3553", // change salt
398398
);
399399

400400
// Get the token manager address
@@ -406,7 +406,7 @@ async function deployRemoteTokenManager() {
406406
Transaction Hash: ${deployTxData.hash},
407407
Token ID: ${tokenId},
408408
Expected token manager address: ${expectedTokenManagerAddress},
409-
`
409+
`,
410410
);
411411
}
412412
```
@@ -481,15 +481,15 @@ async function transferMintAccessToTokenManagerOnFantom() {
481481
const tokenContract = await getContractInstance(
482482
fantomCustomTokenAddress,
483483
customTokenABI,
484-
signer
484+
signer,
485485
);
486486

487487
// Get the minter role
488488
const getMinterRole = await tokenContract.MINTER_ROLE();
489489

490490
const grantRoleTxn = await tokenContract.grantRole(
491491
getMinterRole,
492-
"0xad8Cf8FF7BBe82269844bBcbA60bAa8f02781f13"
492+
"0xad8Cf8FF7BBe82269844bBcbA60bAa8f02781f13",
493493
);
494494

495495
console.log("grantRoleTxn: ", grantRoleTxn.hash);
@@ -551,15 +551,15 @@ async function transferMintAccessToTokenManagerOnPolygon() {
551551
const tokenContract = await getContractInstance(
552552
polygonCustomTokenAddress,
553553
customTokenABI,
554-
signer
554+
signer,
555555
);
556556

557557
// Get the minter role
558558
const getMinterRole = await tokenContract.MINTER_ROLE();
559559

560560
const grantRoleTxn = await tokenContract.grantRole(
561561
getMinterRole,
562-
"0xad8Cf8FF7BBe82269844bBcbA60bAa8f02781f13"
562+
"0xad8Cf8FF7BBe82269844bBcbA60bAa8f02781f13",
563563
);
564564

565565
console.log("grantRoleTxn: ", grantRoleTxn.hash);
@@ -627,7 +627,7 @@ async function transferTokens() {
627627
const interchainTokenServiceContract = await getContractInstance(
628628
interchainTokenServiceContractAddress,
629629
interchainTokenServiceContractABI,
630-
signer
630+
signer,
631631
);
632632
const gasAmount = await gasEstimator();
633633
const transfer = await interchainTokenServiceContract.interchainTransfer(
@@ -640,7 +640,7 @@ async function transferTokens() {
640640
{
641641
// Transaction options should be passed here as an object
642642
value: gasAmount,
643-
}
643+
},
644644
);
645645

646646
console.log("Transfer Transaction Hash:", transfer.hash);

src/content/docs/dev/send-tokens/interchain-tokens/developer-guides/programmatically-create-a-canonical-token.mdx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In this tutorial, you will learn how to:
2020
You will need:
2121

2222
- A basic understanding of [Solidity](https://www.tutorialspoint.com/solidity/index.htm) and [JavaScript](https://www.w3schools.com/js/)
23-
- A [wallet](https://metamask.io/) with FTM and MATIC funds for testing. If you don’t have these funds, you can get FTM from the [Fantom faucet](https://faucet.fantom.network/) and MATIC from the Mumbai faucets ([1](https://faucet.polygon.technology/), [2](https://faucet.quicknode.com/polygon/mumbai)).
23+
- A [wallet](https://metamask.io/) with FTM and MATIC funds for testing. If you don’t have these funds, you can get FTM from the [Fantom faucet](https://faucet.fantom.network/) and MATIC from the Amoy faucets ([1](https://faucet.polygon.technology/), [2](https://faucet.quicknode.com/polygon/amoy)).
2424

2525
## Deploy an ERC-20 token on the Fantom testnet
2626

@@ -181,24 +181,24 @@ async function registerCanonicalInterchainToken() {
181181
const interchainTokenFactoryContract = await getContractInstance(
182182
interchainTokenFactoryContractAddress,
183183
interchainTokenFactoryContractABI,
184-
signer
184+
signer,
185185
);
186186
const interchainTokenServiceContract = await getContractInstance(
187187
interchainTokenServiceContractAddress,
188188
interchainTokenServiceContractABI,
189-
signer
189+
signer,
190190
);
191191

192192
// Register a new Canonical Interchain Token
193193
const deployTxData =
194194
await interchainTokenFactoryContract.registerCanonicalInterchainToken(
195-
customTokenAddress // Your token address
195+
customTokenAddress, // Your token address
196196
);
197197

198198
// Retrieve the token ID of the newly registered token
199199
const tokenId =
200200
await interchainTokenFactoryContract.canonicalInterchainTokenId(
201-
customTokenAddress
201+
customTokenAddress,
202202
);
203203

204204
const expectedTokenManagerAddress =
@@ -209,7 +209,7 @@ async function registerCanonicalInterchainToken() {
209209
Transaction Hash: ${deployTxData.hash},
210210
Token ID: ${tokenId},
211211
Expected Token Manager Address: ${expectedTokenManagerAddress},
212-
`
212+
`,
213213
);
214214
}
215215
```
@@ -284,7 +284,7 @@ async function gasEstimator() {
284284
EvmChain.POLYGON,
285285
GasToken.FTM,
286286
700000,
287-
1.1
287+
1.1,
288288
);
289289

290290
return gas;
@@ -295,7 +295,7 @@ async function gasEstimator() {
295295

296296
### Perform remote token deployment
297297

298-
Create a `deployRemoteCanonicalInterchainToken()` function that will perform token remote canonical deployment on the Polygon Mumbai testnet.
298+
Create a `deployRemoteCanonicalInterchainToken()` function that will perform token remote canonical deployment on the Polygon Amoy testnet.
299299

300300
```javascript
301301
//...
@@ -309,7 +309,7 @@ async function deployRemoteCanonicalInterchainToken() {
309309
const interchainTokenFactoryContract = await getContractInstance(
310310
interchainTokenFactoryContractAddress,
311311
interchainTokenFactoryContractABI,
312-
signer
312+
signer,
313313
);
314314

315315
// Estimate gas fees
@@ -322,7 +322,7 @@ async function deployRemoteCanonicalInterchainToken() {
322322
customTokenAddress, // Your token address
323323
"Polygon",
324324
gasAmount,
325-
{ value: gasAmount }
325+
{ value: gasAmount },
326326
);
327327

328328
console.log(`Transaction Hash: ${txn.hash}`);
@@ -369,7 +369,7 @@ Transaction Hash: 0xb963f5ce3402e1787ead0c8f421be79ac06e5b78305b1dbce184806e099d
369369

370370
### Check the transaction on the Axelar testnet scanner
371371

372-
Check the [Axelarscan testnet scanner](https://testnet.axelarscan.io/) to see if you have successfully deployed the remote Canonical Interchain Token “MAT” on the Polygon Mumbai testnet. It should look something like [this](https://testnet.axelarscan.io/gmp/0xb963f5ce3402e1787ead0c8f421be79ac06e5b78305b1dbce184806e099d54fd). Make sure that Axelar shows a successful transaction before continuing on to the next step.
372+
Check the [Axelarscan testnet scanner](https://testnet.axelarscan.io/) to see if you have successfully deployed the remote Canonical Interchain Token “MAT” on the Polygon Amoy testnet. It should look something like [this](https://testnet.axelarscan.io/gmp/0xb963f5ce3402e1787ead0c8f421be79ac06e5b78305b1dbce184806e099d54fd). Make sure that Axelar shows a successful transaction before continuing on to the next step.
373373

374374
## Transfer your token between chains
375375

@@ -389,18 +389,18 @@ async function transferTokens() {
389389
const interchainTokenServiceContract = await getContractInstance(
390390
interchainTokenServiceContractAddress,
391391
interchainTokenServiceContractABI,
392-
signer
392+
signer,
393393
);
394394

395395
const customTokenContract = await getContractInstance(
396396
customTokenAddress,
397397
customTokenContractABI,
398-
signer
398+
signer,
399399
); // Approve ITS to spend tokens
400400

401401
await customTokenContract.approve(
402402
interchainTokenServiceContractAddress,
403-
ethers.utils.parseEther("50")
403+
ethers.utils.parseEther("50"),
404404
);
405405

406406
const gasAmount = await gasEstimator();
@@ -413,7 +413,7 @@ async function transferTokens() {
413413
ethers.utils.parseEther("50"), // Amount to transfer
414414
"0x00",
415415
gasAmount, // gasValue
416-
{ value: gasAmount }
416+
{ value: gasAmount },
417417
);
418418

419419
console.log("Transfer Transaction Hash:", transfer.hash);

src/content/docs/dev/send-tokens/interchain-tokens/developer-guides/programmatically-create-a-token.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In this tutorial, you will learn how to:
2020
You will need:
2121

2222
- A basic understanding of [Solidity](https://www.tutorialspoint.com/solidity/index.htm) and [JavaScript](https://www.w3schools.com/js/)
23-
- A [MetaMask wallet](https://metamask.io/) with FTM and MATIC funds for testing. If you don’t have these funds, you can get FTM from the [Fantom faucet](https://faucet.fantom.network/) and MATIC from the Mumbai faucets ([1](https://faucet.polygon.technology/), [2](https://faucet.quicknode.com/polygon/mumbai)).
23+
- A [MetaMask wallet](https://metamask.io/) with FTM and MATIC funds for testing. If you don’t have these funds, you can get FTM from the [Fantom faucet](https://faucet.fantom.network/) and MATIC from the Amoy faucets ([1](https://faucet.polygon.technology/), [2](https://faucet.quicknode.com/polygon/amoy)).
2424

2525
## **Set up your development environment**
2626

@@ -183,18 +183,18 @@ async function registerAndDeploy() {
183183
const interchainTokenFactoryContract = await getContractInstance(
184184
interchainTokenFactoryContractAddress,
185185
interchainTokenFactoryContractABI,
186-
signer
186+
signer,
187187
);
188188
const interchainTokenServiceContract = await getContractInstance(
189189
interchainTokenServiceContractAddress,
190190
interchainTokenServiceContractABI,
191-
signer
191+
signer,
192192
);
193193

194194
// Generate a unique token ID using the signer's address and salt
195195
const tokenId = await interchainTokenFactoryContract.interchainTokenId(
196196
signer.address,
197-
salt
197+
salt,
198198
);
199199

200200
// Retrieve new token address
@@ -213,7 +213,7 @@ async function registerAndDeploy() {
213213
symbol,
214214
decimals,
215215
initialSupply,
216-
signer.address
216+
signer.address,
217217
);
218218

219219
console.log(
@@ -223,7 +223,7 @@ async function registerAndDeploy() {
223223
Transaction Hash: ${deployTxData.hash},
224224
salt: ${salt},
225225
Expected Token Manager Address: ${expectedTokenManagerAddress},
226-
`
226+
`,
227227
);
228228
}
229229
```
@@ -302,7 +302,7 @@ async function gasEstimator() {
302302
EvmChain.POLYGON,
303303
GasToken.FTM,
304304
700000,
305-
1.1
305+
1.1,
306306
);
307307

308308
return gas;
@@ -313,7 +313,7 @@ async function gasEstimator() {
313313

314314
### Perform remote token deployment
315315

316-
Create a `deployToRemoteChain()` function that will perform token remote deployment on the Polygon Mumbai testnet. Make sure to replace the `salt` value with the salt returned to your terminal from when you ran `registerAndDeploy()`:
316+
Create a `deployToRemoteChain()` function that will perform token remote deployment on the Polygon Amoy testnet. Make sure to replace the `salt` value with the salt returned to your terminal from when you ran `registerAndDeploy()`:
317317

318318
```javascript
319319
//...
@@ -326,7 +326,7 @@ async function deployToRemoteChain() {
326326
const interchainTokenFactoryContract = await getContractInstance(
327327
interchainTokenFactoryContractAddress,
328328
interchainTokenFactoryContractABI,
329-
signer
329+
signer,
330330
);
331331

332332
// Estimate gas fees
@@ -343,7 +343,7 @@ async function deployToRemoteChain() {
343343
signer.address,
344344
"Polygon",
345345
gasAmount,
346-
{ value: gasAmount }
346+
{ value: gasAmount },
347347
);
348348

349349
console.log(`Transaction Hash: ${txn.hash}`);
@@ -390,7 +390,7 @@ Transaction Hash: 0xca901048c74c3757fcea5d309cd53ef6e21816c841e85145ac8586fa71a9
390390

391391
### Check the transaction on the Axelar testnet scanner
392392

393-
Check the [Axelarscan testnet scanner](https://testnet.axelarscan.io/) to see if you have successfully created and remotely deployed NIT on the Polygon Mumbai testnet. It should look something like [this](https://testnet.axelarscan.io/gmp/0xca901048c74c3757fcea5d309cd53ef6e21816c841e85145ac8586fa71a9cc48). Make sure that Axelar shows a successful transaction before continuing on to the next step.
393+
Check the [Axelarscan testnet scanner](https://testnet.axelarscan.io/) to see if you have successfully created and remotely deployed NIT on the Polygon Amoy testnet. It should look something like [this](https://testnet.axelarscan.io/gmp/0xca901048c74c3757fcea5d309cd53ef6e21816c841e85145ac8586fa71a9cc48). Make sure that Axelar shows a successful transaction before continuing on to the next step.
394394

395395
## Transfer your token between chains
396396

@@ -410,7 +410,7 @@ async function transferTokens() {
410410
const interchainToken = await getContractInstance(
411411
"0xc028ebdF906a890be73C594b6a14858D0552544A", // Update with new token address
412412
interchainTokenContractABI, // Interchain Token contract ABI
413-
signer
413+
signer,
414414
);
415415

416416
// Calculate gas amount
@@ -422,7 +422,7 @@ async function transferTokens() {
422422
"0x510e5EA32386B7C48C4DEEAC80e86859b5e2416C", // Update with your own wallet address
423423
ethers.utils.parseEther("25"), // Transfer 25 tokens
424424
"0x", // Empty data payload
425-
{ value: gasAmount } // Transaction options
425+
{ value: gasAmount }, // Transaction options
426426
);
427427
console.log("Transfer Transaction Hash:", transfer.hash);
428428
}
@@ -470,7 +470,7 @@ If you see this, it means that your interchain transfer has been successful!
470470

471471
### Check the transaction on the Axelar testnet scanner
472472

473-
Check the [Axelarscan testnet scanner](https://testnet.axelarscan.io/) to see if you have successfully transferred NIT from the Fantom testnet to the Polygon testnet. It should look something like [this](https://mumbai.polygonscan.com/token/0xc028ebdf906a890be73c594b6a14858d0552544a).
473+
Check the [Axelarscan testnet scanner](https://testnet.axelarscan.io/) to see if you have successfully transferred NIT from the Fantom testnet to the Polygon testnet. It should look something like [this](https://testnet.axelarscan.io/gmp/0x205554f5e39e29b21f3110ebf813579a3826465746c37a151ed18c992004c6b5).
474474

475475
### Import the new token into your wallet
476476

0 commit comments

Comments
 (0)