Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
latest code with stable coins database added and tested
Browse files Browse the repository at this point in the history
  • Loading branch information
Hammad-Mubeen committed Dec 20, 2021
1 parent 5ebbcf9 commit 25a288e
Show file tree
Hide file tree
Showing 39 changed files with 85 additions and 86 deletions.
63 changes: 31 additions & 32 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ NODE_MODE=deployed
DATABASE_URL_LOCAL=mongodb://localhost:27017/V2-graphQL
DATABASE_URL_ONLINE=mongodb+srv://admin:[email protected]/V2-graphQL-backend-demo?retryWrites=true&w=majority

FACTORY_CONTRACT=202dffe0821C291870c864378c38fCE0BC4Fe7EA571341c62243e92608005BEe
FACTORY_CONTRACT_PACKAGE=6fb092b2Da2Dc4C7Eb238E3770933A6C1Cd8B6bEcf7c0F7ABc89ecCB91682ffF
PAIR_CONTRACT=93855DECcfcD71b5d181ECf71e1987E353EE8eF75C25ED226172a2770d38d328
PAIR_CONTRACT_PACKAGE=1D1b6671a573dFa566F75231eb058031DEf09C5c34E4Ac82C34a35fAf42cC6bf
FACTORY_CONTRACT=Feb336a5487f160DA388d878296C9043Ab29b50daE9756675FD332408275bBeB
FACTORY_CONTRACT_PACKAGE=315A4d4d50132831DFD82bc3eB4f49Ec4E7CE6985b0dD57C43F075FFA4323853
PAIR_CONTRACT=8E617aB8536AeF351eDc422F41F4FF1ECf26d27329D6df667e75381D49Aa65e2
PAIR_CONTRACT_PACKAGE=FE1EAd1b5970755D2e636E78c29eA9e31fA13DC4E03DA7A3db0C6F6dceaa56a4
CALLEE_CONTRACT=fbfeda8b97f056f526f20c2fc2b486d9bdbfb3e46b9a164527e57c0c86e68612
TOKEN0_CONTRACT=a29715B3d683D5D36F46AfaD71b8f7eaAb7B3c7aE554A86a09c6B101fa7264A0
TOKEN0_CONTRACT_PACKAGE=B9F554b50D64bed3AbBD50dc11D368B5682ceC62faC5b235b190b05d4be16158
TOKEN1_CONTRACT=2C2DeECA03Aa772E44189F6529dcad4380C5617D9F1f3C662a48cfc10Da2588A
TOKEN1_CONTRACT_PACKAGE=d59E12EEdeC37CCC70b3b58d85828B020b8311AE8D423Ab0f7da02b1fEd55B8A
TOKEN0_CONTRACT=635b24a7455FC130413eEA8f14D26A3BA8a92f96347E71F12B37cfA41Ff161f1
TOKEN0_CONTRACT_PACKAGE=08dded65ea4c74269C471a1accfE358e48A05A191AC94d98fb16c1f15531fB4F
TOKEN1_CONTRACT=cd3aE802766D8b4Dbfb6bE9aA1c00983D4B8547e93564fd460b34630D1C9fd12
TOKEN1_CONTRACT_PACKAGE=33A09555898Bd59822eBe134f9Ee5377c7fDC48c0161Da8c4fAe1A0B1a92429d

WETH_CONTRACT=2C2DeECA03Aa772E44189F6529dcad4380C5617D9F1f3C662a48cfc10Da2588A
WETH_CONTRACT_PACKAGE=d59E12EEdeC37CCC70b3b58d85828B020b8311AE8D423Ab0f7da02b1fEd55B8A
WETH_CONTRACT=b0F4A61cdD8F0995cE84185598CB8A59682A20fa5C5FF95c00EFd268AE62AccF
WETH_CONTRACT_PACKAGE=40c305D8c156D96669a7c2a2843624923Feed0b869DE5136fAa9964E1be0AfaB

