From 9a3eb8ea84e25a7a9a4620e70e6eaa8405dc6ac5 Mon Sep 17 00:00:00 2001 From: n3wbie Date: Mon, 4 Dec 2023 21:00:16 +0900 Subject: [PATCH 1/2] feat: multi-msg generator --- _test/multi_msg_generator.ipynb | 380 ++++++++++++++++++++++++++++++++ 1 file changed, 380 insertions(+) create mode 100644 _test/multi_msg_generator.ipynb diff --git a/_test/multi_msg_generator.ipynb b/_test/multi_msg_generator.ipynb new file mode 100644 index 000000000..114394478 --- /dev/null +++ b/_test/multi_msg_generator.ipynb @@ -0,0 +1,380 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "600b6cee-59be-4817-be50-2a6ac0969106", + "metadata": {}, + "outputs": [], + "source": [ + "from string import Template \n", + "\n", + "from datetime import timezone \n", + "import datetime " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "6be7faf1-8c9e-4d07-a9af-ba9af0de0070", + "metadata": {}, + "outputs": [], + "source": [ + "ADDR_GSA = \"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4\"\n", + "ADDR_LP01 = \"g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd\"\n", + "ADDR_LP02 = \"g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq\"\n", + "ADDR_TR01 = \"g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn\"\n", + "\n", + "ADDR_POOL = \"g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w\"\n", + "ADDR_POS = \"g1htpxzv2dkplvzg50nd8fswrneaxmdpwn459thx\"\n", + "ADDR_STAKER = \"g13h5s9utqcwg3a655njen0p89txusjpfrs3vxp8\"\n", + "ADDR_ROUTER = \"g1ernz3lj85hnn3ucug73ymgkhqdv2lg8e4yd48e\"\n", + "ADDR_GOV = \"g1wj5lwwmkru3ky6dh2zztanrcj2ups8g0pfe8cu\"\n", + "\n", + "TX_EXPIRE = 9999999999" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "d9a73750-4014-4980-9ae8-5d6e8a31a1e0", + "metadata": {}, + "outputs": [], + "source": [ + "# def deployer()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4ca8146c-5126-44e8-aacc-25b91703b8a9", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "3c65e446-26c3-44d7-b1b8-5a1f8c157516", + "metadata": {}, + "outputs": [], + "source": [ + "t = Template('{\"@type\":\"/vm.m_call\",\"caller\":\"$caller\",\"send\":\"$send\",\"pkg_path\":\"$pkg_path\",\"func\":\"$func\",\"args\":$args}')\n", + "tna = Template('{\"@type\":\"/vm.m_call\",\"caller\":\"$caller\",\"send\":\"$send\",\"pkg_path\":\"$pkg_path\",\"func\":\"$func\"}')" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "8ca0ce1f-5861-4dc6-b725-eaa9a2c8c8a7", + "metadata": {}, + "outputs": [], + "source": [ + "gsa_msgs = \"\"\n", + "lp01_msgs = \"\"\n", + "lp02_msgs = \"\"\n", + "tr01_msgs = \"\"" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "383891f2-6da2-427c-b9db-b206e6d4ac3f", + "metadata": {}, + "outputs": [], + "source": [ + "def faucet_approve(msgs, caller, pkg_path, spender, amount):\n", + " msg = tna.substitute(caller=caller, send='', pkg_path=pkg_path, func='FaucetL')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " msg = t.substitute(caller=caller, send='', pkg_path=pkg_path, func='Approve', args=f'[\"{spender}\",\"{amount}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " return msgs\n", + "\n", + "def approve(msgs, caller, pkg_path, spender, amount):\n", + " msg = t.substitute(caller=caller, send='', pkg_path=pkg_path, func='Approve', args=f'[\"{spender}\",\"{amount}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " return msgs\n", + "\n", + "lp01_msgs = faucet_approve(lp01_msgs, ADDR_LP01, \"gno.land/r/foo\", ADDR_POOL, 50000000000)\n", + "lp01_msgs = faucet_approve(lp01_msgs, ADDR_LP01, \"gno.land/r/bar\", ADDR_POOL, 50000000000)\n", + "lp01_msgs = faucet_approve(lp01_msgs, ADDR_LP01, \"gno.land/r/baz\", ADDR_POOL, 50000000000)\n", + "lp01_msgs = faucet_approve(lp01_msgs, ADDR_LP01, \"gno.land/r/qux\", ADDR_POOL, 50000000000)\n", + "lp01_msgs = approve(lp01_msgs, ADDR_LP01, \"gno.land/r/wugnot\", ADDR_POOL, 50000000000)\n", + "\n", + "lp02_msgs = faucet_approve(lp02_msgs, ADDR_LP02, \"gno.land/r/foo\", ADDR_POOL, 50000000000)\n", + "lp02_msgs = faucet_approve(lp02_msgs, ADDR_LP02, \"gno.land/r/bar\", ADDR_POOL, 50000000000)\n", + "lp02_msgs = faucet_approve(lp02_msgs, ADDR_LP02, \"gno.land/r/baz\", ADDR_POOL, 50000000000)\n", + "lp02_msgs = faucet_approve(lp02_msgs, ADDR_LP02, \"gno.land/r/qux\", ADDR_POOL, 50000000000)\n", + "lp02_msgs = approve(lp02_msgs, ADDR_LP02, \"gno.land/r/wugnot\", ADDR_POOL, 50000000000)\n", + "\n", + "tr01_msgs = faucet_approve(tr01_msgs, ADDR_TR01, \"gno.land/r/foo\", ADDR_POOL, 50000000000)\n", + "tr01_msgs = faucet_approve(tr01_msgs, ADDR_TR01, \"gno.land/r/bar\", ADDR_POOL, 50000000000)\n", + "tr01_msgs = faucet_approve(tr01_msgs, ADDR_TR01, \"gno.land/r/baz\", ADDR_POOL, 50000000000)\n", + "tr01_msgs = faucet_approve(tr01_msgs, ADDR_TR01, \"gno.land/r/qux\", ADDR_POOL, 50000000000)\n", + "tr01_msgs = approve(tr01_msgs, ADDR_TR01, \"gno.land/r/wugnot\", ADDR_POOL, 50000000000)\n", + "\n", + "\n", + "gsa_msgs = faucet_approve(gsa_msgs, ADDR_GSA, \"gno.land/r/foo\", ADDR_POOL, 50000000000)\n", + "gsa_msgs = faucet_approve(gsa_msgs, ADDR_GSA, \"gno.land/r/bar\", ADDR_POOL, 50000000000)\n", + "gsa_msgs = faucet_approve(gsa_msgs, ADDR_GSA, \"gno.land/r/baz\", ADDR_POOL, 50000000000)\n", + "gsa_msgs = faucet_approve(gsa_msgs, ADDR_GSA, \"gno.land/r/qux\", ADDR_POOL, 50000000000)\n", + "gsa_msgs = faucet_approve(gsa_msgs, ADDR_GSA, \"gno.land/r/gns\", ADDR_POOL, 50000000000)\n", + "\n", + "gsa_msgs = approve(gsa_msgs, ADDR_GSA, \"gno.land/r/gns\", ADDR_POOL, 50000000000)\n", + "gsa_msgs = approve(gsa_msgs, ADDR_GSA, \"gno.land/r/wugnot\", ADDR_STAKER, 50000000000)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "71983033-2dee-4982-bf9e-b93638af09d8", + "metadata": {}, + "outputs": [], + "source": [ + "multi_msg_01 = lp01_msgs[:-1]\n", + "multi_msg_01 = f'\"msg\":[{multi_msg_01}]'\n", + "multi_msg_01 = '{' + multi_msg_01 + ',\"fee\":{\"gas_wanted\":\"9000000\",\"gas_fee\":\"1ugnot\"},\"signatures\":null,\"memo\":\"\"}'\n", + "\n", + "multi_msg_02 = lp02_msgs[:-1]\n", + "multi_msg_02 = f'\"msg\":[{multi_msg_02}]'\n", + "multi_msg_02 = '{' + multi_msg_02 + ',\"fee\":{\"gas_wanted\":\"9000000\",\"gas_fee\":\"1ugnot\"},\"signatures\":null,\"memo\":\"\"}'\n", + "\n", + "multi_msg_03 = tr01_msgs[:-1]\n", + "multi_msg_03 = f'\"msg\":[{multi_msg_03}]'\n", + "multi_msg_03 = '{' + multi_msg_03 + ',\"fee\":{\"gas_wanted\":\"9000000\",\"gas_fee\":\"1ugnot\"},\"signatures\":null,\"memo\":\"\"}'\n", + "\n", + "\n", + "multi_msg_04 = gsa_msgs[:-1]\n", + "multi_msg_04 = f'\"msg\":[{multi_msg_04}]'\n", + "multi_msg_04 = '{' + multi_msg_04 + ',\"fee\":{\"gas_wanted\":\"9000000\",\"gas_fee\":\"1ugnot\"},\"signatures\":null,\"memo\":\"\"}'\n", + "\n", + "lp01_msgs = \"\"\n", + "lp02_msgs = \"\"\n", + "tr01_msgs = \"\"\n", + "gsa_msgs = \"\"\n", + "\n", + "with open(\"multi_msg_01.txt\", \"w\") as f:\n", + " f.write(multi_msg_01)\n", + " \n", + "with open(\"multi_msg_02.txt\", \"w\") as f:\n", + " f.write(multi_msg_02)\n", + " \n", + "with open(\"multi_msg_03.txt\", \"w\") as f:\n", + " f.write(multi_msg_03)\n", + " \n", + "with open(\"multi_msg_04.txt\", \"w\") as f:\n", + " f.write(multi_msg_04)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "fe3f09fa-249b-470e-90b5-2c0c8aef747f", + "metadata": {}, + "outputs": [], + "source": [ + "def pool_init(msgs, caller):\n", + " msg = tna.substitute(caller=caller, send='', pkg_path='gno.land/r/pool', func='InitManual')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " return msgs\n", + " \n", + "gsa_msgs = pool_init(gsa_msgs, ADDR_GSA)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "45ec520c-b0f3-4f0b-9d9f-fda2a8fde3c5", + "metadata": {}, + "outputs": [], + "source": [ + "def pool_create(msgs, caller, tokenA, tokenB, fee, sqrtX96):\n", + " msg = t.substitute(caller=caller, send='', pkg_path='gno.land/r/pool', func='CreatePool', args=f'[\"{tokenA}\",\"{tokenB}\",\"{fee}\",\"{sqrtX96}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " return msgs\n", + "\n", + "gsa_msgs = pool_create(gsa_msgs, ADDR_GSA, \"gnot\", \"gno.land/r/bar\", 100, 101729702841318637793976746270)\n", + "gsa_msgs = pool_create(gsa_msgs, ADDR_GSA, \"gno.land/r/bar\", \"gno.land/r/baz\", 100, 101729702841318637793976746270)\n", + "gsa_msgs = pool_create(gsa_msgs, ADDR_GSA, \"gno.land/r/baz\", \"gno.land/r/qux\", 100, 101729702841318637793976746270)\n", + "\n", + "gsa_msgs = pool_create(gsa_msgs, ADDR_GSA, \"gnot\", \"gno.land/r/bar\", 500, 101729702841318637793976746270)\n", + "gsa_msgs = pool_create(gsa_msgs, ADDR_GSA, \"gno.land/r/bar\", \"gno.land/r/baz\", 500, 101729702841318637793976746270)\n", + "gsa_msgs = pool_create(gsa_msgs, ADDR_GSA, \"gno.land/r/baz\", \"gno.land/r/qux\", 500, 101729702841318637793976746270)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "b1e91bc5-1850-4abe-a95d-5aac9da5a37e", + "metadata": {}, + "outputs": [], + "source": [ + "def position_mint(msgs, caller, send, tokenA, tokenB, fee, minTick, maxTick, maxA, maxB, minA, minB): \n", + " msg = t.substitute(caller=caller, send=send, pkg_path='gno.land/r/position', func='Mint', args=f'[\"{tokenA}\",\"{tokenB}\",\"{fee}\",\"{minTick}\",\"{maxTick}\",\"{maxA}\",\"{maxB}\",\"{minA}\",\"{minB}\",\"{TX_EXPIRE}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + "\n", + " return msgs\n", + "\n", + " \n", + "lp01_msgs = position_mint(lp01_msgs, ADDR_LP01, \"10000000ugnot\", \"gnot\", \"gno.land/r/bar\", 100, 4000, 6000, 10000000, 10000000, 0, 0)\n", + "lp02_msgs = position_mint(lp02_msgs, ADDR_LP02, \"\", \"gno.land/r/bar\", \"gno.land/r/baz\", 100, 4000, 6000, 10000000, 10000000, 0, 0)\n", + "lp02_msgs = position_mint(lp02_msgs, ADDR_LP02, \"\", \"gno.land/r/baz\", \"gno.land/r/qux\", 100, 4000, 6000, 10000000, 10000000, 0, 0)\n", + "\n", + "lp01_msgs = position_mint(lp01_msgs, ADDR_LP01, \"10000000ugnot\", \"gnot\", \"gno.land/r/bar\", 500, 4000, 6000, 10000000, 10000000, 0, 0)\n", + "lp02_msgs = position_mint(lp02_msgs, ADDR_LP02, \"\", \"gno.land/r/bar\", \"gno.land/r/baz\", 500, 4000, 6000, 10000000, 10000000, 0, 0)\n", + "lp02_msgs = position_mint(lp02_msgs, ADDR_LP02, \"\", \"gno.land/r/baz\", \"gno.land/r/qux\", 500, 4000, 6000, 10000000, 10000000, 0, 0)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "703d1455-08a9-4510-8d1b-9da78dc24a09", + "metadata": {}, + "outputs": [], + "source": [ + "def staker_create(msgs, caller, send, targetPath, rewardToken, rewardAmount, startTime, endTime):\n", + " msg = t.substitute(caller=caller, send=send, pkg_path='gno.land/r/staker', func='CreateExternalIncentive', args=f'[\"{targetPath}\",\"{rewardToken}\",\"{rewardAmount}\",\"{startTime}\",\"{endTime}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " return msgs\n", + "\n", + " \n", + "dt = datetime.datetime.now(timezone.utc) \n", + "utc_time = dt.replace(tzinfo=timezone.utc) \n", + "utc_timestamp = utc_time.timestamp() \n", + "\n", + "incentive_start = utc_timestamp\n", + "incentive_end = incentive_start + 100\n", + "\n", + "gsa_msgs = staker_create(gsa_msgs, ADDR_GSA, \"\", \"gno.land/r/bar:gnot:10\", \"gno.land/r/obl\", \"10000000000\", incentive_start, incentive_end)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "1d2df3eb-e451-4d76-9ced-b04f09075f17", + "metadata": {}, + "outputs": [], + "source": [ + "def staker_stake(msgs, caller, tokenId):\n", + " msg = t.substitute(caller=caller, send='', pkg_path='gno.land/r/gnft', func='Approve', args=f'[\"{ADDR_STAKER}\",\"{tokenId}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " msg = t.substitute(caller=caller, send='', pkg_path='gno.land/r/staker', func='StakeToken', args=f'[\"{tokenId}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " return msgs\n", + " \n", + " \n", + "lp01_msgs = staker_stake(lp01_msgs, ADDR_LP01, 1)\n", + "lp02_msgs = staker_stake(lp02_msgs, ADDR_LP02, 2)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "a3e43c08-5cb6-4b2d-9cfc-db4edb528d85", + "metadata": {}, + "outputs": [], + "source": [ + "def pool_set_protocol_fee(msgs, caller, feeA, feeB): \n", + " msg = t.substitute(caller=caller, send='', pkg_path='gno.land/r/pool', func='SetFeeProtocol', args=f'[\"{feeA}\",\"{feeB}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " return msgs\n", + " \n", + " \n", + "gsa_msgs = pool_set_protocol_fee(gsa_msgs, ADDR_GSA, 6, 8)" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "73e9e677-99c6-4f2a-b980-a91fb4e3d2cb", + "metadata": {}, + "outputs": [], + "source": [ + "def router_swap(msgs, caller, send, tokenIn, tokenOut, amountSpecified, swapType, strRoutes, strQuotes, swapResultLimit):\n", + " msg = t.substitute(caller=caller, send=send, pkg_path='gno.land/r/router', func='SwapRoute', args=f'[\"{tokenIn}\",\"{tokenOut}\",\"{amountSpecified}\",\"{swapType}\",\"{strRoutes}\",\"{strQuotes}\",\"{swapResultLimit}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " return msgs\n", + "\n", + " \n", + "tr01_msgs = router_swap(tr01_msgs, ADDR_TR01, \"\", \"gno.land/r/bar\", \"gno.land/r/baz\", 123456, \"EXACT_IN\", \"gno.land/r/bar:gno.land/r/baz:100\", \"100\", 200000)\n", + "tr01_msgs = router_swap(tr01_msgs, ADDR_TR01, \"100000000ugnot\", \"gnot\", \"gno.land/r/qux\", 987654, \"EXACT_OUT\", \"gnot:gno.land/r/bar:100*POOL*gno.land/r/bar:gno.land/r/baz:100*POOL*gno.land/r/baz:gno.land/r/qux:100,gnot:gno.land/r/bar:500*POOL*gno.land/r/bar:gno.land/r/baz:500*POOL*gno.land/r/baz:gno.land/r/qux:500\", \"40,60\", 654321)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "80075f54-d4f1-488c-a1d1-2e6fd83e508c", + "metadata": {}, + "outputs": [], + "source": [ + "def position_collect(msgs, caller, tokenId, recipient, amount0, amount1):\n", + " msg = t.substitute(caller=caller, send='', pkg_path='gno.land/r/position', func='Collect', args=f'[\"{tokenId}\",\"{recipient}\",\"{amount0}\",\"{amount1}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " return msgs\n", + " \n", + "\n", + "lp01_msgs = position_collect(lp01_msgs, ADDR_LP01, 1, ADDR_LP01, 1000000, 1000000)\n", + "lp01_msgs = position_collect(lp01_msgs, ADDR_LP02, 2, ADDR_LP01, 1000000, 1000000)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "9a4bc660-4a16-4c5c-9487-70f7ee745517", + "metadata": {}, + "outputs": [], + "source": [ + "def staker_unstake(msgs, caller, tokenId):\n", + " msg = t.substitute(caller=caller, send='', pkg_path='gno.land/r/staker', func='UnstakeToken', args=f'[\"{tokenId}\"]')\n", + " msgs += msg\n", + " msgs += \",\"\n", + " \n", + " return msgs" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 8c8e3b3567a8b10c7874d38a7b070427fc7570ec Mon Sep 17 00:00:00 2001 From: n3wbie Date: Mon, 4 Dec 2023 21:00:40 +0900 Subject: [PATCH 2/2] GSW-596 feat: multi msg in makefile --- .gitignore | 2 + _test/live_test_multi_msg.mk | 279 +++++++++++++++++++++++++++++++++++ _test/multi_msg_01.txt | 1 + _test/multi_msg_02.txt | 1 + _test/multi_msg_03.txt | 1 + _test/multi_msg_04.txt | 1 + 6 files changed, 285 insertions(+) create mode 100644 _test/live_test_multi_msg.mk create mode 100644 _test/multi_msg_01.txt create mode 100644 _test/multi_msg_02.txt create mode 100644 _test/multi_msg_03.txt create mode 100644 _test/multi_msg_04.txt diff --git a/.gitignore b/.gitignore index e43b0f988..d6dc9f4c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .DS_Store +.ipynb_checkpoints +signed* \ No newline at end of file diff --git a/_test/live_test_multi_msg.mk b/_test/live_test_multi_msg.mk new file mode 100644 index 000000000..d8b5c4714 --- /dev/null +++ b/_test/live_test_multi_msg.mk @@ -0,0 +1,279 @@ +# Test Mnemonic +# source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast + +# Test Accounts +# gnokey add -recover=true -index 10 gsa +# gnokey add -recover=true -index 11 lp01 +# gnokey add -recover=true -index 12 lp02 +# gnokey add -recover=true -index 13 tr01 + +ADDR_GSA := g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4 +ADDR_LP01 := g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd +ADDR_LP02 := g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq +ADDR_TR01 := g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn + +ADDR_POOL := g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w +ADDR_POS := g1htpxzv2dkplvzg50nd8fswrneaxmdpwn459thx +ADDR_STAKER := g13h5s9utqcwg3a655njen0p89txusjpfrs3vxp8 +ADDR_ROUTER := g1ernz3lj85hnn3ucug73ymgkhqdv2lg8e4yd48e +ADDR_GOV := g1wj5lwwmkru3ky6dh2zztanrcj2ups8g0pfe8cu + +TX_EXPIRE := 9999999999 + +NOW := $(shell date +%s) +INCENTIVE_START := $(shell expr $(NOW) + 120) +INCENTIVE_END := $(shell expr $(NOW) + 7776000) # 90 DAY + +MAKEFILE := $(shell realpath $(firstword $(MAKEFILE_LIST))) +GNOLAND_RPC_URL ?= localhost:26657 +CHAINID ?= dev +ROOT_DIR:=$(shell dirname $(MAKEFILE))/.. + +.PHONY: help +help: + @echo "Available make commands:" + @cat $(MAKEFILE) | grep '^[a-z][^:]*:' | cut -d: -f1 | sort | sed 's/^/ /' + +.PHONY: all +all: deploy faucet-approve pool-setup position-mint staker-stake router-swap staker-unstake done + +.PHONY: deploy +deploy: deploy-foo deploy-bar deploy-baz deploy-qux deploy-wugnot deploy-gns deploy-obl deploy-gnft deploy-gov deploy-pool deploy-position deploy-staker deploy-router deploy-grc20_wrapper + +.PHONY: faucet-approve +faucet-approve: faucet-approve-lp01 faucet-approve-lp02 faucet-approve-tr01 faucet-approve-gsa + +.PHONY: pool-setup +pool-setup: pool-init pool-create + +.PHONY: position-mint +position-mint: mint-01 mint-02 mint-03 mint-rest + +.PHONY: staker-stake +staker-stake: stake-token-1 stake-token-2 + +.PHONY: router-swap +router-swap: set-protocol-fee swap-exact-in-single swap-exact-out-multi collect-lp01 collect-lp02 + +.PHONY: staker-unstake +staker-unstake: unstake-token-1 unstake-token-2 + +# Deploy Tokens +# [GRC20] FOO, BAR, BAZ, QUX: Token Pair for Pool +# [GRC20] WUGNOT: Wrapped GRC20 for native ugnot +# [GRC20] GNS: Default Staking Reward +# [GRC20] OBL: External Staking Reward +# [GRC721] GNFT: LP Token +deploy-foo: + $(info ************ [FOO] deploy foo ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/_setup/foo -pkgpath gno.land/r/foo -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-bar: + $(info ************ [BAR] deploy bar ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/_setup/bar -pkgpath gno.land/r/bar -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-baz: + $(info ************ [BAZ] deploy baz ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/_setup/baz -pkgpath gno.land/r/baz -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-qux: + $(info ************ [QUX] deploy qux ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/_setup/qux -pkgpath gno.land/r/qux -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-wugnot: + $(info ************ [WUGNOT] deploy wugnot ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/_setup/wugnot -pkgpath gno.land/r/wugnot -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-gns: + $(info ************ [GNS] deploy staking reward ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/_setup/gns -pkgpath gno.land/r/gns -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-obl: + $(info ************ [OBL] deploy external staking reward ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/_setup/obl -pkgpath gno.land/r/obl -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-gnft: + $(info ************ [GNFT] deploy lp token ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/_setup/gnft -pkgpath gno.land/r/gnft -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + + +# Deploy Contracts +deploy-gov: + $(info ************ [GOV] deploy governance ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/gov -pkgpath gno.land/r/gov -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-pool: + $(info ************ [POOL] deploy pool ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/pool -pkgpath gno.land/r/pool -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-position: + $(info ************ [POSITION] deploy position ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/position -pkgpath gno.land/r/position -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-staker: + $(info ************ [STAKER] deploy staker ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/staker -pkgpath gno.land/r/staker -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-router: + $(info ************ [ROUTER] deploy router ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/router -pkgpath gno.land/r/router -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + +deploy-grc20_wrapper: + $(info ************ [GRC20 Wrapper] deploy grc20_wrapper ************) + @echo "" | gnokey maketx addpkg -pkgdir $(ROOT_DIR)/_setup/grc20_wrapper -pkgpath gno.land/r/grc20_wrapper -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo + + +# Facuet Tokens & Approve Tokens +faucet-approve-lp01: + $(info ************ [Faucet & Approve ] lp01 ************) + @echo "" | gnokey sign -txpath multi_msg_01.txt -insecure-password-stdin=true -chainid $(CHAINID) -number 1 -sequence 0 lp01 > signed01.tx + gnokey broadcast -remote $(GNOLAND_RPC_URL) signed01.tx > /dev/null + +faucet-approve-lp02: + $(info ************ [Faucet & Approve ] lp02 ************) + @echo "" | gnokey sign -txpath multi_msg_02.txt -insecure-password-stdin=true -chainid $(CHAINID) -number 2 -sequence 0 lp02 > signed02.tx + gnokey broadcast -remote $(GNOLAND_RPC_URL) signed02.tx > /dev/null + +faucet-approve-tr01: + $(info ************ [Faucet & Approve ] tr01 ************) + @echo "" | gnokey sign -txpath multi_msg_03.txt -insecure-password-stdin=true -chainid $(CHAINID) -number 3 -sequence 0 tr01 > signed03.tx + gnokey broadcast -remote $(GNOLAND_RPC_URL) signed03.tx > /dev/null + +faucet-approve-gsa: + $(info ************ [Faucet & Approve ] gsa ************) + @echo "" | gnokey sign -txpath multi_msg_04.txt -insecure-password-stdin=true -chainid $(CHAINID) -number 0 -sequence 0 gsa > signed04.tx + gnokey broadcast -remote $(GNOLAND_RPC_URL) signed04.tx > /dev/null + + +# Pool +pool-init: + $(info ************ [POOL] init pool ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/pool -func InitManual -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" gsa > /dev/null + @echo + +pool-create: + $(info ************ [POOL] create pools ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/pool -func CreatePool -args "gnot" -args "gno.land/r/bar" -args 100 -args 101729702841318637793976746270 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" gsa > /dev/null + @echo "" | gnokey maketx call -pkgpath gno.land/r/pool -func CreatePool -args "gno.land/r/bar" -args "gno.land/r/baz" -args 100 -args 101729702841318637793976746270 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" gsa > /dev/null + @echo "" | gnokey maketx call -pkgpath gno.land/r/pool -func CreatePool -args "gno.land/r/baz" -args "gno.land/r/qux" -args 100 -args 101729702841318637793976746270 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" gsa > /dev/null + + @echo "" | gnokey maketx call -pkgpath gno.land/r/pool -func CreatePool -args "gnot" -args "gno.land/r/bar" -args 500 -args 101729702841318637793976746270 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" gsa > /dev/null + @echo "" | gnokey maketx call -pkgpath gno.land/r/pool -func CreatePool -args "gno.land/r/bar" -args "gno.land/r/baz" -args 500 -args 101729702841318637793976746270 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" gsa > /dev/null + @echo "" | gnokey maketx call -pkgpath gno.land/r/pool -func CreatePool -args "gno.land/r/baz" -args "gno.land/r/qux" -args 500 -args 101729702841318637793976746270 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" gsa > /dev/null + @echo + + +# Position +mint-01: + $(info ************ [POSITION - 1] mint gnot & bar // tick range 4000 ~ 6000 // by lp01 ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/position -func Mint -args "gnot" -args "gno.land/r/bar" -args 100 -args 4000 -args 6000 -args 10000000 -args 10000000 -args 0 -args 0 -args $(TX_EXPIRE) -send "10000000ugnot" -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp01 > /dev/null + @echo + +mint-02: + $(info ************ [POSITION - 2] mint bar & baz // tick range 4000 ~ 6000 // by lp02 ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/position -func Mint -args "gno.land/r/bar" -args "gno.land/r/baz" -args 100 -args 4000 -args 6000 -args 10000000 -args 10000000 -args 0 -args 0 -args $(TX_EXPIRE) -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp02 > /dev/null + @echo + +mint-03: + $(info ************ [POSITION - 3] mint baz & qux // tick range 4000 ~ 6000 // by lp02 ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/position -func Mint -args "gno.land/r/baz" -args "gno.land/r/qux" -args 100 -args 4000 -args 6000 -args 10000000 -args 10000000 -args 0 -args 0 -args $(TX_EXPIRE) -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp02 > /dev/null + @echo + +mint-rest: + $(info ************ [POSITION - 4,5,6] ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/position -func Mint -args "gno.land/r/bar" -args "gnot" -args 500 -args -6000 -args -4000 -args 10000000 -args 10000000 -args 0 -args 0 -args $(TX_EXPIRE) -send "10000000ugnot" -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp01 > /dev/null + @echo "" | gnokey maketx call -pkgpath gno.land/r/position -func Mint -args "gno.land/r/bar" -args "gno.land/r/baz" -args 500 -args 4000 -args 6000 -args 10000000 -args 10000000 -args 0 -args 0 -args $(TX_EXPIRE) -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp02 > /dev/null + @echo "" | gnokey maketx call -pkgpath gno.land/r/position -func Mint -args "gno.land/r/baz" -args "gno.land/r/qux" -args 500 -args 4000 -args 6000 -args 10000000 -args 10000000 -args 0 -args 0 -args $(TX_EXPIRE) -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp02 > /dev/null + @echo + + +# Staker +create-external-incentive: + $(info ************ [STAKER] create external incentive ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/staker -func CreateExternalIncentive -args "gno.land/r/bar:gnot:100" -args "gno.land/r/obl" -args 10000000000 -args $(INCENTIVE_START) -args $(INCENTIVE_END)-insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" gsa > /dev/null + @echo + +stake-token-1: + $(info ************ [STAKER] stake gnft tokenId 1) + @$(MAKE) -f $(MAKEFILE) skip-time + @echo "" | gnokey maketx call -pkgpath gno.land/r/gnft -func Approve -args $(ADDR_STAKER) -args "1" -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp01 > /dev/null + @echo "" | gnokey maketx call -pkgpath gno.land/r/staker -func StakeToken -args 1 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp01 > /dev/null + @echo + +stake-token-2: + $(info ************ [STAKER] stake gnft tokenId 2) + @$(MAKE) -f $(MAKEFILE) skip-time + @echo "" | gnokey maketx call -pkgpath gno.land/r/gnft -func Approve -args $(ADDR_STAKER) -args "2" -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp02 > /dev/null + @echo "" | gnokey maketx call -pkgpath gno.land/r/staker -func StakeToken -args 2 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp02 > /dev/null + @echo + + +# Swap +set-protocol-fee: + $(info ************ [POOL] Set Protocol Fee ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/pool -func SetFeeProtocol -args 6 -args 8 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" gsa > /dev/null + @echo + +swap-exact-in-single: + $(info ************ [ROUTER] Swap 123_456 BAR to BAZ // singlePath ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/router -func SwapRoute -args "gno.land/r/bar" -args "gno.land/r/baz" -args 123456 -args "EXACT_IN" -args "gno.land/r/bar:gno.land/r/baz:100" -args "100" -args 200000 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" tr01 > /dev/null + @echo + +swap-exact-out-multi: + $(info ************ [ROUTER] Swap NATIVE ugnot to 987_654 QUX // multiPath ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/router -func SwapRoute -args "gnot" -args "gno.land/r/qux" -args 987654 -args "EXACT_OUT" -args "gnot:gno.land/r/bar:100*POOL*gno.land/r/bar:gno.land/r/baz:100*POOL*gno.land/r/baz:gno.land/r/qux:100,gnot:gno.land/r/bar:500*POOL*gno.land/r/bar:gno.land/r/baz:500*POOL*gno.land/r/baz:gno.land/r/qux:500" -args "40,60" -args 654321 -send 100000000ugnot -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" tr01 > /dev/null + @echo + +collect-lp01: + $(info ************ [POSITION] Collect swap fee at position of tokenId 1 ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/position -func Collect -args 1 -args $(ADDR_LP01) -args 1000000 -args 1000000 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp01 > /dev/null + @echo + +collect-lp02: + $(info ************ [POSITION] Collect swap fee at position of tokenId 2 ************) + @echo "" | gnokey maketx call -pkgpath gno.land/r/position -func Collect -args 2 -args $(ADDR_LP02) -args 1000000 -args 1000000 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp02 > /dev/null + @echo + + +## Staker // Unstake +unstake-token-1: + $(info ************ [STAKER] unstake gnft tokenId 1 ************) + @$(MAKE) -f $(MAKEFILE) skip-time + @echo "" | gnokey maketx call -pkgpath gno.land/r/staker -func UnstakeToken -args 1 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp01 > /dev/null + @echo + +unstake-token-2: + $(info ************ [STAKER] unstake gnft tokenId 2 ************) + @$(MAKE) -f $(MAKEFILE) skip-time + @echo "" | gnokey maketx call -pkgpath gno.land/r/staker -func UnstakeToken -args 2 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" lp02 > /dev/null + @echo + +### can not test staker EndExternalIncentive +### it needs to wait for 90 days ( which we can't skip it in makefiles ) + +done: + @echo "" | gnokey maketx send -send 1ugnot -to $(ADDR_GOV) -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + +## ETC +# gno time.Now returns last block time, not actual time +# so to skip time, we need new block +skip-time: + $(info > SKIP 3 BLOCKS) + @echo "" | gnokey maketx send -send 1ugnot -to g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo "" | gnokey maketx send -send 1ugnot -to g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo "" | gnokey maketx send -send 1ugnot -to g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 -insecure-password-stdin=true -remote $(GNOLAND_RPC_URL) -broadcast=true -chainid $(CHAINID) -gas-fee 1ugnot -gas-wanted 9000000 -memo "" test1 > /dev/null + @echo \ No newline at end of file diff --git a/_test/multi_msg_01.txt b/_test/multi_msg_01.txt new file mode 100644 index 000000000..54b8f6116 --- /dev/null +++ b/_test/multi_msg_01.txt @@ -0,0 +1 @@ +{"msg":[{"@type":"/vm.m_call","caller":"g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd","send":"","pkg_path":"gno.land/r/foo","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd","send":"","pkg_path":"gno.land/r/foo","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd","send":"","pkg_path":"gno.land/r/bar","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd","send":"","pkg_path":"gno.land/r/bar","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd","send":"","pkg_path":"gno.land/r/baz","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd","send":"","pkg_path":"gno.land/r/baz","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd","send":"","pkg_path":"gno.land/r/qux","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd","send":"","pkg_path":"gno.land/r/qux","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g1jqpr8r5akez83kp7ers0sfjyv2kgx45qa9qygd","send":"","pkg_path":"gno.land/r/wugnot","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]}],"fee":{"gas_wanted":"9000000","gas_fee":"1ugnot"},"signatures":null,"memo":""} \ No newline at end of file diff --git a/_test/multi_msg_02.txt b/_test/multi_msg_02.txt new file mode 100644 index 000000000..1a21e1c00 --- /dev/null +++ b/_test/multi_msg_02.txt @@ -0,0 +1 @@ +{"msg":[{"@type":"/vm.m_call","caller":"g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq","send":"","pkg_path":"gno.land/r/foo","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq","send":"","pkg_path":"gno.land/r/foo","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq","send":"","pkg_path":"gno.land/r/bar","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq","send":"","pkg_path":"gno.land/r/bar","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq","send":"","pkg_path":"gno.land/r/baz","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq","send":"","pkg_path":"gno.land/r/baz","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq","send":"","pkg_path":"gno.land/r/qux","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq","send":"","pkg_path":"gno.land/r/qux","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g126yz2f34qdxaqxelmky40dym379q0vw3yzhyrq","send":"","pkg_path":"gno.land/r/wugnot","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]}],"fee":{"gas_wanted":"9000000","gas_fee":"1ugnot"},"signatures":null,"memo":""} \ No newline at end of file diff --git a/_test/multi_msg_03.txt b/_test/multi_msg_03.txt new file mode 100644 index 000000000..27c233701 --- /dev/null +++ b/_test/multi_msg_03.txt @@ -0,0 +1 @@ +{"msg":[{"@type":"/vm.m_call","caller":"g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn","send":"","pkg_path":"gno.land/r/foo","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn","send":"","pkg_path":"gno.land/r/foo","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn","send":"","pkg_path":"gno.land/r/bar","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn","send":"","pkg_path":"gno.land/r/bar","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn","send":"","pkg_path":"gno.land/r/baz","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn","send":"","pkg_path":"gno.land/r/baz","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn","send":"","pkg_path":"gno.land/r/qux","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn","send":"","pkg_path":"gno.land/r/qux","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g1wgdjecn5lylgvujzyspfzvhjm6qn4z8xqyyxdn","send":"","pkg_path":"gno.land/r/wugnot","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]}],"fee":{"gas_wanted":"9000000","gas_fee":"1ugnot"},"signatures":null,"memo":""} \ No newline at end of file diff --git a/_test/multi_msg_04.txt b/_test/multi_msg_04.txt new file mode 100644 index 000000000..ef0c57aff --- /dev/null +++ b/_test/multi_msg_04.txt @@ -0,0 +1 @@ +{"msg":[{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/foo","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/foo","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/bar","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/bar","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/baz","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/baz","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/qux","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/qux","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/gns","func":"FaucetL"},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/gns","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/gns","func":"Approve","args":["g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w","50000000000"]},{"@type":"/vm.m_call","caller":"g12l9splsyngcgefrwa52x5a7scc29e9v086m6p4","send":"","pkg_path":"gno.land/r/wugnot","func":"Approve","args":["g13h5s9utqcwg3a655njen0p89txusjpfrs3vxp8","50000000000"]}],"fee":{"gas_wanted":"9000000","gas_fee":"1ugnot"},"signatures":null,"memo":""} \ No newline at end of file