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

Commit

Permalink
WCSPR<->WETH WETH<->WISER deployment DONE
Browse files Browse the repository at this point in the history
  • Loading branch information
Hammad-Mubeen committed Feb 5, 2022
1 parent ab5f572 commit 1bf7f5f
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 52 deletions.
37 changes: 20 additions & 17 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,31 @@ FACTORY_CONTRACT=32046b7f8ca95d736e6f3fc0daa4ef636d21fc5f79cd08b5e6e4fb57df9238b
FACTORY_CONTRACT_PACKAGE=d2cc3ac0c9c364ec0b8e969bd09eb151f9e1b57eecddb900e85abadf2332ebef
WCSPR=b761da7d5ef67f8825c30c40df8b72feca4724eb666dba556b0e3f67778143e0
LIBRARY=8818a55ed42deda94f42ecb6e9f92a0f0f03c21ddf639175bd6eb2a018b48ee6
PAIR_CONTRACT=cabce28fc7f7bb496c47ea56ae6ce62b17c7b9149afc3b3b32d863e5885070f6
PAIR_CONTRACT_PACKAGE=ee4bc7fae72edec25c5734827dff63e400a36b76ea67968962742401b926581d
PAIR_CONTRACT=211b738feab8d6ee556899e121974451d12555990e4563ea8a34dea7c4ae2e5b
PAIR_CONTRACT_PACKAGE=88c13c8b221a5ebb0185c1abac91a43ce56f4b5a14ee22ed131d855d9c02f3aa
CALLEE_CONTRACT=fbfeda8b97f056f526f20c2fc2b486d9bdbfb3e46b9a164527e57c0c86e68612
TOKEN0_CONTRACT=b761da7d5ef67f8825c30c40df8b72feca4724eb666dba556b0e3f67778143e0
TOKEN0_CONTRACT_PACKAGE=a4c27e29288ef154be20158f4049b4f150333d96070b3727e6f4ec9ef5d3f875
TOKEN1_CONTRACT=6ab4a5bf100fb9f444a12e92c663e3cf65a8c3ef4523cb2f80bed4fd41f85706
TOKEN1_CONTRACT_PACKAGE=82645cc07bc18ca1b3e165a021180a4de65e2f76f312162c1fe45588b835090b
TOKEN0_CONTRACT=f869f4327bf21e739644001527318fccb8c14e814afa288be156af2a32eb0f2b
TOKEN0_CONTRACT_PACKAGE=904d8b11b76b59aacfd1869b7dc1f78d876e5d6ab91c3abeb501d59a1d14c705
TOKEN1_CONTRACT=1853ea67e80caaf81a8d96ff28ce3aaf105080f0299d9b7b7c0cb36064ee1fa9
TOKEN1_CONTRACT_PACKAGE=fb5a4d8da9c112c68ffac693fece6ab3b3d1526ff97f491e398382a9fe9da6c8

WCSPR_CONTRACT=b761da7d5ef67f8825c30c40df8b72feca4724eb666dba556b0e3f67778143e0
WCSPR_CONTRACT_PACKAGE=a4c27e29288ef154be20158f4049b4f150333d96070b3727e6f4ec9ef5d3f875

WISE_CONTRACT=1853ea67e80caaf81a8d96ff28ce3aaf105080f0299d9b7b7c0cb36064ee1fa9
WISE_CONTRACT_PACKAGE=fb5a4d8da9c112c68ffac693fece6ab3b3d1526ff97f491e398382a9fe9da6c8

USDC_CONTRACT=6ab4a5bf100fb9f444a12e92c663e3cf65a8c3ef4523cb2f80bed4fd41f85706
USDC_CONTRACT_PACKAGE=82645cc07bc18ca1b3e165a021180a4de65e2f76f312162c1fe45588b835090b
WETH_CONTRACT=f869f4327bf21e739644001527318fccb8c14e814afa288be156af2a32eb0f2b
WETH_CONTRACT_PACKAGE=904d8b11b76b59aacfd1869b7dc1f78d876e5d6ab91c3abeb501d59a1d14c705