DAI_CONTRACT=a29715B3d683D5D36F46AfaD71b8f7eaAb7B3c7aE554A86a09c6B101fa7264A0
DAI_CONTRACT_PACKAGE=B9F554b50D64bed3AbBD50dc11D368B5682ceC62faC5b235b190b05d4be16158
DAI_CONTRACT=22b311471Fc4CeBA1b10204A4939A7772483C017CE74a1807f053D69F813714F
DAI_CONTRACT_PACKAGE=a05337e453FCeef5C75e8F85254B441Ec1BeC13AbEC9Cc9Ada0a7A2b9400Fb3f

USDC_CONTRACT=EE26EFaD06408306D167fD2DB83bf00fEef8268C50a8AAbEA8cfDF18A2C4EFB8
USDC_CONTRACT_PACKAGE=6E3390030139474Acc0c461ab8Ddf7416A8E1112DDaB90E3A6a337B7929571E3
USDC_CONTRACT=5572759df79b1DbaE68270FbAd493dcFBc477097C63eEE88f3b57Bd07F5013b5
USDC_CONTRACT_PACKAGE=1026614f9E470CEfc3c22617A6F10f98035AfBd52F3622A286521537A055851A

USDT_CONTRACT=077075BD6876a372cC2A60B078aD95C8B49Bd953C9C76d1b90D437Bf9c0369c3
USDT_CONTRACT_PACKAGE=57b3af09CC84B8233CE3dDe6B16db2612e2E03fc885DFeA4626A4c56FB1C5a8E
USDT_CONTRACT=F8D63B789784e150018dEc41236BeaF018061AFa44AA85E4A6e3D3d7Eaa13B07
USDT_CONTRACT_PACKAGE=85A2a3144fD921732f90BC538a3457e04E329ea5Ac5976372cfC910f94D345bA

WETH_DAI_CONTRACT=93855DECcfcD71b5d181ECf71e1987E353EE8eF75C25ED226172a2770d38d328
WETH_DAI_CONTRACT_PACKAGE=1D1b6671a573dFa566F75231eb058031DEf09C5c34E4Ac82C34a35fAf42cC6bf
WETH_DAI_CONTRACT=F41eea03821F59de6a3d48161dA1ba267Fc4048B7d6761Cb18E80C5C68049388
WETH_DAI_CONTRACT_PACKAGE=f2Ae63407dea00ebD03cC7ff5DB5EC9f1e266f9C6A0e7890D6fC1940Cf5FD9c2

WETH_USDC_CONTRACT=D1aAfd97D233249aab1F8a8Bd7a9D30f411ADd645bD29Dd02fe4610300e80A31
WETH_USDC_CONTRACT_PACKAGE=03733EECb9a6c0701c47B1B5c4926D445CE087FeFf2AE4d3d226b82C6468C7DA
WETH_USDC_CONTRACT=d56974F48C484D73dD61b6C34Ec532123bF11C231600e8fb1F6D349D52658700
WETH_USDC_CONTRACT_PACKAGE=7BD3e65A2aAb62c8f467ef4eb581E3C50cA445428bEF75eBCe697232da7dB104

WETH_USDT_CONTRACT=e40798524C0d6F7c7a82B74Bc097e8daC114e30b1daC9CDfF91a1bCB6FDC02c1
WETH_USDT_CONTRACT_PACKAGE=81f7788FAd812C0bCE553B38F30a279a769d712cB01a9C052C6d99959DBD6F33
WETH_USDT_CONTRACT=d94b6EF6f2d47C7A054dfF699CB0B3A8294AE7221107aF837F9A78Fc3e795f72
WETH_USDT_CONTRACT_PACKAGE=7bf128904dD425CB9bCCD910A83dF6B7FAA565249f2CA77bFDFA06E8676bC940


GRAPHQL=http://localhost:3000/graphql
Expand All @@ -51,9 +51,9 @@ PAIR_MASTER_KEY_PAIR_PATH=JsClients/PAIR/keys/
MASTER_KEY_PAIR_PATH=JsClients/ROUTER/keys/

ERC20_CONTRACT_NAME=erc20
ERC20_TOKEN_NAME=USDT
ERC20_TOKEN_SYMBOL=USDT
ERC20_DECIMALS=6
ERC20_TOKEN_NAME=token1
ERC20_TOKEN_SYMBOL=erc
ERC20_DECIMALS=18
ERC20_TOTAL_SUPPLY=0

