From a272c5fe290a769fa3479e373ec45a57098c94a3 Mon Sep 17 00:00:00 2001 From: Michael Kim Date: Tue, 13 Aug 2024 15:18:52 +0900 Subject: [PATCH] Update deployment script --- .../deploy/side_chain_devnet/deploy.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/contracts/deploy/side_chain_devnet/deploy.ts b/packages/contracts/deploy/side_chain_devnet/deploy.ts index e88fc6e4..374feb69 100644 --- a/packages/contracts/deploy/side_chain_devnet/deploy.ts +++ b/packages/contracts/deploy/side_chain_devnet/deploy.ts @@ -64,8 +64,6 @@ interface IAccount { type FnDeployer = (accounts: IAccount, deployment: Deployments) => Promise; -const BASE_CURRENCY = "PHP"; - class Deployments { public deployments: Map; public deployers: FnDeployer[]; @@ -444,6 +442,7 @@ async function deployCurrencyRate(accounts: IAccount, deployment: Deployments) { await contract.deployTransaction.wait(); deployment.addContract(contractName, contract.address, contract); console.log(`Deployed ${contractName} to ${contract.address}`); + const BASE_CURRENCY = await contract.defaultSymbol(); { const multiple = await contract.multiple(); @@ -984,31 +983,31 @@ async function storeSampleExchangeRate(accounts: IAccount, deployment: Deploymen const rates = [ { symbol: "KIOS", - rate: BigNumber.from(1761925042), + rate: BigNumber.from(37803720000), }, { symbol: "KRW", - rate: BigNumber.from(42553191), + rate: BigNumber.from(1000000000), }, { symbol: "USD", - rate: BigNumber.from(58730834752), + rate: BigNumber.from(1369700000000), }, { symbol: "PHP", - rate: BigNumber.from(1000000000), + rate: BigNumber.from(24020000000), }, { symbol: "krw", - rate: BigNumber.from(42553191), + rate: BigNumber.from(1000000000), }, { symbol: "usd", - rate: BigNumber.from(58730834752), + rate: BigNumber.from(1369700000000), }, { symbol: "php", - rate: BigNumber.from(1000000000), + rate: BigNumber.from(24020000000), }, ]; const chainId = (await hre.ethers.provider.getNetwork()).chainId;