WCSPR_WISE_CONTRACT=53a8121f219ad2c6420f007a2016ed320c519579112b81d505cb15715404b264
WCSPR_WISE_CONTRACT_PACKAGE=26526c30383e5c02d684ac68d7845e576a87166926f7500bdaa303cdab52aea7

WCSPR_USDC_CONTRACT=cabce28fc7f7bb496c47ea56ae6ce62b17c7b9149afc3b3b32d863e5885070f6
WCSPR_USDC_CONTRACT_PACKAGE=ee4bc7fae72edec25c5734827dff63e400a36b76ea67968962742401b926581d
WCSPR_WETH_CONTRACT=be2a69ab8576257c1ddfdac0f7b8be738146ea70a8dbf407efd2c741821b5e21
WCSPR_WETH_CONTRACT_PACKAGE=f918c159eefe2e18e3720a6cc4adf90fd37c3310c907b3736482fe843c14cccc

WETH_WISE_CONTRACT=211b738feab8d6ee556899e121974451d12555990e4563ea8a34dea7c4ae2e5b
WETH_WISE_CONTRACT_PACKAGE=88c13c8b221a5ebb0185c1abac91a43ce56f4b5a14ee22ed131d855d9c02f3aa

GRAPHQL=https://casper-uniswap-v2-graphql.herokuapp.com/graphql
CHAIN_NAME=casper-test
Expand All @@ -48,8 +50,8 @@ PAIR_MASTER_KEY_PAIR_PATH=JsClients/PAIR/keys/
MASTER_KEY_PAIR_PATH=JsClients/ROUTER/keys/

ERC20_CONTRACT_NAME=erc20
ERC20_TOKEN_NAME=WISE
ERC20_TOKEN_SYMBOL=WISE
ERC20_TOKEN_NAME=WETH
ERC20_TOKEN_SYMBOL=WETH
ERC20_DECIMALS=9
ERC20_TOTAL_SUPPLY=0

Expand All @@ -66,7 +68,7 @@ FACTORY_INSTALL_PAYMENT_AMOUNT=150000000000
PAIR_INSTALL_PAYMENT_AMOUNT=300000000000

MINT_PAYMENT_AMOUNT=5000000000
MINT_AMOUNT=1000000000000
MINT_AMOUNT=105425240000000000000

BURN_PAYMENT_AMOUNT=5000000000
BURN_AMOUNT=5
Expand Down Expand Up @@ -117,10 +119,11 @@ TO = 8b217a09296d5ce360847a7d20f623476157c5f022333c4e988a464035cadd80
DEADLINE = 1739598100811
# add_liquidity

TOKEN_A = b761da7d5ef67f8825c30c40df8b72feca4724eb666dba556b0e3f67778143e0
TOKEN_B = 6ab4a5bf100fb9f444a12e92c663e3cf65a8c3ef4523cb2f80bed4fd41f85706
AMOUNT_A_DESIRED = 8000000000
AMOUNT_B_DESIRED = 1000000000
TOKEN_A = f869f4327bf21e739644001527318fccb8c14e814afa288be156af2a32eb0f2b
TOKEN_B = 1853ea67e80caaf81a8d96ff28ce3aaf105080f0299d9b7b7c0cb36064ee1fa9

AMOUNT_A_DESIRED = 1000000000
AMOUNT_B_DESIRED = 105425240000000
AMOUNT_A_MIN = 100000
AMOUNT_B_MIN = 100000

Expand Down
26 changes: 13 additions & 13 deletions JsClients/ERC20/test/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ const test = async () => {
EVENT_STREAM_ADDRESS!
);

// const installDeployHash = await erc20.install(
// KEYS,
// ERC20_TOKEN_NAME!,
// ERC20_TOKEN_SYMBOL!,
// ERC20_DECIMALS!,
// ERC20_TOTAL_SUPPLY!,
// ERC20_CONTRACT_NAME!,
// ERC20_INSTALL_PAYMENT_AMOUNT!,
// ERC20_WASM_PATH!
// );
const installDeployHash = await erc20.install(
KEYS,
ERC20_TOKEN_NAME!,
ERC20_TOKEN_SYMBOL!,
ERC20_DECIMALS!,
ERC20_TOTAL_SUPPLY!,
ERC20_CONTRACT_NAME!,
ERC20_INSTALL_PAYMENT_AMOUNT!,
ERC20_WASM_PATH!
);

