Skip to content

BuildOnViction/snapshot.js

 
 

Repository files navigation

Snapshot.js

!!!! Warning !!!

You need to build this repository for other projects reference to work.

Install

Snapshot.js was designed to work both in the browser and in Node.js.

Node.js

To install Snapshot.js on Node.js, open your terminal and run:

npm i @snapshot-labs/snapshot.js

Browser

You can create an index.html file and include Snapshot.js with:

<script src="https://cdn.jsdelivr.net/npm/@snapshot-labs/snapshot.js"></script>

Development

Install dependencies

npm install

Build package

npm run build

Test strategy

# Test default strategy (erc20-balance-of)
npm run test
# Test strategy with name
npm run test --strategy=erc20-received
npm run test --strategy=eth-balance
# Test with more addresses from addresses.json
npm run test --strategy=eth-balance --more=200 

License

MIT.

Packages

No packages published

Languages

  • TypeScript 92.0%
  • Solidity 7.0%
  • Other 1.0%