Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #76

Merged
merged 65 commits into from
Jun 15, 2024
Merged

Dev #76

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
e3ad879
Fix duplicate redeem bug
May 26, 2024
1cf06bc
Merge pull request #72 from onomyprotocol/fix
cgdusek May 26, 2024
ffa5d54
Add in Canceled Order check
May 26, 2024
8b379cc
Pool initialization fix
Jun 6, 2024
26cc06a
Add safe round up to division
Jun 6, 2024
25f9e21
Firm up AMM safety check
Jun 6, 2024
4e60551
Add AMM safety check to ensure no leakage
Jun 6, 2024
3425ac7
Update profit to delta Sqrt(Product) vs Product
Jun 6, 2024
2112b85
Update pool test to include sqrt(Product) method
Jun 6, 2024
795f837
Firm up AMM Product safety checks
Jun 6, 2024
608f988
Update tests for sqrt(XY) pool basis
Jun 7, 2024
2112eb0
Fix 0coin pool creation
Jun 7, 2024
b548ba9
Update test to reflect Sqrt(XY) changes
Jun 7, 2024
9a23f7a
Update test for Sqrt(XY) pool basis
Jun 7, 2024
2b70a42
Update tests to Sqrt(XY) pool basis
Jun 8, 2024
2e551eb
Add integer checks on # of drops input
Jun 8, 2024
6d912ff
Update test amounts for Sqrt(XY) pool basis
Jun 8, 2024
3b276c7
Save v1 pool type in migrations
Jun 8, 2024
64021e2
Add LastDrop to Pool.proto
Jun 9, 2024
12e1035
Add in checks for sqrt(XY)/drops invariant
Jun 9, 2024
aa6ed45
Update test for sqrt(XY) update
Jun 9, 2024
5d288ca
Add Filled Order Uid to Market Order Response
Jun 9, 2024
14784f2
Add filled order check and test
Jun 9, 2024
65cd475
Add Last Drop to Pool
Jun 9, 2024
c31c2aa
Add error types
Jun 9, 2024
d5c22ea
Add Uid to proto generated market order response
Jun 9, 2024
52f40ca
Update drop proto to include accounting
Jun 9, 2024
4b08af4
Update create drop to new proto type
Jun 9, 2024
d870467
Add fields to tx responses
Jun 9, 2024
f59d680
Add response fields and drop end accounting
Jun 9, 2024
fa12690
Add drop beginning time
Jun 9, 2024
89de17b
Add drop fields
Jun 9, 2024
f9851e6
Update tests to sqrt(XY) pool basis
Jun 9, 2024
c94ee48
Fix tests
Jun 9, 2024
25c21aa
Add intType
Jun 10, 2024
94f7ce3
Add events and tests pass
Jun 10, 2024
9f0b8f2
Merge pull request #73 from onomyprotocol/sqrt
cgdusek Jun 10, 2024
79ccdf8
Adding in additional tests to redeem drop
Jun 10, 2024
99ddb68
Add in adjusted product end check
Jun 10, 2024
ea2b8c7
Member and Pool balances zero check
Jun 10, 2024
0b79648
Add in Simulation Test
Jun 11, 2024
aa2e173
Fix typo in profit calculation
Jun 11, 2024
f0dfb68
Add in check for zero drops estimate
Jun 11, 2024
a58e73a
Add profit error check
Jun 11, 2024
649ef61
Fix user order spend
Jun 11, 2024
cf5d8ba
Add in simulation steps output into error
Jun 11, 2024
fc977f7
Update simulation
Jun 12, 2024
853cb07
Add back limit orders and make pool reasonable
Jun 13, 2024
39009b1
Update drop amounts calc without BigInt
Jun 13, 2024
341f4c9
Add sqrtInt function
Jun 13, 2024
1129ac8
Update tests for round down drops
Jun 13, 2024
51c7e5b
Add invariant check for redeem drop
Jun 13, 2024
9457f0c
Add sqrt prod over drops error
Jun 13, 2024
eff31df
Fix simulation so that market order enabled
Jun 13, 2024
1972a23
Revert Proto to original
Jun 13, 2024
df914e8
Revert proto generated files
Jun 13, 2024
763cfda
Update TX responses
Jun 13, 2024
4469b04
Remove drop events from drop.go
Jun 13, 2024
5cc387e
Add drop events and remove reverted fields
Jun 13, 2024
f0497e2
Add drop event and remove reverted fields
Jun 13, 2024
3b69394
Add drop event and remove reverted fields
Jun 13, 2024
d7d73c9
Merge pull request #74 from onomyprotocol/final-review
cgdusek Jun 13, 2024
bc88d46
Fix errors in tests due to proto revert
Jun 13, 2024
3b61209
Merge pull request #75 from onomyprotocol/revert-proto
cgdusek Jun 14, 2024
5e0754c
Cosmetic change to pool drops calc
Jun 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39,577 changes: 27,269 additions & 12,308 deletions docs/static/openapi.yml

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ require (
github.com/tendermint/starport v0.19.2
github.com/tendermint/tendermint v0.34.27
github.com/tendermint/tm-db v0.6.7
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe
google.golang.org/grpc v1.61.0
google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8
google.golang.org/grpc v1.64.0
gopkg.in/yaml.v2 v2.4.0
)

