1.0.0-beta.1 • Published 5 years ago
vasp-contracts v1.0.0-beta.1
OpenVASP Contracts
This repository contains smart contracts for the reference implementation of the OpenVASP standard
Running tests
Execute npm run test
command.
Deployment
- Create
.env
file. SpecifyROPSTEN_PRIVATE_KEY
andROPSTEN_NODE_URL
with correct values in it (see.env.template
). - Execute
npx oz create VASP --network ropsten
- Agree to initialize the instance after creating it
- Choose
initialize(owner: address, initialAdministrators: address[])
option - Provide an owner's address
- Provide administrators' addresses
- Specify administrator's private key in the
.env
file - Execute
npx oz send-tx <VASP instance address> --method setPostalAddress --args "address line", "post code", "town", "country" --network ropsten
to set postal address. - Execute
npx oz send-tx <VASP instance address> --method setName --args "VASP name" --network ropsten
to set VASP name. - Execute
npx oz send-tx <VASP instance address> --method setEmail --args "VASP e-mail" --network ropsten
to set VASP e-mail. - Execute
npx oz send-tx <VASP instance address> --method setWebsite --args "VASP website url" --network ropsten
to set VASP website url. - Preserve
./openzeppelin/ropsten.json
file for future use.
A ______gap
variable
In some smart contracts you can find a ______gap
variable.
Since OpenZeppelin contracts are used by inheritance, user-defined variables will be placed by the compiler after OpenZeppelin’s ones. If, in a newer version, new variables are added by the library, the storage layouts would be incompatible, and an upgrade would not be possible.
The gap is a workaround to that issue: by leaving a 50-slot gap, we’re able to increase the contract’s storage by that amount (provided we also remove the same slots from the gap) with no clashing issues.
1.0.0-beta.1
5 years ago