ilk-registry
ilk-registry copied to clipboard
A publicly-modifiable registry of ilks in the Dai Stablecoin System.
Ilk Registry
A publicly-modifiable registry of ilk's in the Dai Stablecoin System.
Public addresses
Kovan: 0xc3F42deABc0C506e8Ae9356F2d4fc1505196DCDB
Goerli: 0x525FaC4CEc48a4eF2FBb0A72355B6255f8D5f79e
Mainnet: 0x5a464C28D19848f44199D003BeF5ecc87d090F87
Requirements
About
Provides an on-chain list of ilk types in the DSS system.
Useful for external contracts or web frontends which need to iterate over the on-chain ilk types and/or access information about a particular ilk.
-
Modify the registry
add(address joinAdapter): Add a new ilk to the registry by passing the Join Adapter address. The adapter must be live on mainnet and can not already be included in the registry.remove(bytes32 ilk): Remove an ilk from the registry if it's adapter has been caged.update(bytes32 ilk): Update theflipandpipcontracts in storage for a givenilk.
-
Get information from the registry
list(): return abytes32[]of available ilk types.list(uint256 start, uint256 end): returns abytes32[]of a portion of the complete list.get(uint256 pos): get thebytes32ilk type from an indexed position in the array.info(bytes32 ilk): return information about an ilkname: token name (string)symbol: token symbol (string)class: classification code of the ilk (uint256)dec: token decimals (uint256)gem: token addresspip: price feedjoin: token join adapterflip: ilk flipper
count(): return number of ilks asuint256pos(bytes32 ilk): the location in theilksarray for thisilkgem(bytes32 ilk): theaddressof the ilk's token contractpip(bytes32 ilk): theaddressof the ilk's pip contractjoin(bytes32 ilk): theaddressof the ilk's join adapterflip(bytes32 ilk): theaddressof the ilk's flipper contractdec(bytes32 ilk): the number of decimals for anilkasuint256name(bytes32 ilk): the name of the token (if available) asstringsymbol(bytes32 ilk): the token symbol (if available) asstring
-
authfunctions (available to MakerDAO governance)file(bytes32 what, address): Update core contract valuesfile(bytes32 ilk, bytes32 what, address): Update ilk data valuesfile(bytes32 ilk, bytes32 what, uint256): Update ilk data valuesfile(bytes32 ilk, bytes32 what, string calldata): Update ilk data valuesrely(address)anddeny(address): configureauthusersremoveAuth(bytes32 ilk): remove an uncaged ilk adapter
Testing
$ dapp update
$ make test