Set of typescript functions to work with MakerDAO auctions.
The process of adding new collaterals depends on the token type used. This is due collateral token address as well as related contract addresses (such as clip and calc) are always up to date, as our library fetches current contract addresses from the chainlog contract.
-
Adding standard ERC-20 collateral is straightforward and consists of only one step.
- Add collateral configuration to the
COLLATERALS.ts
- Add collateral configuration to the
-
Adding other types of tokens (which require separate
callee
contract):- Determine the name of the new callee, eg
UniswapV2CalleeDai
- Extend
CalleeAddresses
type in thetypes.ts
using the name from1.
- Add addresses of the callee for all supported networks in
CALLEES.ts
- Add collateral configuration to the
COLLATERALS.ts
- Add new exchange file to the
calleeFunctions
folder- The file should be named using the name from
1.
- The file should export
CalleeFunctions
- The file should be imported in the
calleeFunctions/index.ts
- The file should be named using the name from
- Determine the name of the new callee, eg
REMOTE_RPC_URL
: (required for tests, simulations) Ethereum RPC url with access to historical data. Used by hardhat to fetch relevant dataLOCAL_RPC_URL
: (optional, defaulthttp://localhost:8545
) Hardhat RPC url. Used by tests and simulations