pom421 / VotingDapp

https://voting-dapp-sage.vercel.app
MIT License
2 stars 0 forks source link

Déploiement sur Vercel #7

Closed pom421 closed 1 year ago

pom421 commented 1 year ago
image
pom421 commented 1 year ago

Problème actuel

image

Le problème vient du fait que le répertoire où se trouve les contrats générés, est ignoré par git (présent dans le .gitignore). Donc ils ne sont pas trouvés quand on lance la commande npm run client:build.

On peut :

Idée

// address = artifact.networks[networkID].address => devient
address = process.env.ADDRESS_VOTING_CONTRACT || artifact.networks[networkID].address
contract = new web3.eth.Contract(abi, address)