@astralprotocol/contracts

1.0.11 • Public • Published

@astralprotocol/contracts

Build Status Coverage Status

Description

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.

To add Astral Protocol Contracts to your application

yarn add @astralprotocol/contracts

To develop or try the Astral Protocol Contracts locally

  • Clone the astralprotocol repository and go to packages/contracts:
git clone git@github.com:AstralProtocol/astralprotocol.git
cd astralprotocol/packages/contracts
  • Run ganache yarn ganache
  • Deploy contracts with yarn truffle
  • Run tests with yarn truffle-test or do coverage check up yarn coverage
  • You can deploy an instance by running yarn new-instance. It builds a tree with some GeoDIDs with fake ids and cids.
  • You can test the removal of some links by running yarn remove-links.
  • Watch the changes in a locally deployed subgraph.

To deploy your own contracts in the Ropsten testnet

  • Create a .env file in /packages/contracts with a MNEMONIC and ROPSTEN_API_KEY:
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>

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.113latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.113
1.0.91
1.0.81
1.0.51
1.0.41
1.0.31
1.0.21
1.0.11
0.1.141
0.1.131
0.1.121
0.1.111
0.1.101
0.1.91
0.1.81
0.1.70
0.1.50
0.1.40
0.1.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @astralprotocol/contracts

Weekly Downloads

17

Version

1.0.11

License

MIT OR Apache-2.0

Unpacked Size

2.81 MB

Total Files

10

Last publish

Collaborators

  • astralprotocol