Skip to content

Commit

Permalink
Adding DxDAO Token Registry GenericScheme (#1620)
Browse files Browse the repository at this point in the history
* Added dxDAO Token Registry Generic Schemes

* Added DXTokenRegistry Multi-Registry GenericSchema which replaces Omen, Mix and Exchange Schemes

* Formatting
  • Loading branch information
nicoelzer authored Apr 24, 2020
1 parent 192d2d4 commit 9d9d4fb
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/genericSchemeRegistry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const ensRegistryInfo = require("./schemes/ENSRegistry.json");
const ensPublicResolverInfo = require("./schemes/ENSPublicResolver.json");
const registryLookupInfo = require("./schemes/RegistryLookup.json");
const co2kenInfo = require("./schemes/CO2ken.json");
const dXTokenRegistry = require("./schemes/dXTokenRegistry.json");

const KNOWNSCHEMES = [
dutchXInfo,
Expand All @@ -22,6 +23,7 @@ const KNOWNSCHEMES = [
ensPublicResolverInfo,
gpInfo,
registryLookupInfo,
dXTokenRegistry,
];

const SCHEMEADDRESSES: {[network: string]: { [address: string]: any}} = {
Expand Down
116 changes: 116 additions & 0 deletions src/genericSchemeRegistry/schemes/dXTokenRegistry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"name": "Token Registry",
"addresses": {
"main": [
"0x93DB90445B76329e9ed96ECd74e76D8fbf2590d8"
],
"rinkeby": [
"0x03165DF66d9448E45c2f5137486af3E7e752a352"
],
"kovan": [
"0x2C337c91A7FA83273F6D13721a2324c8B324f46e"
],
"private": [
"0xAB8278343a98b50D7eca37c97CcB53393B82D049"
]
},
"actions": [
{
"id": "addTokens",
"label": "Add tokens",
"description": "Add tokens to the Token Registry",
"notes": "A list of available ListIds can be found <a target=\"_blank\" href=\"https://www.notion.so/DxDAO-Token-Registry-Lists-220e1411482342c4a7e47a641a676fcb\">here</a>",
"fields": [
{
"label": "ListId",
"name": "_listId"
},
{
"label": "Tokens",
"name": "_tokens",
"placeholder":"Address (0x0000…)"
}
],
"abi": {
"inputs": [
{
"internalType": "uint256",
"name": "_listId",
"type": "uint256"
},
{
"internalType": "address[]",
"name": "_tokens",
"type": "address[]"
}
],
"name": "addTokens",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
},
{
"id": "removeTokens",
"label": "Remove tokens",
"description": "Remove tokens from the Token Registry",
"notes": "A list of available ListIds can be found <a target=\"_blank\" href=\"https://www.notion.so/DxDAO-Token-Registry-Lists-220e1411482342c4a7e47a641a676fcb\">here</a>",
"fields": [
{
"label": "ListId",
"name": "_listId"
},
{
"label": "Tokens",
"name": "_tokens",
"placeholder":"Address (0x0000…)"
}
],
"abi": {
"inputs": [
{
"internalType": "uint256",
"name": "_listId",
"type": "uint256"
},
{
"internalType": "address[]",
"name": "_tokens",
"type": "address[]"
}
],
"name": "removeTokens",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
},
{
"id": "transferOwnership",
"label": "Transfer Ownership",
"description": "Transfer ownership of the registry contract",
"notes": "",
"fields": [
{
"label": "New owner",
"name": "newOwner",
"placeholder": "Address (0x0000…)"
}
],
"abi": {
"constant": false,
"inputs": [
{
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
}
]
}

0 comments on commit 9d9d4fb

Please sign in to comment.