To run the contract, pull the repository from GitHub and install its dependencies. You will need yarn or npm installed.
git clone https://github.com/Think-and-Dev/introduccionSC
cd introduccionSCyarnyarn compileThe Application Binary Interfaces (ABI) for contract is available in the abis/ directory
For instance, to pull in the MyContract ABI:
const ballotABI = require('./abis/Ballot.json')We use solhint
To lint the code, run:
yarn hintStart a local node and deploy the top-level contracts:
yarn start
yarn deploy localhostThe artifacts are available in the deployments/ directory. For example, to pull in the Ballot artifact:
const ballotContract = require('./deployments/fuji/Ballot.json')
const {abi, address, receipt} = ballotContractStart up a Hardhat Console:
yarn console --network localhostCopy over .envrc.example to .envrc
cp .envrc.example .envrc
Make sure to update the enviroment variables with suitable values.
Now enable the env vars using direnv
direnv allow
Now deploy to a network like so:
yarn deploy:node goerli
yarn deploy:node mainnet
yarn deploy:node fuji
yarn deploy:node avalanche
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.