- node 14+
- npm
- a directory named 'data' in the directory where you run the code
npm install
node concave.js
each chain requires the following fields to be set
name: chain name endpoint: rpc url step: how many blocks worth of data to request per call made to RPCs.
- Applicable for things that grab historical data
- higher value -> faster runtime. May cause timeouts though
###tokens:
A list of forks to pull data for.
address of the token contract
address of the staked token contract
address of the contract that holds staked tokens
block to start from when pulling historical data
block to end pulling historical data from
ABI json from the corresponding contract. Can get this from the block explorer
used for calculations
used for calculations. Necessary because some forks' index did not start at 1.
list of bond name/addresses for pulling bond data. requires a name and contract address
add this under the chain that the fork is on.
name: "fooooork"
tokenAddress: '<address>'
stakeTokenAddress: '<address>'
stakingAddress: '<address>'
bonds:
-
name: 'bar'
address: '<address of bond contract>'
-
name: 'foo'
address: <address as a string>
startBlock: <number>
endBlock: <number>
tokenAbi: "<path to json file w/ abi>"
stakedTokenAbi: "<path to json file w/ abi>"
stakingAbi: "<path to json file w/ abi>"
bondAbi: "<path to json file w/ abi>"
initialSupply: <number>
initialIndex: <number>