added crank.sh and updated to client 0.1.6
This commit is contained in:
parent
03b65ff48c
commit
3f39a1692b
|
@ -0,0 +1,30 @@
|
||||||
|
source ~/mango-client-ts/devnet.env
|
||||||
|
|
||||||
|
DEX_PROGRAM_ID=$(cat ~/mango-client-ts/src/ids.json | jq .devnet.dex_program_id -r)
|
||||||
|
|
||||||
|
MARKET_STR="${1^^}/${2^^}"
|
||||||
|
|
||||||
|
if [ $MARKET_STR = "BTC/USDT" ]; then
|
||||||
|
MARKET=$(cat ~/mango-client-ts/src/ids.json | jq '.devnet.spot_markets|.["BTC/USDT"]' -r)
|
||||||
|
BASE_WALLET=$BTC_WALLET
|
||||||
|
QUOTE_WALLET=$USDT_WALLET
|
||||||
|
elif [ $MARKET_STR = "ETH/USDT" ]; then
|
||||||
|
MARKET=$(cat ~/mango-client-ts/src/ids.json | jq '.devnet.spot_markets|.["ETH/USDT"]' -r)
|
||||||
|
BASE_WALLET=$ETH_WALLET
|
||||||
|
QUOTE_WALLET=$USDT_WALLET
|
||||||
|
elif [ $MARKET_STR = "BTC/USDC" ]; then
|
||||||
|
MARKET=$(cat ~/mango-client-ts/src/ids.json | jq '.devnet.spot_markets|.["BTC/USDC"]' -r)
|
||||||
|
BASE_WALLET=$BTC_WALLET
|
||||||
|
QUOTE_WALLET=$USDC_WALLET
|
||||||
|
elif [ $MARKET_STR = "ETH/USDC" ]; then
|
||||||
|
MARKET=$(cat ~/mango-client-ts/src/ids.json | jq '.devnet.spot_markets|.["ETH/USDC"]' -r)
|
||||||
|
BASE_WALLET=$ETH_WALLET
|
||||||
|
QUOTE_WALLET=$USDC_WALLET
|
||||||
|
else
|
||||||
|
echo "invalid args"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
cd ~/blockworks-foundation/serum-dex/dex/crank
|
||||||
|
|
||||||
|
cargo run -- $CLUSTER consume-events --dex-program-id $DEX_PROGRAM_ID --payer $KEYPAIR --market $MARKET --coin-wallet $BASE_WALLET --pc-wallet $QUOTE_WALLET --num-workers 1 --events-per-worker 5 --log-directory .
|
|
@ -31,7 +31,7 @@
|
||||||
"typescript": "^4.0.5"
|
"typescript": "^4.0.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blockworks-foundation/mango-client": "git+https://github.com/blockworks-foundation/mango-client-ts.git",
|
"@blockworks-foundation/mango-client": "^0.1.6",
|
||||||
"@project-serum/serum": "^0.13.20",
|
"@project-serum/serum": "^0.13.20",
|
||||||
"@solana/spl-token": "0.0.13",
|
"@solana/spl-token": "0.0.13",
|
||||||
"@solana/web3.js": "^0.90.0",
|
"@solana/web3.js": "^0.90.0",
|
||||||
|
|
17
yarn.lock
17
yarn.lock
|
@ -314,9 +314,10 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@blockworks-foundation/mango-client@git+https://github.com/blockworks-foundation/mango-client-ts.git":
|
"@blockworks-foundation/mango-client@^0.1.6":
|
||||||
version "0.1.5"
|
version "0.1.6"
|
||||||
resolved "git+https://github.com/blockworks-foundation/mango-client-ts.git#240f5a05b5ca45a896b7cb4dd29cb104470e2b5f"
|
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-0.1.6.tgz#d12831e6b3c525f3903d840bcf41ef9779e5129e"
|
||||||
|
integrity sha512-5XBMnZza5PkOEpYl2crY1sSQQ4Bx7kimcJvHvcNngy+9tPh3CtWLnArCjUEmKqT1bo8rnG+7qtHrr/LfY65Peg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@project-serum/serum" "^0.13.20"
|
"@project-serum/serum" "^0.13.20"
|
||||||
"@project-serum/sol-wallet-adapter" "^0.1.4"
|
"@project-serum/sol-wallet-adapter" "^0.1.4"
|
||||||
|
@ -752,9 +753,9 @@
|
||||||
integrity sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==
|
integrity sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*":
|
||||||
version "14.14.32"
|
version "14.14.34"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.32.tgz#90c5c4a8d72bbbfe53033f122341343249183448"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.34.tgz#07935194fc049069a1c56c0c274265abeddf88da"
|
||||||
integrity sha512-/Ctrftx/zp4m8JOujM5ZhwzlWLx22nbQJiVqz8/zE15gOeEW+uly3FSX4fGFpcfEvFzXcMCJwq9lGVWgyARXhg==
|
integrity sha512-dBPaxocOK6UVyvhbnpFIj2W+S+1cBTkHQbFQfeeJhoKFbzYcVUGHvddeWPSucKATb3F0+pgDq0i6ghEaZjsugA==
|
||||||
|
|
||||||
"@types/node@^12.12.54":
|
"@types/node@^12.12.54":
|
||||||
version "12.20.4"
|
version "12.20.4"
|
||||||
|
@ -1204,9 +1205,9 @@ boolbase@~1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
|
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
|
||||||
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
|
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
|
||||||
|
|
||||||
"borsh@https://github.com/defactojob/borsh-js#field-mapper":
|
"borsh@git+https://github.com/defactojob/borsh-js.git#field-mapper":
|
||||||
version "0.3.1"
|
version "0.3.1"
|
||||||
resolved "https://github.com/defactojob/borsh-js#33a0d24af281112c0a48efb3fa503f3212443de9"
|
resolved "git+https://github.com/defactojob/borsh-js.git#33a0d24af281112c0a48efb3fa503f3212443de9"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/bn.js" "^4.11.5"
|
"@types/bn.js" "^4.11.5"
|
||||||
bn.js "^5.0.0"
|
bn.js "^5.0.0"
|
||||||
|
|
Loading…
Reference in New Issue