DecentSDK
Getting Started:
npm i
to install packages
- copy
.env.example
to .env
and add your variables
npx hardhat run scripts/deployDCNTSDK.ts --network optimism_testnet
to deploy the DecentSDK
Testing
npm i
to install packages
npx hardhat test
Prettying
npm i
to install packages
npx prettier --write 'contracts/**/*.sol'
Adding a new SDK Module
- add contracts to
/contracts
folder
- add interfaces to
/interfaces
folder
- write deploy function in
core/index.js
- create an example interface to the sdk in
scripts/deploy{YOUR_CONTRACT_NAME}.ts
- test by running
npx hardhat run scripts/{YOUR_CONTRACT_NAME}.ts --network optimism_testnet
Verifying
npx hardhat verify {CONTRACT_ADDRESS} --network {NETWORK}
- find full list of supported networks in
hardhat.config.js
The Box enables one-click transactions using any token on any chain. Leveraging a set of hooks and embeddable React components, developers can select which action type they would like to perform (discussed further in key concepts), and The Box takes care of the rest. It abstracts bridging and swapping to provide users a seamless transaction experience regardless of where they store their funds, allowing dapps to meet users at their point of liquidity.
AggregatorV2V3Interface.sol
AggregatorV3Interface.sol
MetadataRenderAdminCheck.sol
IOperatorFilterRegistry.sol