Skip to content

Commit

Permalink
fix: set ZRC-20 gas token correctly (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev authored Sep 23, 2024
1 parent 8e62457 commit f107da5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/localnet/src/createToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ export const createToken = async ({

await zrc20.waitForDeployment();

if (!isGasToken) {
if (isGasToken) {
(systemContract as any)
.connect(fungibleModuleSigner)
.setGasCoinZRC20(1, zrc20.target);
(systemContract as any).connect(fungibleModuleSigner).setGasPrice(1, 1);
} else {
const erc20Factory = new ethers.ContractFactory(
TestERC20.abi,
TestERC20.bytecode,
Expand Down Expand Up @@ -82,11 +87,6 @@ export const createToken = async ({
deployOpts
);
await (custody as any).connect(tss).whitelist(erc20.target, deployOpts);

(systemContract as any)
.connect(fungibleModuleSigner)
.setGasCoinZRC20(1, zrc20.target);
(systemContract as any).connect(fungibleModuleSigner).setGasPrice(1, 1);
}

foreignCoins.push({
Expand Down

0 comments on commit f107da5

Please sign in to comment.