1.0.0-beta.1 • Published 6 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
.envfile. SpecifyROPSTEN_PRIVATE_KEYandROPSTEN_NODE_URLwith 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
.envfile - Execute
npx oz send-tx <VASP instance address> --method setPostalAddress --args "address line", "post code", "town", "country" --network ropstento set postal address. - Execute
npx oz send-tx <VASP instance address> --method setName --args "VASP name" --network ropstento set VASP name. - Execute
npx oz send-tx <VASP instance address> --method setEmail --args "VASP e-mail" --network ropstento set VASP e-mail. - Execute
npx oz send-tx <VASP instance address> --method setWebsite --args "VASP website url" --network ropstento set VASP website url. - Preserve
./openzeppelin/ropsten.jsonfile 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
6 years ago