Comment on page
@astralprotocol/contracts
Documentation about the Astral Protocol Contracts Package.
These contracts serve as the Registry for the Astral Protocol GeoDIDs. It allows binding of a GeoDID to an ethereum address and CID name resolving.
By registering a spatial asset Smart Contract events are triggered, which are picked up by the subgraph indexer to build the tree of relationships for easy querying.
yarn add @astralprotocol/contracts
git clone [email protected]:AstralProtocol/astralprotocol.git
cd astralprotocol/packages/contracts
- Run ganache
yarn ganache
- In a new terminal, deploy contracts with
yarn truffle
- Run tests with
yarn truffle-test
- You can deploy an instance by running
yarn new-instance
. It builds a GeoDID tree with hardcoded GeoDID ids and CIDs. - You can test the removal of some links by running
yarn remove-links
. - Do coverage check up by killing the
ganache
process in the first terminal and runningyarn coverage
- Create a
.env
file in/packages/contracts
with aMNEMONIC
andROPSTEN_API_KEY
.env
MNEMONIC="mnemonic phrase goes here with testnet ether in address[0] on ropsten cool"
ROPSTEN_API_KEY=https://ropsten.infura.io/v3/<PROJECT ID HERE>
Last modified 1yr ago