From 76e1ad673fc421e867781b021cdf0c547548c1ca Mon Sep 17 00:00:00 2001 From: franalbani Date: Thu, 4 May 2023 19:21:36 -0300 Subject: [PATCH 1/8] adds first draft with balances in ETH and XDAI for GNO token --- projects/karpatkey/index.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 projects/karpatkey/index.js diff --git a/projects/karpatkey/index.js b/projects/karpatkey/index.js new file mode 100644 index 000000000000..89a641de8ac0 --- /dev/null +++ b/projects/karpatkey/index.js @@ -0,0 +1,31 @@ +const { sumTokensExport } = require("../helper/unwrapLPs"); + +const GNO_TOKEN_CONTRACT_ETH = '0x6810e776880c02933d47db1b9fc05908e5386b96' +const GNO_TOKEN_CONTRACT_XDAI = '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb' + +const WALLET_ETH_39d = '0x849d52316331967b6ff1198e5e32a0eb168d039d' +const WALLET_ETH_462 = '0x4971dd016127f390a3ef6b956ff944d0e2e1e462' + +const WALLET_XDAI_e6f = '0x458cd345b4c05e8df39d0a07220feb4ec19f5e6f' +const WALLET_XDAI_969 = '0x10e4597ff93cbee194f4879f8f1d54a370db6969' + + +module.exports = { + ethereum: { + tvl: sumTokensExport({ + tokensAndOwners: [ + [GNO_TOKEN_CONTRACT_ETH, WALLET_ETH_39d], + [GNO_TOKEN_CONTRACT_ETH, WALLET_ETH_462], + ], + }), + }, + xdai: { + tvl: sumTokensExport({ + tokensAndOwners: [ + [GNO_TOKEN_CONTRACT_XDAI, WALLET_XDAI_e6f], + [GNO_TOKEN_CONTRACT_XDAI, WALLET_XDAI_969], + ], + }), + } + +}; From 0a9fea8d5b463033b1c6b315a9ccd5cb595f1e21 Mon Sep 17 00:00:00 2001 From: franalbani Date: Thu, 11 May 2023 20:01:19 -0300 Subject: [PATCH 2/8] adds all ETH and GNO tokens --- projects/karpatkey/index.js | 131 ++++++++++++++++++++++++++++++++---- 1 file changed, 118 insertions(+), 13 deletions(-) diff --git a/projects/karpatkey/index.js b/projects/karpatkey/index.js index 89a641de8ac0..ffed58f1e0ae 100644 --- a/projects/karpatkey/index.js +++ b/projects/karpatkey/index.js @@ -1,31 +1,136 @@ const { sumTokensExport } = require("../helper/unwrapLPs"); -const GNO_TOKEN_CONTRACT_ETH = '0x6810e776880c02933d47db1b9fc05908e5386b96' -const GNO_TOKEN_CONTRACT_XDAI = '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb' +const ETH_TOKENS = [ +'0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9', +'0xE95A203B1a91a908F9B9CE46459d101078c2c3cb', +'0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF', +'0x616e8BfA43F920657B3497DBf40D6b1A02D4608d', +'0xba100000625a3754423978a60c9317c58a424e3D', +'0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C', +'0xc00e94Cb662C3520282E6f5717214004A7f26888', +'0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB', +'0x2ba592F78dB6436527729929AAf6c908497cB200', +'0xD533a949740bb3306d119CC777fa900bA034cd52', +'0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B', +'0x6B175474E89094C44Da98b954EedeAC495271d0F', +'0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE', +'0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72', +'0x0000000000000000000000000000000000000000', +'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', +'0x6243d8CEA23066d098a15582d81a598b4e8391F4', +'0x853d955aCEf822Db058eb8505911ED77F175b99e', +'0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0', +'0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf', +'0xf6537FE0df7F0Cc0985Cf00792CC98249E73EFa0', +'0x6810e776880C02933D47DB1b9fc05908e5386b96', +'0xc944E90C64B2c07662A292be6244BDf05Cda44a7', +'0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F', +'0x10010078a54396F62c96dF8532dc2B4847d47ED3', +'0xc3589F56B6869824804A5EA29F2c9886Af1B0FcE', +'0x903bEF1736CDdf2A537176cf3C64579C3867A881', +'0x875773784Af8135eA0ef43b5a374AaD105c5D39e', +'0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb', +'0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32', +'0x5f98805A4E8be255a32880FDeC7F6728C6568bA0', +'0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2', +'0xDa007777D86AC6d989cC9f79A73261b3fC5e0DA0', +'0x93ED3FBe21207Ec2E8f2d3c3de6e058Cb73Bc04d', +'0x31c8EAcBFFdD875c74b94b077895Bd78CF1E64A3', +'0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919', +'0x255Aa6DF07540Cb5d3d297f0D0D4D84cb52bc8e6', +'0xae78736Cd615f374D3085123A210448E74Fc6393', +'0x20BC832ca081b91433ff6c17f85701B6e92486c5', +'0xFe2e637202056d30016725477c5da089Ab0A043A', +'0x6B3595068778DD592e39A122f4f5a5cF09C90fE2', +'0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2', +'0x6cAcDB97e3fC8136805a9E7c342d866ab77D0957', +'0x57dB3FfCa78dBbE0eFa0EC745D55f62aa0Cbd345', +'0xaDB2437e6F65682B85F814fBc12FeC0508A7B1D0', +'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +'0x1456688345527bE1f37E9e627DA0837D6f08C925', +'0xdAC17F958D2ee523a2206206994597C13D831ec7', +'0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', +'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', +'0xcfeaead4947f0705a14ec42ac3d44129e1ef3ed5', +'0x41A08648C3766F9F9d85598fF102a08f4ef84F84', +'0x62b9c7356a2dc64a1969e19c23e4f579f9810aa7', +'0xfeef77d3f69374f66429c91d732a244f074bdf74', +] -const WALLET_ETH_39d = '0x849d52316331967b6ff1198e5e32a0eb168d039d' -const WALLET_ETH_462 = '0x4971dd016127f390a3ef6b956ff944d0e2e1e462' +const GNO_TOKENS = [ +'0xDF613aF6B44a31299E48131e9347F034347E2F00', +'0x3a97704a1b25F08aa230ae53B352e2e72ef52843', +'0x7eF541E2a22058048904fE5744f9c7E4C57AF717', +'0x05698e7346Ea67Cfb088f64Ad8962B18137d17c0', +'0xDf6FF92bfDC1e8bE45177DC1f4845d391D3ad8fD', +'0x177127622c4A00F3d409B75571e12cB3c8973d3c', +'0x712b3d230F3C1c19db860d80619288b1F0BDd0Bd', +'0x44fa8e6f47987339850636f88629646662444217', +'0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE', +'0xD87eaA26dCfB0C0A6160cCf8c8a01BEB1C15fB00', +'0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75', +'0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb', +'0x10010078a54396F62c96dF8532dc2B4847d47ED3', +'0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9', +'0x534179b3d7292d8a82A2985ee80a6D2027ee8378', +'0x3F56e0c36d275367b8C502090EDF38289b3dEa0d', +'0x5fd896D248fbfa54d26855C267859eb1b4DAEe72', +'0xc60e38C6352875c051B481Cbe79Dd0383AdB7817', +'0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3', +'0xdFA46478F9e5EA86d57387849598dbFB2e964b02', +'0xd7a28Aa9c470e7e9D8c676BCd5dd2f40c5683afa', +'0x6aC78efae880282396a335CA2F79863A1e6831D4', +'0xA4eF9Da5BA71Cc0D2e5E877a910A37eC43420445', +'0x2995D1317DcD4f0aB89f4AE60F3f020A4F17C7CE', +'0x532801ED6f82FFfD2DAB70A19fC2d7B2772C4f4b', +'0xC45b3C1c24d5F54E7a2cF288ac668c74Dd507a84', +'0x0116e28B43A358162B96f70B4De14C98A4465f25', +'0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83', +'0xFe7ed09C4956f7cdb54eC4ffCB9818Db2D7025b8', +'0x4ECaBa5870353805a9F068101A40E0f32ed605C6', +'0x4291F029B9e7acb02D49428458cf6fceAC545f81', +'0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252', +'0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1', +'0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', +'0x0000000000000000000000000000000000000000', +'0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf', +'0xcB444e90D8198415266c6a2724b7900fb12FC56E', +'0x52d134c6db5889fad3542a09eaf7aa90c0fdf9e4', +'0xca30c93b02514f86d5c86a6e375e3a330b435fb5', +'0x1e2c4fb7ede391d116e6b41cd0608260e8801d59', +'0x44CF74238d840a5fEBB0eAa089D05b763B73faB8', +'0xF4d944883D6FddC56d3534986feF82105CaDbfA1', +'0x0e1D5Bcd2Ac5CF2f71841A9667afC1E995CaAf4F', +'0x538E2dDbfDf476D24cCb1477A518A82C9EA81326', +] + +const ETH_WALLETS = [ + '0x0EFcCBb9E2C09Ea29551879bd9Da32362b32fc89', + '0x4F2083f5fBede34C2714aFfb3105539775f7FE64', + '0x849d52316331967b6ff1198e5e32a0eb168d039d', + '0x4971dd016127f390a3ef6b956ff944d0e2e1e462', +] const WALLET_XDAI_e6f = '0x458cd345b4c05e8df39d0a07220feb4ec19f5e6f' const WALLET_XDAI_969 = '0x10e4597ff93cbee194f4879f8f1d54a370db6969' +const WALLETS_XDAI = [WALLET_XDAI_e6f, WALLET_XDAI_969] + + +function cartesianProduct(a, b) { + return a.flatMap(x => b.map(y => [x, y])); +} + module.exports = { ethereum: { tvl: sumTokensExport({ - tokensAndOwners: [ - [GNO_TOKEN_CONTRACT_ETH, WALLET_ETH_39d], - [GNO_TOKEN_CONTRACT_ETH, WALLET_ETH_462], - ], + tokensAndOwners: cartesianProduct(ETH_TOKENS, ETH_WALLETS) }), }, xdai: { tvl: sumTokensExport({ - tokensAndOwners: [ - [GNO_TOKEN_CONTRACT_XDAI, WALLET_XDAI_e6f], - [GNO_TOKEN_CONTRACT_XDAI, WALLET_XDAI_969], - ], + tokensAndOwners: cartesianProduct(GNO_TOKENS, WALLETS_XDAI) }), } - }; From 0667f3d1770f3acc06cbd69e611725d6352a6bb3 Mon Sep 17 00:00:00 2001 From: sgzerbo <98768518+sgzerbo@users.noreply.github.com> Date: Thu, 11 May 2023 22:56:11 -0300 Subject: [PATCH 3/8] Added some safe addresses --- projects/karpatkey/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/karpatkey/index.js b/projects/karpatkey/index.js index ffed58f1e0ae..91469ee56431 100644 --- a/projects/karpatkey/index.js +++ b/projects/karpatkey/index.js @@ -109,12 +109,18 @@ const ETH_WALLETS = [ '0x4F2083f5fBede34C2714aFfb3105539775f7FE64', '0x849d52316331967b6ff1198e5e32a0eb168d039d', '0x4971dd016127f390a3ef6b956ff944d0e2e1e462', + '0x58e6c7ab55aa9012eacca16d1ed4c15795669e1c', + '0x616de58c011f8736fa20c7ae5352f7f6fb9f0669', ] const WALLET_XDAI_e6f = '0x458cd345b4c05e8df39d0a07220feb4ec19f5e6f' const WALLET_XDAI_969 = '0x10e4597ff93cbee194f4879f8f1d54a370db6969' -const WALLETS_XDAI = [WALLET_XDAI_e6f, WALLET_XDAI_969] +const WALLETS_XDAI = [ + '0x458cd345b4c05e8df39d0a07220feb4ec19f5e6f', + '0x10e4597ff93cbee194f4879f8f1d54a370db6969', + '0x54e191b01aa9c1f61aa5c3bce8d00956f32d3e71', +] function cartesianProduct(a, b) { From b8fcb147ad360c0af6746dae6572325848212bb7 Mon Sep 17 00:00:00 2001 From: sgzerbo <98768518+sgzerbo@users.noreply.github.com> Date: Wed, 17 May 2023 23:08:17 -0300 Subject: [PATCH 4/8] Minor progress --- projects/karpatkey/addresses.js | 115 +++++++++++++++++++++++ projects/karpatkey/index.js | 162 +++++++++----------------------- 2 files changed, 157 insertions(+), 120 deletions(-) create mode 100644 projects/karpatkey/addresses.js diff --git a/projects/karpatkey/addresses.js b/projects/karpatkey/addresses.js new file mode 100644 index 000000000000..4ef3099f574c --- /dev/null +++ b/projects/karpatkey/addresses.js @@ -0,0 +1,115 @@ +const Tokens={ + ethereum: [ + '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9', + '0xE95A203B1a91a908F9B9CE46459d101078c2c3cb', + '0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF', + '0x616e8BfA43F920657B3497DBf40D6b1A02D4608d', + '0xba100000625a3754423978a60c9317c58a424e3D', + '0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C', + '0xc00e94Cb662C3520282E6f5717214004A7f26888', + '0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB', + '0x2ba592F78dB6436527729929AAf6c908497cB200', + '0xD533a949740bb3306d119CC777fa900bA034cd52', + '0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B', + '0x6B175474E89094C44Da98b954EedeAC495271d0F', + '0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE', + '0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72', + '0x0000000000000000000000000000000000000000', + '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', + '0x6243d8CEA23066d098a15582d81a598b4e8391F4', + '0x853d955aCEf822Db058eb8505911ED77F175b99e', + '0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0', + '0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf', + '0xf6537FE0df7F0Cc0985Cf00792CC98249E73EFa0', + '0x6810e776880C02933D47DB1b9fc05908e5386b96', + '0xc944E90C64B2c07662A292be6244BDf05Cda44a7', + '0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F', + '0x10010078a54396F62c96dF8532dc2B4847d47ED3', + '0xc3589F56B6869824804A5EA29F2c9886Af1B0FcE', + '0x903bEF1736CDdf2A537176cf3C64579C3867A881', + '0x875773784Af8135eA0ef43b5a374AaD105c5D39e', + '0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb', + '0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32', + '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0', + '0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2', + '0xDa007777D86AC6d989cC9f79A73261b3fC5e0DA0', + '0x93ED3FBe21207Ec2E8f2d3c3de6e058Cb73Bc04d', + '0x31c8EAcBFFdD875c74b94b077895Bd78CF1E64A3', + '0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919', + '0x255Aa6DF07540Cb5d3d297f0D0D4D84cb52bc8e6', + '0xae78736Cd615f374D3085123A210448E74Fc6393', + '0x20BC832ca081b91433ff6c17f85701B6e92486c5', + '0xFe2e637202056d30016725477c5da089Ab0A043A', + '0x6B3595068778DD592e39A122f4f5a5cF09C90fE2', + '0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2', + '0x6cAcDB97e3fC8136805a9E7c342d866ab77D0957', + '0x57dB3FfCa78dBbE0eFa0EC745D55f62aa0Cbd345', + '0xaDB2437e6F65682B85F814fBc12FeC0508A7B1D0', + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + '0x1456688345527bE1f37E9e627DA0837D6f08C925', + '0xdAC17F958D2ee523a2206206994597C13D831ec7', + '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', + '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', + '0xcfeaead4947f0705a14ec42ac3d44129e1ef3ed5', + '0x41A08648C3766F9F9d85598fF102a08f4ef84F84', + '0x62b9c7356a2dc64a1969e19c23e4f579f9810aa7', + '0xfeef77d3f69374f66429c91d732a244f074bdf74', + ], + gnosis: [ + '0xDF613aF6B44a31299E48131e9347F034347E2F00', + '0x3a97704a1b25F08aa230ae53B352e2e72ef52843', + '0x7eF541E2a22058048904fE5744f9c7E4C57AF717', + '0x05698e7346Ea67Cfb088f64Ad8962B18137d17c0', + '0xDf6FF92bfDC1e8bE45177DC1f4845d391D3ad8fD', + '0x177127622c4A00F3d409B75571e12cB3c8973d3c', + '0x712b3d230F3C1c19db860d80619288b1F0BDd0Bd', + '0x44fa8e6f47987339850636f88629646662444217', + '0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE', + '0xD87eaA26dCfB0C0A6160cCf8c8a01BEB1C15fB00', + '0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75', + '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb', + '0x10010078a54396F62c96dF8532dc2B4847d47ED3', + '0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9', + '0x534179b3d7292d8a82A2985ee80a6D2027ee8378', + '0x3F56e0c36d275367b8C502090EDF38289b3dEa0d', + '0x5fd896D248fbfa54d26855C267859eb1b4DAEe72', + '0xc60e38C6352875c051B481Cbe79Dd0383AdB7817', + '0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3', + '0xdFA46478F9e5EA86d57387849598dbFB2e964b02', + '0xd7a28Aa9c470e7e9D8c676BCd5dd2f40c5683afa', + '0x6aC78efae880282396a335CA2F79863A1e6831D4', + '0xA4eF9Da5BA71Cc0D2e5E877a910A37eC43420445', + '0x2995D1317DcD4f0aB89f4AE60F3f020A4F17C7CE', + '0x532801ED6f82FFfD2DAB70A19fC2d7B2772C4f4b', + '0xC45b3C1c24d5F54E7a2cF288ac668c74Dd507a84', + '0x0116e28B43A358162B96f70B4De14C98A4465f25', + '0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83', + '0xFe7ed09C4956f7cdb54eC4ffCB9818Db2D7025b8', + '0x4ECaBa5870353805a9F068101A40E0f32ed605C6', + '0x4291F029B9e7acb02D49428458cf6fceAC545f81', + '0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252', + '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1', + '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', + '0x0000000000000000000000000000000000000000', + '0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf', + '0xcB444e90D8198415266c6a2724b7900fb12FC56E', + '0x52d134c6db5889fad3542a09eaf7aa90c0fdf9e4', + '0xca30c93b02514f86d5c86a6e375e3a330b435fb5', + '0x1e2c4fb7ede391d116e6b41cd0608260e8801d59', + '0x44CF74238d840a5fEBB0eAa089D05b763B73faB8', + '0xF4d944883D6FddC56d3534986feF82105CaDbfA1', + '0x0e1D5Bcd2Ac5CF2f71841A9667afC1E995CaAf4F', + '0x538E2dDbfDf476D24cCb1477A518A82C9EA81326', + ] +} + +const Contracts = { + Maker:{ + CDP_MANAGER_ADDRESS : '0x5ef30b9986345249bc32d8928B7ee64DE9435E39', + ILK_REGISTRY_ADDRESS : '0x5a464C28D19848f44199D003BeF5ecc87d090F87', + VAT_ADDRESS : '0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B', + SPOT_ADDRESS : '0x65C79fcB50Ca1594B025960e539eD7A9a6D434A3' + } +} + +module.exports = {Tokens, Contracts}; \ No newline at end of file diff --git a/projects/karpatkey/index.js b/projects/karpatkey/index.js index 91469ee56431..8bd05bcb14de 100644 --- a/projects/karpatkey/index.js +++ b/projects/karpatkey/index.js @@ -1,142 +1,64 @@ const { sumTokensExport } = require("../helper/unwrapLPs"); +const sdk = require('@defillama/sdk'); +const Addresses = require('./addresses.js'); +const Contracts = Addresses.Contracts; +const Tokens = Addresses.Tokens -const ETH_TOKENS = [ -'0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9', -'0xE95A203B1a91a908F9B9CE46459d101078c2c3cb', -'0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF', -'0x616e8BfA43F920657B3497DBf40D6b1A02D4608d', -'0xba100000625a3754423978a60c9317c58a424e3D', -'0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C', -'0xc00e94Cb662C3520282E6f5717214004A7f26888', -'0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB', -'0x2ba592F78dB6436527729929AAf6c908497cB200', -'0xD533a949740bb3306d119CC777fa900bA034cd52', -'0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B', -'0x6B175474E89094C44Da98b954EedeAC495271d0F', -'0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE', -'0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72', -'0x0000000000000000000000000000000000000000', -'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', -'0x6243d8CEA23066d098a15582d81a598b4e8391F4', -'0x853d955aCEf822Db058eb8505911ED77F175b99e', -'0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0', -'0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf', -'0xf6537FE0df7F0Cc0985Cf00792CC98249E73EFa0', -'0x6810e776880C02933D47DB1b9fc05908e5386b96', -'0xc944E90C64B2c07662A292be6244BDf05Cda44a7', -'0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F', -'0x10010078a54396F62c96dF8532dc2B4847d47ED3', -'0xc3589F56B6869824804A5EA29F2c9886Af1B0FcE', -'0x903bEF1736CDdf2A537176cf3C64579C3867A881', -'0x875773784Af8135eA0ef43b5a374AaD105c5D39e', -'0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb', -'0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32', -'0x5f98805A4E8be255a32880FDeC7F6728C6568bA0', -'0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2', -'0xDa007777D86AC6d989cC9f79A73261b3fC5e0DA0', -'0x93ED3FBe21207Ec2E8f2d3c3de6e058Cb73Bc04d', -'0x31c8EAcBFFdD875c74b94b077895Bd78CF1E64A3', -'0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919', -'0x255Aa6DF07540Cb5d3d297f0D0D4D84cb52bc8e6', -'0xae78736Cd615f374D3085123A210448E74Fc6393', -'0x20BC832ca081b91433ff6c17f85701B6e92486c5', -'0xFe2e637202056d30016725477c5da089Ab0A043A', -'0x6B3595068778DD592e39A122f4f5a5cF09C90fE2', -'0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2', -'0x6cAcDB97e3fC8136805a9E7c342d866ab77D0957', -'0x57dB3FfCa78dBbE0eFa0EC745D55f62aa0Cbd345', -'0xaDB2437e6F65682B85F814fBc12FeC0508A7B1D0', -'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', -'0x1456688345527bE1f37E9e627DA0837D6f08C925', -'0xdAC17F958D2ee523a2206206994597C13D831ec7', -'0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', -'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', -'0xcfeaead4947f0705a14ec42ac3d44129e1ef3ed5', -'0x41A08648C3766F9F9d85598fF102a08f4ef84F84', -'0x62b9c7356a2dc64a1969e19c23e4f579f9810aa7', -'0xfeef77d3f69374f66429c91d732a244f074bdf74', -] - -const GNO_TOKENS = [ -'0xDF613aF6B44a31299E48131e9347F034347E2F00', -'0x3a97704a1b25F08aa230ae53B352e2e72ef52843', -'0x7eF541E2a22058048904fE5744f9c7E4C57AF717', -'0x05698e7346Ea67Cfb088f64Ad8962B18137d17c0', -'0xDf6FF92bfDC1e8bE45177DC1f4845d391D3ad8fD', -'0x177127622c4A00F3d409B75571e12cB3c8973d3c', -'0x712b3d230F3C1c19db860d80619288b1F0BDd0Bd', -'0x44fa8e6f47987339850636f88629646662444217', -'0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE', -'0xD87eaA26dCfB0C0A6160cCf8c8a01BEB1C15fB00', -'0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75', -'0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb', -'0x10010078a54396F62c96dF8532dc2B4847d47ED3', -'0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9', -'0x534179b3d7292d8a82A2985ee80a6D2027ee8378', -'0x3F56e0c36d275367b8C502090EDF38289b3dEa0d', -'0x5fd896D248fbfa54d26855C267859eb1b4DAEe72', -'0xc60e38C6352875c051B481Cbe79Dd0383AdB7817', -'0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3', -'0xdFA46478F9e5EA86d57387849598dbFB2e964b02', -'0xd7a28Aa9c470e7e9D8c676BCd5dd2f40c5683afa', -'0x6aC78efae880282396a335CA2F79863A1e6831D4', -'0xA4eF9Da5BA71Cc0D2e5E877a910A37eC43420445', -'0x2995D1317DcD4f0aB89f4AE60F3f020A4F17C7CE', -'0x532801ED6f82FFfD2DAB70A19fC2d7B2772C4f4b', -'0xC45b3C1c24d5F54E7a2cF288ac668c74Dd507a84', -'0x0116e28B43A358162B96f70B4De14C98A4465f25', -'0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83', -'0xFe7ed09C4956f7cdb54eC4ffCB9818Db2D7025b8', -'0x4ECaBa5870353805a9F068101A40E0f32ed605C6', -'0x4291F029B9e7acb02D49428458cf6fceAC545f81', -'0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252', -'0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1', -'0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', -'0x0000000000000000000000000000000000000000', -'0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf', -'0xcB444e90D8198415266c6a2724b7900fb12FC56E', -'0x52d134c6db5889fad3542a09eaf7aa90c0fdf9e4', -'0xca30c93b02514f86d5c86a6e375e3a330b435fb5', -'0x1e2c4fb7ede391d116e6b41cd0608260e8801d59', -'0x44CF74238d840a5fEBB0eAa089D05b763B73faB8', -'0xF4d944883D6FddC56d3534986feF82105CaDbfA1', -'0x0e1D5Bcd2Ac5CF2f71841A9667afC1E995CaAf4F', -'0x538E2dDbfDf476D24cCb1477A518A82C9EA81326', -] -const ETH_WALLETS = [ - '0x0EFcCBb9E2C09Ea29551879bd9Da32362b32fc89', - '0x4F2083f5fBede34C2714aFfb3105539775f7FE64', - '0x849d52316331967b6ff1198e5e32a0eb168d039d', - '0x4971dd016127f390a3ef6b956ff944d0e2e1e462', - '0x58e6c7ab55aa9012eacca16d1ed4c15795669e1c', - '0x616de58c011f8736fa20c7ae5352f7f6fb9f0669', -] +const WALLET_GNOSIS_DAO_eth = '0x849d52316331967b6ff1198e5e32a0eb168d039d' +const WALLET_GNOSIS_LTD_eth = '0x4971dd016127f390a3ef6b956ff944d0e2e1e462' +const WALLET_ENS_eth = '0x4F2083f5fBede34C2714aFfb3105539775f7FE64' +const WALLET_BALANCER_eth = '0x0EFcCBb9E2C09Ea29551879bd9Da32362b32fc89' +const WALLET_KPK_eth = '0x58e6c7ab55aa9012eacca16d1ed4c15795669e1c' +const WALLET_COW_eth = '0x616de58c011f8736fa20c7ae5352f7f6fb9f0669' -const WALLET_XDAI_e6f = '0x458cd345b4c05e8df39d0a07220feb4ec19f5e6f' -const WALLET_XDAI_969 = '0x10e4597ff93cbee194f4879f8f1d54a370db6969' +const WALLET_GNOSIs_DAO_gno = '0x458cd345b4c05e8df39d0a07220feb4ec19f5e6f' +const WALLET_GNOSIS_LTD_gno = '0x10e4597ff93cbee194f4879f8f1d54a370db6969' +const WALLET_KPK_gno = '0x54e191b01aa9c1f61aa5c3bce8d00956f32d3e71' -const WALLETS_XDAI = [ - '0x458cd345b4c05e8df39d0a07220feb4ec19f5e6f', - '0x10e4597ff93cbee194f4879f8f1d54a370db6969', - '0x54e191b01aa9c1f61aa5c3bce8d00956f32d3e71', +const Wallets = { + ethereum: [ + WALLET_BALANCER_eth, + WALLET_ENS_eth, + WALLET_GNOSIS_DAO_eth, + WALLET_GNOSIS_LTD_eth, + WALLET_KPK_eth, + WALLET_COW_eth, +], +gnosis: [ + WALLET_GNOSIs_DAO_gno, + WALLET_GNOSIS_LTD_gno, + WALLET_KPK_gno, ] +} function cartesianProduct(a, b) { return a.flatMap(x => b.map(y => [x, y])); } +//Testing a a contract function call +const ilk = sdk.api.abi.call({ + target: Contracts.Maker.CDP_MANAGER_ADDRESS, + abi: 'function ilks(uint256) view returns (bytes32)', + params: [12], +}) +//console.log(ilk) + +console.log(sumTokensExport({ + tokensAndOwners: cartesianProduct(Tokens.ethereum, Wallets.ethereum)})) module.exports = { ethereum: { tvl: sumTokensExport({ - tokensAndOwners: cartesianProduct(ETH_TOKENS, ETH_WALLETS) - }), + tokensAndOwners: cartesianProduct(Tokens.ethereum, Wallets.ethereum) + }) }, xdai: { tvl: sumTokensExport({ - tokensAndOwners: cartesianProduct(GNO_TOKENS, WALLETS_XDAI) + tokensAndOwners: cartesianProduct(Tokens.gnosis, Wallets.gnosis) }), } }; +//To test, run +//node test.js projects/karpatkey/index.js From a62e004d6682a323c1e61f73f63e6d54d77a775f Mon Sep 17 00:00:00 2001 From: franalbani Date: Fri, 30 Jun 2023 17:05:00 -0300 Subject: [PATCH 5/8] adds lptokens --- projects/karpatkey/addresses.js | 48 +++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/projects/karpatkey/addresses.js b/projects/karpatkey/addresses.js index 4ef3099f574c..32d30c7736b6 100644 --- a/projects/karpatkey/addresses.js +++ b/projects/karpatkey/addresses.js @@ -10,7 +10,7 @@ const Tokens={ '0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB', '0x2ba592F78dB6436527729929AAf6c908497cB200', '0xD533a949740bb3306d119CC777fa900bA034cd52', - '0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B', + // '0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B', '0x6B175474E89094C44Da98b954EedeAC495271d0F', '0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE', '0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72', @@ -54,6 +54,33 @@ const Tokens={ '0x41A08648C3766F9F9d85598fF102a08f4ef84F84', '0x62b9c7356a2dc64a1969e19c23e4f579f9810aa7', '0xfeef77d3f69374f66429c91d732a244f074bdf74', + '0x5c6Ee304399DBdB9C8Ef030aB642B10820DB8F56', + '0x36FAbE4cAeF8c190550b6f93c306A5644E7dCef6', + '0xde8c195aa41c11a0c4787372defbbddaa31306d2', + '0xa13a9247ea42d743238089903570127dda72fe44', + '0x92762b42a06dcdddc5b7362cfb01e631c4d44b40', + '0xf4c0dd9b82da36c07605df83c8a416f11724d88b', + '0x92762B42A06dCDDDc5B7362Cfb01E631c4D44B40', + '0xd3780729035c5b302f76ced0e7f74cf0fb7c739a', + '0x228054e9c056f024fc724f515a2a8764ae175ed6', + '0x2d9d3e3d0655766aa801ae0f6dc925db2df291a1', + '0xe4683fe8f53da14ca5dac4251eadfb3aa614d528', + '0x001b78cec62dcfdc660e06a91eb1bc966541d758', + '0xacada51c320947e7ed1a0d0f6b939b0ff465e4c2', + '0x5209db28b3cf22a944401c83370af7a703fffb08', + '0x712cc5bed99aa06fc4d5fb50aea3750fa5161d0f', + '0xfb6b1c1a1ea5618b3cfc20f81a11a97e930fa46b', + '0x32296969ef14eb0c6d29669c550d4a0449130230', + '0x1e19cf2d73a72ef1332c882f20534b6519be0276', + '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd', + //'0x5f1f4e50ba51d723f12385a8a9606afc3a0555f55', + '0x79c58f70905f734641735bc61e45c19dd9ad60bc', + '0xcfca23ca9ca720b6e98e3eb9b6aa0ffc4a5c08b9', + '0x845838DF265Dcd2c412A1Dc9e959c7d08537f8a2', + '0x06325440D014e39736583c165C2963BA99fAf14E', + '0xc4AD29ba4B3c580e6D59105FFf484999997675Ff', + '0x6c3f90f043a72fa612cbac8115ee7e52bde6e490', + '0xa1181481bEb2dc5De0DaF2c85392d81C704BF75D', ], gnosis: [ '0xDF613aF6B44a31299E48131e9347F034347E2F00', @@ -100,6 +127,23 @@ const Tokens={ '0xF4d944883D6FddC56d3534986feF82105CaDbfA1', '0x0e1D5Bcd2Ac5CF2f71841A9667afC1E995CaAf4F', '0x538E2dDbfDf476D24cCb1477A518A82C9EA81326', + '0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56', + '0xfedb19ec000d38d92af4b21436870f115db22725', + '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f', + '0xb973ca96a3f0d61045f53255e319aedb6ed49240', + '0x864f76eabe542b0a83d09257afad59ad6f4eedc3', + '0x21d4c792ea7e38e0d0819c2011a2b1cb7252bd99', + '0x388cae2f7d3704c937313d990298ba67d70a3709', + '0xa99fd9950b5d5dceeaf4939e221dca8ca9b938ab', + '0x66f33ae36dd80327744207a48122f874634b3ada', + //'0x0ca1c1ec4ebf3cc67a9f545ff90a3795b318ca4aa', + '0x02e7e2dd3ba409148a49d5cc9a9034d2f884f245', + '0x5d7309a01b727d6769153fcb1df5587858d53b9c', + '0xbdf4488dcf7165788d438b62b4c8a333879b7078', + '0x1337bedc9d22ecbe766df105c9623922a27963ec', + '0xF38c5b39F29600765849cA38712F302b1522C9B8', + '0x15f9EEdeEBD121FBb238a8A0caE38f4b4A07A585', + '0xE6B448c0345bF6AA52ea3A5f17aabd0e58F23912', ] } @@ -112,4 +156,4 @@ const Contracts = { } } -module.exports = {Tokens, Contracts}; \ No newline at end of file +module.exports = {Tokens, Contracts}; From 193058fdcd776f2826d94102e379bb2a3307ae81 Mon Sep 17 00:00:00 2001 From: franalbani Date: Fri, 30 Jun 2023 17:08:08 -0300 Subject: [PATCH 6/8] fixes some lptoken --- projects/karpatkey/addresses.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/karpatkey/addresses.js b/projects/karpatkey/addresses.js index 32d30c7736b6..befa46f30be7 100644 --- a/projects/karpatkey/addresses.js +++ b/projects/karpatkey/addresses.js @@ -10,7 +10,7 @@ const Tokens={ '0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB', '0x2ba592F78dB6436527729929AAf6c908497cB200', '0xD533a949740bb3306d119CC777fa900bA034cd52', - // '0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B', + '0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B', '0x6B175474E89094C44Da98b954EedeAC495271d0F', '0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE', '0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72', @@ -73,7 +73,7 @@ const Tokens={ '0x32296969ef14eb0c6d29669c550d4a0449130230', '0x1e19cf2d73a72ef1332c882f20534b6519be0276', '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd', - //'0x5f1f4e50ba51d723f12385a8a9606afc3a0555f55', + '0x5f1f4e50ba51d723f12385a8a9606afc3a0555f5', '0x79c58f70905f734641735bc61e45c19dd9ad60bc', '0xcfca23ca9ca720b6e98e3eb9b6aa0ffc4a5c08b9', '0x845838DF265Dcd2c412A1Dc9e959c7d08537f8a2', @@ -136,7 +136,7 @@ const Tokens={ '0x388cae2f7d3704c937313d990298ba67d70a3709', '0xa99fd9950b5d5dceeaf4939e221dca8ca9b938ab', '0x66f33ae36dd80327744207a48122f874634b3ada', - //'0x0ca1c1ec4ebf3cc67a9f545ff90a3795b318ca4aa', + '0x0ca1c1ec4ebf3cc67a9f545ff90a3795b318ca4a', '0x02e7e2dd3ba409148a49d5cc9a9034d2f884f245', '0x5d7309a01b727d6769153fcb1df5587858d53b9c', '0xbdf4488dcf7165788d438b62b4c8a333879b7078', From 5834648d9395b4d5c948a5e23c57d17fe27a7d09 Mon Sep 17 00:00:00 2001 From: Mariano Aguero Date: Fri, 30 Jun 2023 17:18:41 -0300 Subject: [PATCH 7/8] Add more tokens --- projects/karpatkey/addresses.js | 151 +++++++++++++++++--------------- projects/karpatkey/index.js | 50 ++++------- 2 files changed, 100 insertions(+), 101 deletions(-) diff --git a/projects/karpatkey/addresses.js b/projects/karpatkey/addresses.js index befa46f30be7..830e30410ee0 100644 --- a/projects/karpatkey/addresses.js +++ b/projects/karpatkey/addresses.js @@ -1,5 +1,14 @@ -const Tokens={ +const Tokens = { ethereum: [ + '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643', + '0xae7ab96520de3a18e5e111b5eaab095312d7fe84', + '0x4da27a545c0c5b758a6ba100e3a049001de870f5', + '0x39aa39c021dfbae8fac545936693ac917d5e7563', + '0x1a7e4e63778b4f12a199c062f3efdd288afcbce8', + '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', + '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', + '0xef3A930e1FfFFAcd2fc13434aC81bD278B0ecC8d', + '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490', '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9', '0xE95A203B1a91a908F9B9CE46459d101078c2c3cb', '0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF', @@ -81,78 +90,82 @@ const Tokens={ '0xc4AD29ba4B3c580e6D59105FFf484999997675Ff', '0x6c3f90f043a72fa612cbac8115ee7e52bde6e490', '0xa1181481bEb2dc5De0DaF2c85392d81C704BF75D', - ], - gnosis: [ - '0xDF613aF6B44a31299E48131e9347F034347E2F00', - '0x3a97704a1b25F08aa230ae53B352e2e72ef52843', - '0x7eF541E2a22058048904fE5744f9c7E4C57AF717', - '0x05698e7346Ea67Cfb088f64Ad8962B18137d17c0', - '0xDf6FF92bfDC1e8bE45177DC1f4845d391D3ad8fD', - '0x177127622c4A00F3d409B75571e12cB3c8973d3c', - '0x712b3d230F3C1c19db860d80619288b1F0BDd0Bd', - '0x44fa8e6f47987339850636f88629646662444217', - '0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE', - '0xD87eaA26dCfB0C0A6160cCf8c8a01BEB1C15fB00', - '0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75', - '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb', - '0x10010078a54396F62c96dF8532dc2B4847d47ED3', - '0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9', - '0x534179b3d7292d8a82A2985ee80a6D2027ee8378', - '0x3F56e0c36d275367b8C502090EDF38289b3dEa0d', - '0x5fd896D248fbfa54d26855C267859eb1b4DAEe72', - '0xc60e38C6352875c051B481Cbe79Dd0383AdB7817', - '0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3', - '0xdFA46478F9e5EA86d57387849598dbFB2e964b02', - '0xd7a28Aa9c470e7e9D8c676BCd5dd2f40c5683afa', - '0x6aC78efae880282396a335CA2F79863A1e6831D4', - '0xA4eF9Da5BA71Cc0D2e5E877a910A37eC43420445', - '0x2995D1317DcD4f0aB89f4AE60F3f020A4F17C7CE', - '0x532801ED6f82FFfD2DAB70A19fC2d7B2772C4f4b', - '0xC45b3C1c24d5F54E7a2cF288ac668c74Dd507a84', - '0x0116e28B43A358162B96f70B4De14C98A4465f25', - '0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83', - '0xFe7ed09C4956f7cdb54eC4ffCB9818Db2D7025b8', - '0x4ECaBa5870353805a9F068101A40E0f32ed605C6', - '0x4291F029B9e7acb02D49428458cf6fceAC545f81', - '0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252', - '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1', - '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', - '0x0000000000000000000000000000000000000000', - '0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf', - '0xcB444e90D8198415266c6a2724b7900fb12FC56E', - '0x52d134c6db5889fad3542a09eaf7aa90c0fdf9e4', - '0xca30c93b02514f86d5c86a6e375e3a330b435fb5', - '0x1e2c4fb7ede391d116e6b41cd0608260e8801d59', - '0x44CF74238d840a5fEBB0eAa089D05b763B73faB8', - '0xF4d944883D6FddC56d3534986feF82105CaDbfA1', - '0x0e1D5Bcd2Ac5CF2f71841A9667afC1E995CaAf4F', - '0x538E2dDbfDf476D24cCb1477A518A82C9EA81326', - '0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56', - '0xfedb19ec000d38d92af4b21436870f115db22725', - '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f', - '0xb973ca96a3f0d61045f53255e319aedb6ed49240', - '0x864f76eabe542b0a83d09257afad59ad6f4eedc3', - '0x21d4c792ea7e38e0d0819c2011a2b1cb7252bd99', - '0x388cae2f7d3704c937313d990298ba67d70a3709', - '0xa99fd9950b5d5dceeaf4939e221dca8ca9b938ab', - '0x66f33ae36dd80327744207a48122f874634b3ada', - '0x0ca1c1ec4ebf3cc67a9f545ff90a3795b318ca4a', - '0x02e7e2dd3ba409148a49d5cc9a9034d2f884f245', - '0x5d7309a01b727d6769153fcb1df5587858d53b9c', - '0xbdf4488dcf7165788d438b62b4c8a333879b7078', - '0x1337bedc9d22ecbe766df105c9623922a27963ec', - '0xF38c5b39F29600765849cA38712F302b1522C9B8', - '0x15f9EEdeEBD121FBb238a8A0caE38f4b4A07A585', - '0xE6B448c0345bF6AA52ea3A5f17aabd0e58F23912', + ], + xdai: [ + '0xfadc59d012ba3c110b08a15b7755a5cb7cbe77d7', + '0x4537e328Bf7e4eFA29D05CAeA260D7fE26af9D74', + '0xb0C5f3100A4d9d9532a4CfD68c55F1AE8da987Eb', + '0xc90132d5d1b87730da162ec9cd34885828769cc3', + '0xDF613aF6B44a31299E48131e9347F034347E2F00', + '0x3a97704a1b25F08aa230ae53B352e2e72ef52843', + '0x7eF541E2a22058048904fE5744f9c7E4C57AF717', + '0x05698e7346Ea67Cfb088f64Ad8962B18137d17c0', + '0xDf6FF92bfDC1e8bE45177DC1f4845d391D3ad8fD', + '0x177127622c4A00F3d409B75571e12cB3c8973d3c', + '0x712b3d230F3C1c19db860d80619288b1F0BDd0Bd', + '0x44fa8e6f47987339850636f88629646662444217', + '0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE', + '0xD87eaA26dCfB0C0A6160cCf8c8a01BEB1C15fB00', + '0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75', + '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb', + '0x10010078a54396F62c96dF8532dc2B4847d47ED3', + '0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9', + '0x534179b3d7292d8a82A2985ee80a6D2027ee8378', + '0x3F56e0c36d275367b8C502090EDF38289b3dEa0d', + '0x5fd896D248fbfa54d26855C267859eb1b4DAEe72', + '0xc60e38C6352875c051B481Cbe79Dd0383AdB7817', + '0x37b60f4E9A31A64cCc0024dce7D0fD07eAA0F7B3', + '0xdFA46478F9e5EA86d57387849598dbFB2e964b02', + '0xd7a28Aa9c470e7e9D8c676BCd5dd2f40c5683afa', + '0x6aC78efae880282396a335CA2F79863A1e6831D4', + '0xA4eF9Da5BA71Cc0D2e5E877a910A37eC43420445', + '0x2995D1317DcD4f0aB89f4AE60F3f020A4F17C7CE', + '0x532801ED6f82FFfD2DAB70A19fC2d7B2772C4f4b', + '0xC45b3C1c24d5F54E7a2cF288ac668c74Dd507a84', + '0x0116e28B43A358162B96f70B4De14C98A4465f25', + '0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83', + '0xFe7ed09C4956f7cdb54eC4ffCB9818Db2D7025b8', + '0x4ECaBa5870353805a9F068101A40E0f32ed605C6', + '0x4291F029B9e7acb02D49428458cf6fceAC545f81', + '0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252', + '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1', + '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', + '0x0000000000000000000000000000000000000000', + '0x543Ff227F64Aa17eA132Bf9886cAb5DB55DCAddf', + '0xcB444e90D8198415266c6a2724b7900fb12FC56E', + '0x52d134c6db5889fad3542a09eaf7aa90c0fdf9e4', + '0xca30c93b02514f86d5c86a6e375e3a330b435fb5', + '0x1e2c4fb7ede391d116e6b41cd0608260e8801d59', + '0x44CF74238d840a5fEBB0eAa089D05b763B73faB8', + '0xF4d944883D6FddC56d3534986feF82105CaDbfA1', + '0x0e1D5Bcd2Ac5CF2f71841A9667afC1E995CaAf4F', + '0x538E2dDbfDf476D24cCb1477A518A82C9EA81326', + '0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56', + '0xfedb19ec000d38d92af4b21436870f115db22725', + '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f', + '0xb973ca96a3f0d61045f53255e319aedb6ed49240', + '0x864f76eabe542b0a83d09257afad59ad6f4eedc3', + '0x21d4c792ea7e38e0d0819c2011a2b1cb7252bd99', + '0x388cae2f7d3704c937313d990298ba67d70a3709', + '0xa99fd9950b5d5dceeaf4939e221dca8ca9b938ab', + '0x66f33ae36dd80327744207a48122f874634b3ada', + '0x0ca1c1ec4ebf3cc67a9f545ff90a3795b318ca4a', + '0x02e7e2dd3ba409148a49d5cc9a9034d2f884f245', + '0x5d7309a01b727d6769153fcb1df5587858d53b9c', + '0xbdf4488dcf7165788d438b62b4c8a333879b7078', + '0x1337bedc9d22ecbe766df105c9623922a27963ec', + '0xF38c5b39F29600765849cA38712F302b1522C9B8', + '0x15f9EEdeEBD121FBb238a8A0caE38f4b4A07A585', + '0xE6B448c0345bF6AA52ea3A5f17aabd0e58F23912', ] } const Contracts = { - Maker:{ - CDP_MANAGER_ADDRESS : '0x5ef30b9986345249bc32d8928B7ee64DE9435E39', - ILK_REGISTRY_ADDRESS : '0x5a464C28D19848f44199D003BeF5ecc87d090F87', - VAT_ADDRESS : '0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B', - SPOT_ADDRESS : '0x65C79fcB50Ca1594B025960e539eD7A9a6D434A3' + Maker: { + CDP_MANAGER_ADDRESS: '0x5ef30b9986345249bc32d8928B7ee64DE9435E39', + ILK_REGISTRY_ADDRESS: '0x5a464C28D19848f44199D003BeF5ecc87d090F87', + VAT_ADDRESS: '0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B', + SPOT_ADDRESS: '0x65C79fcB50Ca1594B025960e539eD7A9a6D434A3' } } diff --git a/projects/karpatkey/index.js b/projects/karpatkey/index.js index 8bd05bcb14de..e1c71bbe0c96 100644 --- a/projects/karpatkey/index.js +++ b/projects/karpatkey/index.js @@ -1,10 +1,8 @@ -const { sumTokensExport } = require("../helper/unwrapLPs"); -const sdk = require('@defillama/sdk'); +const {sumTokensExport} = require("../helper/unwrapLPs") const Addresses = require('./addresses.js'); const Contracts = Addresses.Contracts; const Tokens = Addresses.Tokens - const WALLET_GNOSIS_DAO_eth = '0x849d52316331967b6ff1198e5e32a0eb168d039d' const WALLET_GNOSIS_LTD_eth = '0x4971dd016127f390a3ef6b956ff944d0e2e1e462' const WALLET_ENS_eth = '0x4F2083f5fBede34C2714aFfb3105539775f7FE64' @@ -18,47 +16,35 @@ const WALLET_KPK_gno = '0x54e191b01aa9c1f61aa5c3bce8d00956f32d3e71' const Wallets = { ethereum: [ - WALLET_BALANCER_eth, - WALLET_ENS_eth, - WALLET_GNOSIS_DAO_eth, - WALLET_GNOSIS_LTD_eth, - WALLET_KPK_eth, - WALLET_COW_eth, -], -gnosis: [ - WALLET_GNOSIs_DAO_gno, - WALLET_GNOSIS_LTD_gno, - WALLET_KPK_gno, -] + WALLET_GNOSIS_DAO_eth, + WALLET_BALANCER_eth, + WALLET_ENS_eth, + WALLET_GNOSIS_LTD_eth, + WALLET_KPK_eth, + WALLET_COW_eth, + ], + xdai: [ + WALLET_GNOSIs_DAO_gno, + WALLET_GNOSIS_LTD_gno, + WALLET_KPK_gno, + ] } - function cartesianProduct(a, b) { - return a.flatMap(x => b.map(y => [x, y])); + return a.flatMap(x => b.map(y => [x, y])) } -//Testing a a contract function call -const ilk = sdk.api.abi.call({ - target: Contracts.Maker.CDP_MANAGER_ADDRESS, - abi: 'function ilks(uint256) view returns (bytes32)', - params: [12], -}) -//console.log(ilk) - -console.log(sumTokensExport({ - tokensAndOwners: cartesianProduct(Tokens.ethereum, Wallets.ethereum)})) - module.exports = { ethereum: { tvl: sumTokensExport({ - tokensAndOwners: cartesianProduct(Tokens.ethereum, Wallets.ethereum) - }) + tokensAndOwners: cartesianProduct(Tokens.ethereum, Wallets.ethereum) + }), }, xdai: { tvl: sumTokensExport({ - tokensAndOwners: cartesianProduct(Tokens.gnosis, Wallets.gnosis) + tokensAndOwners: cartesianProduct(Tokens.xdai, Wallets.xdai) }), } -}; +} //To test, run //node test.js projects/karpatkey/index.js From ca0dd28acb73997d354ce624d3b5507c4e4faa26 Mon Sep 17 00:00:00 2001 From: Mariano Aguero Date: Fri, 30 Jun 2023 20:11:25 -0300 Subject: [PATCH 8/8] Add destructuring --- projects/karpatkey/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/projects/karpatkey/index.js b/projects/karpatkey/index.js index e1c71bbe0c96..4de4881ffb8e 100644 --- a/projects/karpatkey/index.js +++ b/projects/karpatkey/index.js @@ -1,7 +1,5 @@ const {sumTokensExport} = require("../helper/unwrapLPs") -const Addresses = require('./addresses.js'); -const Contracts = Addresses.Contracts; -const Tokens = Addresses.Tokens +const { Tokens } = require('./addresses.js') const WALLET_GNOSIS_DAO_eth = '0x849d52316331967b6ff1198e5e32a0eb168d039d' const WALLET_GNOSIS_LTD_eth = '0x4971dd016127f390a3ef6b956ff944d0e2e1e462'