PAIR_CONTRACT_NAME=pair
Expand Down Expand Up @@ -103,13 +103,13 @@ TOKEN_NAME=uniswap-router
TOKEN_SYMBOL=DRAG
TOKEN_META=origin fire,lifetime infinite

FACTORY=202dffe0821C291870c864378c38fCE0BC4Fe7EA571341c62243e92608005BEe
FACTORY=Feb336a5487f160DA388d878296C9043Ab29b50daE9756675FD332408275bBeB
WCSPR=Dd511B90c7f6eacd2F74f8A1B25305a2902e3554f7489e30ca0b19247AEAb031
LIBRARY=a1f2C4107B70AcefDf2A7A56A9F0B3B0839880CEF70869DBf829a8b5d25C0Bf7
CONTRACT_NAME=UniSwapRouter

CONTRACT_HASH=16031d08B9C92c20F9c702b2913091b701140371555f28323e031629F8298015
PACKAGE_HASH=66308522273D7Bc35bB99BD7cC4fB9156A2d2B2d4B3C846762BA8FDc44A9c89a
CONTRACT_HASH=72756eCa24936bABED4aF0d73D164351DD36374C549ba07537dd3917c320cE2E
PACKAGE_HASH=4c49499E985c2Adc03a200a80196E9cE1dA3d08D81BaE9Aa898BbE6dffd79B73
INSTALL_PAYMENT_AMOUNT=200000000000
MINT_ONE_PAYMENT_AMOUNT=2000000000
MINT_COPIES_PAYMENT_AMOUNT=100000000000
Expand All @@ -120,18 +120,17 @@ MINT_COPIES_COUNT=20
MINT_MANY_META_SIZE=5
MINT_MANY_META_COUNT=5

TO = a29715B3d683D5D36F46AfaD71b8f7eaAb7B3c7aE554A86a09c6B101fa7264A0
TO = 635b24a7455FC130413eEA8f14D26A3BA8a92f96347E71F12B37cfA41Ff161f1
DEADLINE = 1739598100811
# add_liquidity

TOKEN_A = a29715B3d683D5D36F46AfaD71b8f7eaAb7B3c7aE554A86a09c6B101fa7264A0
TOKEN_B = 2C2DeECA03Aa772E44189F6529dcad4380C5617D9F1f3C662a48cfc10Da2588A
TOKEN_A = 635b24a7455FC130413eEA8f14D26A3BA8a92f96347E71F12B37cfA41Ff161f1
TOKEN_B = cd3aE802766D8b4Dbfb6bE9aA1c00983D4B8547e93564fd460b34630D1C9fd12
AMOUNT_A_DESIRED = 500
AMOUNT_B_DESIRED = 600
AMOUNT_A_MIN = 250
AMOUNT_B_MIN = 300