Expand Down Expand Up @@ -128,15 +128,15 @@ require (
github.com/zondax/hid v0.9.1 // indirect
github.com/zondax/ledger-go v0.14.1 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
nhooyr.io/websocket v1.8.6 // indirect
Expand Down
32 changes: 16 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2996,8 +2996,8 @@ golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw
golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand Down Expand Up @@ -3159,8 +3159,8 @@ golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
Expand Down Expand Up @@ -3403,8 +3403,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand All @@ -3419,8 +3419,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -3436,8 +3436,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -3823,10 +3823,10 @@ google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZV
google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg=
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k=
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8=
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s=
google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 h1:W5Xj/70xIA4x60O/IFyXivR5MGqblAb8R3w26pnD6No=
google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8/go.mod h1:vPrPUTsDCYxXWjP7clS81mZ6/803D8K4iM9Ma27VKas=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 h1:mxSlqyb8ZAHsYDCfiXN1EDdNTdvjUJSLY+OnAUtYNYA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM=
google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
Expand All @@ -3846,8 +3846,8 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
25 changes: 22 additions & 3 deletions proto/market/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ message MsgCreatePool {
}

message MsgCreatePoolResponse {
string creator = 1;
uint64 drop_uid = 2;
string pair = 3;
string drops = 4;
string coin1 = 5;
string coin2 = 6;
}

message MsgCreateDrop {
Expand All @@ -32,6 +38,12 @@ message MsgCreateDrop {
}

message MsgCreateDropResponse {
string creator = 1;
uint64 uid = 2;
string pair = 3;
string drops = 4;
string coin1 = 5;
string coin2 = 6;
}

message MsgRedeemDrop {
Expand All @@ -40,6 +52,12 @@ message MsgRedeemDrop {
}

message MsgRedeemDropResponse {
string creator = 1;
uint64 uid = 2;
string pair = 3;
string drops = 4;
string coin1 = 9;
string coin2 = 10;
}

message MsgCreateOrder {
Expand Down Expand Up @@ -76,9 +94,10 @@ message MsgMarketOrder {
}

message MsgMarketOrderResponse {
string amountBid = 1;
string amountAsk = 2;
string slippage = 3;
string uid = 1;
string amountBid = 2;
string amountAsk = 3;
string slippage = 4;
}

// this line is used by starport scaffolding # proto/tx/message
4 changes: 2 additions & 2 deletions testutil/keeper/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ func MaxSupportedCoin(denom string) string {
return fmt.Sprintf("5192296858534827628530496329220095%s", denom)
}

// Equal to `MaxSupportedCoin` squared
// Equal to `MaxSupportedCoin`
func MaxSupportedDrop(denom string) string {
return fmt.Sprintf("26959946667150639794667015087019620289043427352885315420110951809025%s", denom)
return fmt.Sprintf("5192296858534827628530496329220095%s", denom)
}

// This is for funding an account capable of `MaxSupportedCoin`
Expand Down
5 changes: 5 additions & 0 deletions testutil/nullify/nullify.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
var (
coinType = reflect.TypeOf(sdk.Coin{})
coinsType = reflect.TypeOf(sdk.Coins{})
intType = reflect.TypeOf(sdk.NewIntFromUint64(1))
)

// Fill analyze all struct fields and slices with
Expand Down Expand Up @@ -45,6 +46,10 @@ func Fill(x interface{}) interface{} {
coins := reflect.New(coinsType).Interface()
s := reflect.ValueOf(coins).Elem()
f.Set(s)
case intType:
int := reflect.New(intType).Interface()
s := reflect.ValueOf(int).Elem()
f.Set(s)
default:
objPt := reflect.NewAt(f.Type(), unsafe.Pointer(f.UnsafeAddr())).Interface()
s := Fill(objPt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -915,33 +915,33 @@ export default {
},


async sendMsgCreatePool({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgCreateOrder({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgCreatePool(value)
const msg = await txClient.msgCreateOrder(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgCreatePool:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgCreateOrder:Send Could not broadcast Tx: '+ e.message)
}
}
},
async sendMsgCreateOrder({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgMarketOrder({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgCreateOrder(value)
const msg = await txClient.msgMarketOrder(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgCreateOrder:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgMarketOrder:Send Could not broadcast Tx: '+ e.message)
}
}
},
Expand All @@ -960,75 +960,75 @@ export default {
}
}
},
async sendMsgRedeemDrop({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgCancelOrder({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgRedeemDrop(value)
const msg = await txClient.msgCancelOrder(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgRedeemDrop:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgCancelOrder:Send Could not broadcast Tx: '+ e.message)
}
}
},
async sendMsgCancelOrder({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgCreatePool({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgCancelOrder(value)
const msg = await txClient.msgCreatePool(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgCancelOrder:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgCreatePool:Send Could not broadcast Tx: '+ e.message)
}
}
},
async sendMsgMarketOrder({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgRedeemDrop({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgMarketOrder(value)
const msg = await txClient.msgRedeemDrop(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.')
}else{
throw new Error('TxClient:MsgMarketOrder:Send Could not broadcast Tx: '+ e.message)
throw new Error('TxClient:MsgRedeemDrop:Send Could not broadcast Tx: '+ e.message)
}
}
},

async MsgCreatePool({ rootGetters }, { value }) {
async MsgCreateOrder({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgCreatePool(value)
const msg = await txClient.msgCreateOrder(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgCreatePool:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgCreateOrder:Create Could not create message: ' + e.message)
}
}
},
async MsgCreateOrder({ rootGetters }, { value }) {
async MsgMarketOrder({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgCreateOrder(value)
const msg = await txClient.msgMarketOrder(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgCreateOrder:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgMarketOrder:Create Could not create message: ' + e.message)
}
}
},
Expand All @@ -1045,42 +1045,42 @@ export default {
}
}
},
async MsgRedeemDrop({ rootGetters }, { value }) {
async MsgCancelOrder({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgRedeemDrop(value)
const msg = await txClient.msgCancelOrder(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgRedeemDrop:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgCancelOrder:Create Could not create message: ' + e.message)
}
}
},
async MsgCancelOrder({ rootGetters }, { value }) {
async MsgCreatePool({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgCancelOrder(value)
const msg = await txClient.msgCreatePool(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgCancelOrder:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgCreatePool:Create Could not create message: ' + e.message)
}
}
},
async MsgMarketOrder({ rootGetters }, { value }) {
async MsgRedeemDrop({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgMarketOrder(value)
const msg = await txClient.msgRedeemDrop(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.')
throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.')
} else{
throw new Error('TxClient:MsgMarketOrder:Create Could not create message: ' + e.message)
throw new Error('TxClient:MsgRedeemDrop:Create Could not create message: ' + e.message)
}
}
},
Expand Down
Loading
Loading