diff --git a/projects/21-co/index.js b/projects/21-co/index.js index 602313dd083d..7dcd5740a2b1 100644 --- a/projects/21-co/index.js +++ b/projects/21-co/index.js @@ -31,12 +31,11 @@ const config = { 'addr1q976xcl3r2vt6he4q3rq6lyq8832v5mgpdds0e84z7vn0hma5d3lzx5ch40n2pzxp47gqw0z5efksz6mqlj029uexl0snqdsul' ], }, - /* doge: { owners: [ 'DMbNFKqJpr9B9XPfZL5zbgMTvzpN7h7sfz' ], - }, */ + }, bep2: { owners: [ 'bnb1k3ulpgw4wzl0e8qx80u87aq9w7ekfygruzs4dg' diff --git a/projects/binance/config.js b/projects/binance/config.js index fad58324bbf7..abdbd461a895 100644 --- a/projects/binance/config.js +++ b/projects/binance/config.js @@ -174,7 +174,6 @@ const assetList = [ ['DOGE', 'BEP20', '0xd3a22590f8243f8e83ac230d1842c9af0404c4a1'], ['DOGE', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], ['DOGE', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - /* ['DOGE', 'DOGE', 'D73RQLGWW9TBT2AKspEP24wLiXFrXvnTqX'], ['DOGE', 'DOGE', 'D7BrtudMAdwz2U7vSGumVDuxZsZNibJuzw'], ['DOGE', 'DOGE', 'D7D2f2WuEkwhTWqBkisZ5sM3JagaBcNWBs'], @@ -211,7 +210,6 @@ const assetList = [ ['DOGE', 'DOGE', 'DTGrjpvJXQU2zSpUDsnk9b4PAQW5Pwtg4K'], ['DOGE', 'DOGE', 'DTSop4ycWkpmDqpncVZ3jwKp3z7B4kW4T3'], ['DOGE', 'DOGE', 'DU8gPC5mh4KxWJARQRxoESFark2jAguBr5'], - */ ['DOT', 'BEP2', 'bnb17jky4rwhu9rzgrx7exrfc3pcd5z290ga8qfm0j'], ['DOT', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], ['DOT', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], @@ -619,7 +617,7 @@ function getAddresses(chain) { return assetList.filter(i => i[1] === chain).map(i => i[2]) } function getOwners(chain) { - const isCaseSensitive = ['BTC', 'TRX', 'SOL', 'XRP', 'LTC', 'DOT', 'ALGO'].includes(chain) + const isCaseSensitive = ['BTC', 'TRX', 'SOL', 'XRP', 'LTC', 'DOT', 'ALGO', 'DOGE'].includes(chain) return getUniqueAddresses(assetList.filter(i => i[1] === chain).map(i => i[2]), isCaseSensitive) } @@ -699,4 +697,7 @@ module.exports = { near: { owners: getOwners('NEAR') }, + doge: { + owners: getOwners('DOGE') + }, } \ No newline at end of file diff --git a/projects/bitfinex/index.js b/projects/bitfinex/index.js index b18ae24c3cf9..ae30d0f51c0b 100644 --- a/projects/bitfinex/index.js +++ b/projects/bitfinex/index.js @@ -123,11 +123,9 @@ const config = { 'zil184u2al6n0nrks06xjgq080hc95f77ttd7rkqvn', // Zilliqa cold wallet ] }, -/* doge: { owners: ['DQQckuSMsiFjaAdGiNjvDyswcz9RWQU2xe'] } -*/ } module.exports = cexExports(config) \ No newline at end of file diff --git a/projects/coinsquare/index.js b/projects/coinsquare/index.js index 3c2bbd955059..e38efba56dfd 100644 --- a/projects/coinsquare/index.js +++ b/projects/coinsquare/index.js @@ -71,7 +71,6 @@ const config = { ] }, - /* doge: { owners: [ 'D9uH999MANKyNkzfb8XwRmQhHEBNLBh9sA', @@ -81,7 +80,6 @@ const config = { 'DAd1JWwtwx1paUuWG71ePNLU3WJUFaMJoh' ] } - */ } module.exports = cexExports(config) \ No newline at end of file diff --git a/projects/helper/chain/doge.js b/projects/helper/chain/doge.js new file mode 100644 index 000000000000..c26c16ffdba8 --- /dev/null +++ b/projects/helper/chain/doge.js @@ -0,0 +1,30 @@ +const sdk = require('@defillama/sdk') +const { get } = require('../http') +const plimit = require('p-limit') +const { sleep } = require('../utils') + +const url = addr => 'https://doge1.trezor.io/api/v2/address/' + addr +const _rateLimited = plimit(1) +const rateLimited = fn => (...args) => _rateLimited(() => fn(...args)) +const getBalance = rateLimited(_getBalance) + +async function _getBalance(addr) { + const { balance } = await get(url(addr), { + headers: { + 'User-Agent': 'Thunder Client (https://www.thunderclient.com)', + } + }) + await sleep(2000) + return +balance +} + +async function sumTokens({ api, owners = [] }) { + for (const owner of owners) { + const balance = await getBalance(owner) + api.addCGToken('dogecoin', balance / 1e8) + } +} + +module.exports = { + sumTokens +} \ No newline at end of file diff --git a/projects/helper/sumTokens.js b/projects/helper/sumTokens.js index 7fba8db3f263..c973223ba47a 100644 --- a/projects/helper/sumTokens.js +++ b/projects/helper/sumTokens.js @@ -23,6 +23,7 @@ const helpers = { "stacks": require("./chain/stacks"), "starknet": require("./chain/starknet"), "brc20": require("./chain/brc20"), + "doge": require("./chain/doge"), } const geckoMapping = { diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index c67bfb7750ff..646e5628228f 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -18,7 +18,7 @@ coreAssets = JSON.parse(JSON.stringify(coreAssets)) // orbit brige: https://bridge.orbitchain.io/open/v1/api/monitor/rawTokenList const ibcChains = ['ibc', 'terra', 'terra2', 'crescent', 'osmosis', 'kujira', 'stargaze', 'juno', 'injective', 'cosmos', 'comdex', 'umee', 'orai', 'persistence', 'fxcore', 'neutron', 'quasar', 'chihuahua', 'sei', 'archway', 'migaloo', 'secret', 'aura', 'xpla', 'bostrom'] -const caseSensitiveChains = [...ibcChains, 'solana', 'tezos', 'ton', 'algorand', 'aptos', 'near', 'bitcoin', 'waves', 'tron', 'litecoin', 'polkadot', 'ripple', 'elrond', 'cardano', 'stacks', 'sui', 'ergo', 'mvc', 'renec',] +const caseSensitiveChains = [...ibcChains, 'solana', 'tezos', 'ton', 'algorand', 'aptos', 'near', 'bitcoin', 'waves', 'tron', 'litecoin', 'polkadot', 'ripple', 'elrond', 'cardano', 'stacks', 'sui', 'ergo', 'mvc', 'renec', 'doge'] const transformTokens = { // Sample Code diff --git a/projects/solidly-v3/index.js b/projects/solidly-v3/index.js index 58bc1c3f84e3..e496cca3105d 100644 --- a/projects/solidly-v3/index.js +++ b/projects/solidly-v3/index.js @@ -5,9 +5,9 @@ module.exports = uniV3Export({ ethereum: { factory: "0x70fe4a44ea505cfa3a57b95cf2862d4fd5f0f687", fromBlock: 18044650, }, optimism: { factory: "0x70fe4a44ea505cfa3a57b95cf2862d4fd5f0f687", fromBlock: 115235065, }, base: { factory: "0x70fe4a44ea505cfa3a57b95cf2862d4fd5f0f687", fromBlock: 9672720, }, - arbitrum: { factory: "0x70fe4a44ea505cfa3a57b95cf2862d4fd5f0f687", fromBlock: 173576189, }, + arbitrum: { factory: "0x70fe4a44ea505cfa3a57b95cf2862d4fd5f0f687", fromBlock: 173576189, permitFailure: true, }, fantom: { factory: "0x70fe4a44ea505cfa3a57b95cf2862d4fd5f0f687", fromBlock: 73057898, permitFailure: true, }, }); -module.exports.hallmarks=[ +module.exports.hallmarks = [ [1693699200, "Solidly V3 launch"], ] \ No newline at end of file