Skip to content

sam-thewise/snapshot.js

 
 

Repository files navigation

Snapshot.js

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 99.5%
  • Other 0.5%