# add_liquidity_cspr
TOKEN = 301167268ec00eeb7edf7d12d9419921e15dbd7b145e454d94540aa91c260edb
AMOUNT_TOKEN_DESIRED = 500
Expand Down
2 changes: 1 addition & 1 deletion JsClients/ERC20/keys/public_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAyIk/KQZh7OKw6ssepaTb25zoOvP6M2T5W4JP5IcOgiY=
MCowBQYDK2VwAyEALL3X/DHIFDBLlC2KxLdViyhGpsITRk9CC2z/dZGNwbo=
-----END PUBLIC KEY-----
2 changes: 1 addition & 1 deletion JsClients/ERC20/keys/public_key_hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
01c8893f290661ece2b0eacb1ea5a4dbdb9ce83af3fa3364f95b824fe4870e8226
012cbdd7fc31c814304b942d8ac4b7558b2846a6c213464f420b6cff75918dc1ba
2 changes: 1 addition & 1 deletion JsClients/ERC20/keys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIIB/afg6EcaiWg+RLrYRuJ8WZ0a2GuqvQwvUSjDwJ6mG
MC4CAQAwBQYDK2VwBCIEIJ2oD3148IO8k5o4CXd0SEmC4cOwtQNp4hO0OMYGY+g6
-----END PRIVATE KEY-----
2 changes: 1 addition & 1 deletion JsClients/FACTORY/keys/public_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAsLAS66aiHSfOFII7qfF/qrlaDL3ds2ERZkmAVnuU2aE=
MCowBQYDK2VwAyEA1+OwE9RelRF3eORZ3e4iUWIW1W883H+LOXwzWrZqbVA=
-----END PUBLIC KEY-----
2 changes: 1 addition & 1 deletion JsClients/FACTORY/keys/public_key_hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
01b0b012eba6a21d27ce14823ba9f17faab95a0cbdddb36111664980567b94d9a1
01d7e3b013d45e95117778e459ddee22516216d56f3cdc7f8b397c335ab66a6d50
2 changes: 1 addition & 1 deletion JsClients/FACTORY/keys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIJOWsLA4eBrtuReW6+06TpsPYEk1a409ChBTQoTzzpw2
MC4CAQAwBQYDK2VwBCIEILl9vXz3VhH+hkAP2AWLl6j7ODQKTRcOKiEhKwTMzU/Z
-----END PRIVATE KEY-----
2 changes: 1 addition & 1 deletion JsClients/FACTORY/src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class FACTORYClient {
);
return result.value();
}

