Fix deployment modules for local env

This commit is contained in:
Arnaud 2025-04-15 15:28:48 +02:00
parent f5b9ded909
commit fc2c710377
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F
2 changed files with 8 additions and 6 deletions

View File

@ -28,12 +28,12 @@ module.exports = buildModule("Marketplace", (m) => {
[configuration, token, verifier],
{
from: deployer,
}
},
)
let testMarketplace
if (hre.network.config.tags.includes("local")) {
if (hre.network.config && hre.network.config.tags.includes("local")) {
const { testVerifier } = m.useModule(VerifierModule)
testMarketplace = m.contract(
@ -41,7 +41,7 @@ module.exports = buildModule("Marketplace", (m) => {
[configuration, token, testVerifier],
{
from: deployer,
}
},
)
}

View File

@ -10,11 +10,13 @@ module.exports = buildModule("Token", (m) => {
from: deployer,
})
if (hre.network.config.tags.includes("local")) {
if (hre.network.config && hre.network.config.tags.includes("local")) {
for (let i = 0; i < MAX_ACCOUNTS; i++) {
const account = m.getAccount(i)
const futureId = "SendingEth" + i
m.send(futureId, account, MINTED_TOKENS)
m.call(token, "mint", [account, MINTED_TOKENS], {
from: deployer,
id: `SendingEth_${i}`,
})
}
}