Set the environment PENDLE_SDK_V2_NPM_AUTH_TOKEN
to your npm access token.
Then run
yarn
yarn build
Clone .env.example
to a new .env
file and edit it to match
your environment.
To set up the right environment (in case the prerequisites are not being done, e.g. adding liquidity to pools), run all tests with the following script:
yarn test:coverage
Before running the test, you might want to funds your account with some test assets by:
yarn test:prepare
By default, write function tests are disabled. To enable them, uncomment the
INCLUDE_WRITE
field in .env
. Do note that this will involve real funds.
-
Most of the test is to make sure that the SDK is working as expected (calling the correct functions, using the correct parameters, calculating the correct number). SDK tests are not meant to test the actual functionality of the contracts.
-
When testing for write functions, it is better to use a local RPC (can set it up with hardhat), so that you won't need real funds and it is faster and more stable to run test on a local RPC.
- Tests for SDK vePendle are currently not implemented.
- All tests must run sequentially and not in parallel. Most of the tests require sending transactions, so running them in parallel will cause the transactions to fail due to nonce errors.
There are two release branches main
(for mainnet) and main-fuji
(for fuji testnet).
The developing branch is develop
, so before publishing a new package, make sure
to cherry-pick/merge the features from develop
into the corresponding branch.
The following steps should be done:
- Checkout the
develop
branch and pull. - Checkout the desired release branch and pull.
merge/cherry-pick
features fromdevelop
yarn
yarn publish
push