Skip to content

Commit

Permalink
refactor: stablecoin test with errors
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel_LZPF <[email protected]>
  • Loading branch information
MiguelLZPF committed Feb 5, 2025
1 parent 0b0d206 commit 12b5744
Show file tree
Hide file tree
Showing 8 changed files with 677 additions and 661 deletions.
8 changes: 4 additions & 4 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
"test:customFees": "npx hardhat test test/customFees.test.ts",
"test:deletable": "npx hardhat test test/deletable.test.ts",
"test:freezable": "npx hardhat test test/freezable.test.ts",
"test:hederaReserve": "npx hardhat test test/hederaReserve.test.ts",
"test:hederaTokenManager": "npx hardhat test test/hederaTokenManager.test.ts",
"test:kyc": "npx hardhat test test/kyc.test.ts",
"test:pausable": "npx hardhat test test/pausable.test.ts",
"test:rescuable": "npx hardhat test test/rescuable.test.ts",
"test:reserve": "npx hardhat test test/reserve.test.ts",
"test:roleManagement": "npx hardhat test test/roleManagement.test.ts",
"test:roles": "npx hardhat test test/roles.test.ts",
"test:upgradable": "npx hardhat test test/upgradable.test.ts",
"test:stableCoinFactory": "npx hardhat test test/stableCoinFactory.test.ts",
"test:supplieradmin": "npx hardhat test test/supplieradmin.test.ts",
"test:upgradable": "npx hardhat test test/upgradable.test.ts",
"test:wipeable": "npx hardhat test test/wipeable.test.ts",
"test:stableCoinFactory": "npx hardhat test test/stableCoinFactory.ts",
"test:reserve": "npx hardhat test test/reserve.test.ts",
"test:hederaReserve": "npx hardhat test test/hederaReserve.test.ts",
"clean": "npx hardhat clean",
"clean:all": "rimraf artifacts cache coverage node_modules build typechain-types && npm run clean",
"size": "npx hardhat size-contracts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ export default class DeployFullInfrastructureCommand {
throw new SignerWithoutProviderError()
}
const signerAddress = await signer.getAddress()
const network = NetworkNameByChainId[
(await signer.provider.getNetwork()).chainId as NetworkChainId
] as NetworkName
const network = NetworkNameByChainId[(await signer.provider.getNetwork()).chainId as NetworkChainId]
const wallet = await getFullWalletFromSigner(signer)

const keys = allToContract
Expand Down
2 changes: 2 additions & 0 deletions contracts/scripts/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ export const GAS_LIMIT = {
addHederaTokenManagerVersion: 4_800_000n,
editHederaTokenManagerAddress: 4_800_000n,
removeHederaTokenManagerAddress: 4_800_000n, // Added gas limit for removeHederaTokenManagerAddress
changeAdmin: 4_800_000n,
// Read
getHederaTokenManagerAddress: 4_800_000n,
getAdmin: 4_800_000n,
},
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/rescuable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('➡️ Rescue Tests', function () {

before(async function () {
// Disable | Mock console.log()
// console.log = () => {} // eslint-disable-line
console.log = () => {} // eslint-disable-line
// * Deploy StableCoin Token
console.info(' 🏗️ Deploying full infrastructure...')
;[operator, nonOperator] = await ethers.getSigners()
Expand Down
3 changes: 2 additions & 1 deletion contracts/test/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ export async function deployFullInfrastructureInTests({
} as Record<NetworkName, DeployedContract>
configuration.contracts = newContracts

const { stableCoinDeployment } = deployedResult
const { stableCoinDeployment, stableCoinFactoryDeployment } = deployedResult
return {
proxyAddress: stableCoinDeployment.proxyAddress,
proxyAdminAddress: stableCoinDeployment.proxyAdminAddress,
tokenAddress: stableCoinDeployment.tokenAddress,
factoryProxyAddress: stableCoinFactoryDeployment.proxyAddress,
}
}

Expand Down
Loading

0 comments on commit 12b5744

Please sign in to comment.