Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Commit

Permalink
EtherSocial Network (ESN) support added
Browse files Browse the repository at this point in the history
  • Loading branch information
kimmyeonghun authored and hackmod committed Jul 19, 2018
1 parent a3bcb52 commit f70c897
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
19 changes: 19 additions & 0 deletions app/scripts/abiDefinitions/esnAbi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[
{
"name": "Select a contract...",
"address": "",
"abi": ''
},{
"name": "DdengleToken - DGT",
"address": "0x72ea3508d9d817a91465abb59be10fef9857a055",
"abi": '[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"tokens","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]'
},{
"name": "Mist's Multisig Contract",
"address": "0x0000000000000000000000000000000000000000",
"abi": '[{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"removeOwner","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"}],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"m_numOwners","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"m_lastDay","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"resetSpentToday","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"m_spentToday","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"addOwner","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"m_required","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_h","type":"bytes32"}],"name":"confirm","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"_newLimit","type":"uint256"}],"name":"setDailyLimit","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"execute","outputs":[{"name":"_r","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[{"name":"_operation","type":"bytes32"}],"name":"revoke","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_newRequired","type":"uint256"}],"name":"changeRequirement","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_operation","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"hasConfirmed","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"kill","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"name":"changeOwner","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"m_dailyLimit","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"inputs":[{"name":"_owners","type":"address[]"},{"name":"_required","type":"uint256"},{"name":"_daylimit","type":"uint256"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"}],"name":"Confirmation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"}],"name":"Revoke","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"}],"name":"OwnerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newRequirement","type":"uint256"}],"name":"RequirementChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"}],"name":"SingleTransact","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"}],"name":"MultiTransact","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"initiator","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"}],"name":"ConfirmationNeeded","type":"event"}]'
},{
"name": "Generic ERC223 Token",
"address": "0x0001000000001000000000100000000010000001",
"abi":'[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"},{"name":"data","type":"bytes"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"initialSupply","type":"uint256"},{"name":"tokenName","type":"string"},{"name":"decimalUnits","type":"uint8"},{"name":"tokenSymbol","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"data","type":"bytes"}],"name":"Transfer","type":"event"}]'
}
]
14 changes: 14 additions & 0 deletions app/scripts/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ nodes.nodeTypes = {
MUSIC: "MUSIC",
GO: "GO",
EOSC: "EOSC",
ESN: "ESN",
Custom: "CUSTOM ETH"
};
nodes.ensNodeTypes = [nodes.nodeTypes.ETH, nodes.nodeTypes.Ropsten];
Expand Down Expand Up @@ -339,6 +340,19 @@ nodes.nodeList = {
'estimateGas': true,
'service': 'eos-classic.io',
'lib': new nodes.customNode('https://node.eos-classic.io', '')
},
'esn': {
'name': 'ESN',
'blockExplorerTX': 'https://ethersocial.net/tx/[[txHash]]',
'blockExplorerAddr': 'https://ethersocial.net/addr/[[address]]',
'type': nodes.nodeTypes.ESN,
'eip155': true,
'chainId': 31102,
'tokenList': require('./tokens/esnTokens.json'),
'abiList': require('./abiDefinitions/esnAbi.json'),
'estimateGas': true,
'service': 'ethersocial.org',
'lib': new nodes.customNode('https://api.esn.gonspool.com', '')
}
};

Expand Down
14 changes: 14 additions & 0 deletions app/scripts/tokens/esnTokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"address": "0x72ea3508d9d817a91465abb59be10fef9857a055",
"symbol": "DGT",
"decimal": 0,
"type": "default"
},
{
"address": "0x0146b9dcd9fb2abc1b5b136c28d20d0037526961",
"symbol": "TOPM",
"decimal": 18,
"type": "default"
}
]
14 changes: 13 additions & 1 deletion app/styles/etherwallet-custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ label small {
@brand-music: #fece00;
@brand-go: #27223d;
@brand-eosc: #926565;
@brand-esn: #a16bff;
@brand-cust: #b50085;

.dropdown-node .dropdown-menu {
Expand Down Expand Up @@ -671,6 +672,9 @@ label small {
li:nth-child(24) {
border-left: 2px solid @brand-eosc;
}
li:nth-child(25) {
border-left: 2px solid @brand-esn;
}
li:last-child {
border-left: 2px solid @gray-light;
}
Expand All @@ -688,7 +692,8 @@ label small {
li:nth-child(21),
li:nth-child(22),
li:nth-child(23),
li:nth-child(24), {
li:nth-child(24),
li:nth-child(25), {
border-bottom: 1px solid @gray-lighter;
}
}
Expand Down Expand Up @@ -829,6 +834,13 @@ header.EOSC {
& + .container .alert-info { background-color:@brand-eosc; }
}

header.ESN {
.header-branding { border-bottom: 0.25rem solid @brand-esn; }
& + .container + .pre-footer + .footer { border-top: 0.25rem solid @brand-esn; }
& + .container .modal-content { border: 0.25rem solid @brand-esn; }
& + .container .alert-info { background-color:@brand-esn; }
}

.contest-container {
align-content: center;
display: flex;
Expand Down

0 comments on commit f70c897

Please sign in to comment.