public async getPair(tokenA: String, tokenB: String) {

const tokenAContractHash = new CLByteArray(Uint8Array.from(Buffer.from(tokenA, 'hex')));
Expand Down
2 changes: 1 addition & 1 deletion JsClients/FACTORY/test/installed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,4 @@ export const getPair = async (contractHash:string,TOKEN0_CONTRACT:string,TOKEN1_
return pair;

};

//getPair("202dffe0821C291870c864378c38fCE0BC4Fe7EA571341c62243e92608005BEe","4ae77D7D5ae22b60fC9CA97d952617C1f312b9740771E0e380Da909Bf8A8e2f2","c71567459Ba27504318e44948891cF42eb506b4BE1d31B81eA0280a65a22A3D9");
2 changes: 1 addition & 1 deletion JsClients/PAIR/keys/public_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEA8NpIG/A3BM4sTwBpvzwd2lLSbxkOwV9EgB2zNyF+jGE=
MCowBQYDK2VwAyEAQNtKh0ylHmSZUIbTnJuiit4EnohD0eeJ4TZp3nFtk9Y=
-----END PUBLIC KEY-----
2 changes: 1 addition & 1 deletion JsClients/PAIR/keys/public_key_hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
01f0da481bf03704ce2c4f0069bf3c1dda52d26f190ec15f44801db337217e8c61
0140db4a874ca51e64995086d39c9ba28ade049e8843d1e789e13669de716d93d6
2 changes: 1 addition & 1 deletion JsClients/PAIR/keys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEICkMp/OULXfRk3vNYWtqMsfTC4YGuhtFGZd/pBCCy0G+
MC4CAQAwBQYDK2VwBCIEICfW+upRlenPvqwo+WC1pO/hqBdNz89jk49DczFA242n
-----END PRIVATE KEY-----
2 changes: 1 addition & 1 deletion JsClients/ROUTER/keys/public_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAxPrtvPjJMutf5UZ9ZXi7Hpe6kAOiOv5+chnOS7Q3xog=
MCowBQYDK2VwAyEA7/psTmqMpHP9Qa7WsOpobZTYRpqLgiBAm1PR1i0r/n0=
-----END PUBLIC KEY-----
2 changes: 1 addition & 1 deletion JsClients/ROUTER/keys/public_key_hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
01c4faedbcf8c932eb5fe5467d6578bb1e97ba9003a23afe7e7219ce4bb437c688
01effa6c4e6a8ca473fd41aed6b0ea686d94d8469a8b8220409b53d1d62d2bfe7d
2 changes: 1 addition & 1 deletion JsClients/ROUTER/keys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIEEGMR2DKgjA/FWPa/KHyoJ80mnDachq9JzVbwIuIUw7
MC4CAQAwBQYDK2VwBCIEIE6qeWIPHTdUrPVEFu9RRaizeEG64llEZJm5MPAeY5tI
-----END PRIVATE KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/erc20keys/public_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAmqT9AONEBlbpbD0n5LVY0+aGb9Wk/ww4W4whlDS/GIA=
MCowBQYDK2VwAyEALL3X/DHIFDBLlC2KxLdViyhGpsITRk9CC2z/dZGNwbo=
-----END PUBLIC KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/erc20keys/public_key_hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
019aa4fd00e3440656e96c3d27e4b558d3e6866fd5a4ff0c385b8c219434bf1880
012cbdd7fc31c814304b942d8ac4b7558b2846a6c213464f420b6cff75918dc1ba
2 changes: 1 addition & 1 deletion JsClients/keys/erc20keys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIBkogB4ZgMcSrMq20nt3xXMQs/yXH3ASt/SPSJ73jaGz
MC4CAQAwBQYDK2VwBCIEIJ2oD3148IO8k5o4CXd0SEmC4cOwtQNp4hO0OMYGY+g6
-----END PRIVATE KEY-----
3 changes: 3 additions & 0 deletions JsClients/keys/extrakeys/public_key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEA3+dK57Rtp6tCa8ok1Tc7nsBk58+yRje2BOR/jpXRd9M=
-----END PUBLIC KEY-----
1 change: 1 addition & 0 deletions JsClients/keys/extrakeys/public_key_hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
01dfe74ae7b46da7ab426bca24d5373b9ec064e7cfb24637b604e47f8e95d177d3
3 changes: 3 additions & 0 deletions JsClients/keys/extrakeys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIAXbC6e4WdEjVyRrAD3RxaSDzw+vjnjoXfcYZXvZ/eS6
-----END PRIVATE KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/factorykeys/public_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAsLAS66aiHSfOFII7qfF/qrlaDL3ds2ERZkmAVnuU2aE=
MCowBQYDK2VwAyEA1+OwE9RelRF3eORZ3e4iUWIW1W883H+LOXwzWrZqbVA=
-----END PUBLIC KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/factorykeys/public_key_hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
01b0b012eba6a21d27ce14823ba9f17faab95a0cbdddb36111664980567b94d9a1
01d7e3b013d45e95117778e459ddee22516216d56f3cdc7f8b397c335ab66a6d50
2 changes: 1 addition & 1 deletion JsClients/keys/factorykeys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIJOWsLA4eBrtuReW6+06TpsPYEk1a409ChBTQoTzzpw2
MC4CAQAwBQYDK2VwBCIEILl9vXz3VhH+hkAP2AWLl6j7ODQKTRcOKiEhKwTMzU/Z
-----END PRIVATE KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/pairkeys/public_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAuQuMtVUMhsVG8IcrpiamSivGmWGwbT5c/Y3g7c0UJHM=
MCowBQYDK2VwAyEAQNtKh0ylHmSZUIbTnJuiit4EnohD0eeJ4TZp3nFtk9Y=
-----END PUBLIC KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/pairkeys/public_key_hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
01b90b8cb5550c86c546f0872ba626a64a2bc69961b06d3e5cfd8de0edcd142473
0140db4a874ca51e64995086d39c9ba28ade049e8843d1e789e13669de716d93d6
2 changes: 1 addition & 1 deletion JsClients/keys/pairkeys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEICKLzLvu9Jf/q72EjZ4XThON5k+x7neGeJ+gR/0eqpvg
MC4CAQAwBQYDK2VwBCIEICfW+upRlenPvqwo+WC1pO/hqBdNz89jk49DczFA242n
-----END PRIVATE KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/routerkeys/public_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAxPrtvPjJMutf5UZ9ZXi7Hpe6kAOiOv5+chnOS7Q3xog=
MCowBQYDK2VwAyEA7/psTmqMpHP9Qa7WsOpobZTYRpqLgiBAm1PR1i0r/n0=
-----END PUBLIC KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/routerkeys/public_key_hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
01c4faedbcf8c932eb5fe5467d6578bb1e97ba9003a23afe7e7219ce4bb437c688
01effa6c4e6a8ca473fd41aed6b0ea686d94d8469a8b8220409b53d1d62d2bfe7d
2 changes: 1 addition & 1 deletion JsClients/keys/routerkeys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIEEGMR2DKgjA/FWPa/KHyoJ80mnDachq9JzVbwIuIUw7
MC4CAQAwBQYDK2VwBCIEIE6qeWIPHTdUrPVEFu9RRaizeEG64llEZJm5MPAeY5tI
-----END PRIVATE KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/stablecoinkeys/public_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAmqT9AONEBlbpbD0n5LVY0+aGb9Wk/ww4W4whlDS/GIA=
MCowBQYDK2VwAyEAFs3RI2a6ola6cfah+AS7gB3ljhRwyOJ5JD5eqESGxRc=
-----END PUBLIC KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/stablecoinkeys/public_key_hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
019aa4fd00e3440656e96c3d27e4b558d3e6866fd5a4ff0c385b8c219434bf1880
0116cdd12366baa256ba71f6a1f804bb801de58e1470c8e279243e5ea84486c517
2 changes: 1 addition & 1 deletion JsClients/keys/stablecoinkeys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIBkogB4ZgMcSrMq20nt3xXMQs/yXH3ASt/SPSJ73jaGz
MC4CAQAwBQYDK2VwBCIEICBEaiC8+ZHwQwcfj0ixrSbgNp/Neo7mB7zMpATARyNG
-----END PRIVATE KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/stablecoinpairkeys/public_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEA8NpIG/A3BM4sTwBpvzwd2lLSbxkOwV9EgB2zNyF+jGE=
MCowBQYDK2VwAyEAQRCCnJYvBjg45F6tiOUmbO1Zto3/PTNQuGDx+H8PxdA=
-----END PUBLIC KEY-----
2 changes: 1 addition & 1 deletion JsClients/keys/stablecoinpairkeys/public_key_hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
01f0da481bf03704ce2c4f0069bf3c1dda52d26f190ec15f44801db337217e8c61
014110829c962f063838e45ead88e5266ced59b68dff3d3350b860f1f87f0fc5d0
2 changes: 1 addition & 1 deletion JsClients/keys/stablecoinpairkeys/secret_key.pem
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEICkMp/OULXfRk3vNYWtqMsfTC4YGuhtFGZd/pBCCy0G+
MC4CAQAwBQYDK2VwBCIEIJQ1lN4GXj9Ss8w7KnaZFraUzq0s8PvQi1hgAD2fCwkL
-----END PRIVATE KEY-----
8 changes: 4 additions & 4 deletions graphql/mutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,8 @@ const handleTransfer = {

if (from != ADDRESS_ZERO && from != pair.id) {
console.log("burn2");
let Balance =await PairContract.balanceOf(args.pairAddress,from.toLowerCase());
//let Balance=2000;
//let Balance =await PairContract.balanceOf(args.pairAddress,from.toLowerCase());
let Balance=2000;
await createLiquidityPosition(args.pairAddress, from, Balance);

let fromUserLiquidityPosition = null;
Expand All @@ -732,8 +732,8 @@ const handleTransfer = {

if (to != ADDRESS_ZERO && to != pair.id) {
console.log("burn3");
let Balance =await PairContract.balanceOf(args.pairAddress,to.toLowerCase());
//let Balance=2000;
//let Balance =await PairContract.balanceOf(args.pairAddress,to.toLowerCase());
let Balance=2000;
await createLiquidityPosition(args.pairAddress, to, Balance);

let toUserLiquidityPosition = null;
Expand Down
19 changes: 10 additions & 9 deletions graphql/pricing.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const {
//UNTRACKED_PAIRS
} = require("./helpers");

const WETH_ADDRESS = "2C2DeECA03Aa772E44189F6529dcad4380C5617D9F1f3C662a48cfc10Da2588A".toLowerCase();
const USDC_WETH_PAIR = "D1aAfd97D233249aab1F8a8Bd7a9D30f411ADd645bD29Dd02fe4610300e80A31".toLowerCase(); // created 10008355
const DAI_WETH_PAIR = "93855DECcfcD71b5d181ECf71e1987E353EE8eF75C25ED226172a2770d38d328".toLowerCase(); // created block 10042267
const USDT_WETH_PAIR = "e40798524C0d6F7c7a82B74Bc097e8daC114e30b1daC9CDfF91a1bCB6FDC02c1".toLowerCase(); // created block 10093341
const WETH_ADDRESS = "b0F4A61cdD8F0995cE84185598CB8A59682A20fa5C5FF95c00EFd268AE62AccF".toLowerCase();
const USDC_WETH_PAIR = "F41eea03821F59de6a3d48161dA1ba267Fc4048B7d6761Cb18E80C5C68049388".toLowerCase(); // created 10008355
const DAI_WETH_PAIR = "d56974F48C484D73dD61b6C34Ec532123bF11C231600e8fb1F6D349D52658700".toLowerCase(); // created block 10042267
const USDT_WETH_PAIR = "d94b6EF6f2d47C7A054dfF699CB0B3A8294AE7221107aF837F9A78Fc3e795f72".toLowerCase(); // created block 10093341

async function getEthPriceInUSD() {
// fetch eth prices for each stablecoin
Expand Down Expand Up @@ -50,10 +50,10 @@ async function getEthPriceInUSD() {

// token where amounts should contribute to tracked volume and liquidity
let WHITELIST = [
"2C2DeECA03Aa772E44189F6529dcad4380C5617D9F1f3C662a48cfc10Da2588A".toLowerCase(), // WETH
"a29715B3d683D5D36F46AfaD71b8f7eaAb7B3c7aE554A86a09c6B101fa7264A0".toLowerCase(), // DAI
"EE26EFaD06408306D167fD2DB83bf00fEef8268C50a8AAbEA8cfDF18A2C4EFB8".toLowerCase(), // USDC
"077075BD6876a372cC2A60B078aD95C8B49Bd953C9C76d1b90D437Bf9c0369c3".toLowerCase(), // USDT
"b0F4A61cdD8F0995cE84185598CB8A59682A20fa5C5FF95c00EFd268AE62AccF".toLowerCase(), // WETH
"22b311471Fc4CeBA1b10204A4939A7772483C017CE74a1807f053D69F813714F".toLowerCase(), // DAI
"5572759df79b1DbaE68270FbAd493dcFBc477097C63eEE88f3b57Bd07F5013b5".toLowerCase(), // USDC
"F8D63B789784e150018dEc41236BeaF018061AFa44AA85E4A6e3D3d7Eaa13B07".toLowerCase(), // USDT
];

// minimum liquidity required to count towards tracked volume for pairs with small # of Lps
Expand All @@ -74,7 +74,8 @@ async function findEthPerToken(token) {
}
// loop through whitelist and check if paired with any
for (let i = 0; i < WHITELIST.length; ++i) {
let pairAddress = await factory.getPair(process.env.FACTORY_CONTRACT,token.id, WHITELIST[i]);
//let pairAddress = await factory.getPair(process.env.FACTORY_CONTRACT,token.id, WHITELIST[i]);
let pairAddress="0000000000000000000000000000000000000000000000000000000000000000";

if (pairAddress != ADDRESS_ZERO) {
let pair = await Pair.findOne({ id: pairAddress });
Expand Down
10 changes: 1 addition & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "ts-node ./bin/www",
"test:erc20install": "ts-node JsClients/ERC20/test/install.ts",
"test:erc20installed": "ts-node JsClients/ERC20/test/installed.ts",
"test:pairinstall": "ts-node JsClients/PAIR/test/install.ts",
"test:pairinstalled": "ts-node JsClients/PAIR/test/installed.ts",
"test:factoryinstall": "ts-node JsClients/FACTORY/test/install.ts",
"test:factoryinstalled": "ts-node JsClients/FACTORY/test/installed.ts",
"test:routerinstall": "ts-node JsClients/ROUTER/test/install.ts",
"test:routerinstalled": "ts-node JsClients/ROUTER/test/installed.ts"
"start": "ts-node ./bin/www"
},
"dependencies": {
"axios": "^0.24.0",
Expand Down

0 comments on commit 25a288e

Please sign in to comment.