// console.log(`... Contract installation deployHash: ${installDeployHash}`);
console.log(`... Contract installation deployHash: ${installDeployHash}`);

// await getDeploy(NODE_ADDRESS!, installDeployHash);
await getDeploy(NODE_ADDRESS!, installDeployHash);

// console.log(`... Contract installed successfully.`);
console.log(`... Contract installed successfully.`);

let accountInfo = await utils.getAccountInfo(NODE_ADDRESS!, KEYS.publicKey);

Expand Down
38 changes: 19 additions & 19 deletions JsClients/ERC20/test/installed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ const test = async () => {
// console.log(`... Allowance: ${allowance}`);

//mint
// const mintDeployHash = await erc20.mint(
// ROUTERKEYS,
// ROUTERKEYS.publicKey,
// MINT_AMOUNT!,
// MINT_PAYMENT_AMOUNT!
// );
// console.log("... Mint deploy hash: ", mintDeployHash);
const mintDeployHash = await erc20.mint(
ROUTERKEYS,
ROUTERKEYS.publicKey,
MINT_AMOUNT!,
MINT_PAYMENT_AMOUNT!
);
console.log("... Mint deploy hash: ", mintDeployHash);

// await getDeploy(NODE_ADDRESS!, mintDeployHash);
// console.log("... Token minted successfully.");
await getDeploy(NODE_ADDRESS!, mintDeployHash);
console.log("... Token minted successfully.");

// balanceof
// let balance = await erc20.balanceOfcontract(PAIR_CONTRACT!);
Expand All @@ -133,16 +133,16 @@ const test = async () => {
// // console.log(`... Total supply: ${totalSupply}`);

//approve
// const approveDeployHash = await erc20.approve(
// ROUTERKEYS,
// PACKAGE_HASH!,
// AMOUNT_B_DESIRED!,
// APPROVE_PAYMENT_AMOUNT!
// );
// console.log("... Approve deploy hash: ", approveDeployHash);
const approveDeployHash = await erc20.approve(
ROUTERKEYS,
PACKAGE_HASH!,
AMOUNT_B_DESIRED!,
APPROVE_PAYMENT_AMOUNT!
);
console.log("... Approve deploy hash: ", approveDeployHash);

// await getDeploy(NODE_ADDRESS!, approveDeployHash);
// console.log("... Token approved successfully");
await getDeploy(NODE_ADDRESS!, approveDeployHash);
console.log("... Token approved successfully");

// // //transfer
// // const transferDeployHash = await erc20.transfer(
Expand Down Expand Up @@ -172,7 +172,7 @@ const test = async () => {
};


//test();
// test();

export const getName = async (contractHash:string) => {

Expand Down
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-----
MCowBQYDK2VwAyEA+do3V4WYtns0Fo1Pf515rpcb13KxTZ2CqE0fO2EwLI0=
MCowBQYDK2VwAyEAkiDYds03hKjSdfJng8iSp3bx4V/aEbDAYJt6Ny+cz9Q=
-----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 @@
01f9da37578598b67b34168d4f7f9d79ae971bd772b14d9d82a84d1f3b61302c8d
019220d876cd3784a8d275f26783c892a776f1e15fda11b0c0609b7a372f9ccfd4
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-----
MC4CAQAwBQYDK2VwBCIEIFRzYRkz4v3gXo9Y6NyX4tfnwCXMpPxcC5NY7hcIlih/
MC4CAQAwBQYDK2VwBCIEINn5R/VQW1MUs0NC5XmmN7SBAgZIx9v4ModUIPb6Pc64
-----END PRIVATE KEY-----

0 comments on commit 1bf7f5f

Please sign in to comment.