diff --git a/go.sum b/go.sum index 7c86e2395cc..7136a993e45 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -83,12 +84,14 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXY github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -99,6 +102,7 @@ github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3 github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= +github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/adlio/schema v1.1.13/go.mod h1:L5Z7tw+7lRK1Fnpi/LT/ooCP1elkXn0krMWBQHUhEDE= github.com/adlio/schema v1.1.14 h1:lIjyp5/2wSuEOmeQGNPpaRsVGZRqz9A/B+PaMtEotaU= github.com/adlio/schema v1.1.14/go.mod h1:hQveFEMiDlG/M9yz9RAajnH5DzT6nAfqOG9YkEQU2pg= @@ -111,6 +115,7 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -123,7 +128,9 @@ github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8 github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/avast/retry-go v2.6.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= @@ -167,6 +174,8 @@ github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= +github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -193,12 +202,14 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coinbase/rosetta-sdk-go v0.6.10/go.mod h1:J/JFMsfcePrjJZkwQFLh+hJErkAmdm9Iyy3D5Y0LfXo= github.com/coinbase/rosetta-sdk-go v0.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= github.com/confio/ics23/go v0.6.6 h1:pkOy18YxxJ/r0XFDCnrl4Bjv6h4LkBSpLS6F38mrKL8= github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.2.0 h1:j/9Wnn+hrEWjLvHuIxUU1YI5JjEjVlT2AA68cse9rwY= github.com/containerd/continuity v0.2.0/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= @@ -223,12 +234,14 @@ github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6 github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +github.com/cosmos/relayer v1.0.0/go.mod h1:jIFz7lytxGMCC3mcI9pQ0/IBMMaaNEyTP0OMmzzq0p4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= @@ -269,6 +282,8 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -291,6 +306,7 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -310,6 +326,12 @@ github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmC github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= +github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= +github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -483,6 +505,7 @@ github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBt github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= @@ -536,6 +559,7 @@ github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3 github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/improbable-eng/grpc-web v0.14.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8Oq1H3cpFvw= github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= @@ -544,9 +568,11 @@ github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZ github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -573,17 +599,20 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -599,6 +628,7 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= @@ -614,6 +644,7 @@ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -663,6 +694,8 @@ github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ= +github.com/moby/term v0.0.0-20201101162038-25d840ce174a/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -724,6 +757,7 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg= github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -740,6 +774,7 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/ory/dockertest/v3 v3.6.2/go.mod h1:EFLcVUOl8qCwp9NyDAcCDtq/QviLtYswW/VbWzUnTNE= github.com/osmosis-labs/bech32-ibc v0.2.0-rc2 h1:7xy1pLtNiF2KaRSkolayZf4z3OfCJsO3eqBtEAXg2VA= github.com/osmosis-labs/bech32-ibc v0.2.0-rc2/go.mod h1:0JCaioRNOVUiw7c3MngmKACnumaQ2sjPenXCnwxCttI= github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220220082240-1b4ae82744ea h1:blDrOjZ2V46JEYWYr6Ikffc8euk/8uvL61hKC8zwAvQ= @@ -793,6 +828,7 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -858,12 +894,14 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= +github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -974,6 +1012,7 @@ github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17 github.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI= github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= +github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= @@ -1027,6 +1066,7 @@ golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1041,10 +1081,14 @@ golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -1116,6 +1160,7 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191003171128-d98b1b443823/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1142,6 +1187,7 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= @@ -1208,6 +1254,7 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1242,6 +1289,7 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1258,10 +1306,12 @@ golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1281,6 +1331,7 @@ golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -1315,6 +1366,7 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1411,6 +1463,7 @@ google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdr google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1537,6 +1590,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -1545,6 +1599,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/proto/osmosis/superfluid/query.proto b/proto/osmosis/superfluid/query.proto index 0ec14984d7b..3c6ff011a5f 100644 --- a/proto/osmosis/superfluid/query.proto +++ b/proto/osmosis/superfluid/query.proto @@ -40,6 +40,56 @@ service Query { option (google.api.http).get = "/osmosis/superfluid/v1beta1/connected_intermediary_account/{lock_id}"; } + + // Returns the coins superfluid delegated for a delegator, validator, denom + // triplet + rpc SuperfluidDelegationAmount(SuperfluidDelegationAmountRequest) + returns (SuperfluidDelegationAmountResponse) { + option (google.api.http).get = + "/osmosis/superfluid/v1beta1/superfluid_delegation_amount"; + } + + // Returns all the superfluid poistions for a specific delegator + rpc SuperfluidDelegationsByDelegator(SuperfluidDelegationsByDelegatorRequest) + returns (SuperfluidDelegationsByDelegatorResponse) { + option (google.api.http).get = "/osmosis/superfluid/v1beta1/" + "superfluid_delegations/{delegator_address}"; + } + + // Returns all the superfluid positions of a specific denom delegated to one + // validator + rpc SuperfluidDelegationsByValidatorDenom( + SuperfluidDelegationsByValidatorDenomRequest) + returns (SuperfluidDelegationsByValidatorDenomResponse) { + option (google.api.http).get = + "/osmosis/superfluid/v1beta1/superfluid_delegations_by_validator_denom"; + } + + // Returns the amount of a specific denom delegated to a specific validator + // This is labeled an estimate, because the way it calculates the amount can + // lead rounding errors from the true delegated amount + rpc EstimateSuperfluidDelegatedAmountByValidatorDenom( + EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) + returns (EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) { + option (google.api.http).get = + "/osmosis/superfluid/v1beta1/" + "estimate_superfluid_delegation_amount_by_validator_denom"; + } + + // // Returns all the unbonding superfluid positions of a delegator + // rpc SuperfluidUnbondingsByDelegator(SuperfluidUnbondingsByDelegatorRequest) + // returns (SuperfluidUnbondingsByDelegatorResponse) { + // option (google.api.http).get = + // "/osmosis/superfluid/v1beta1/superfluid_unbondings/{delegator_address}"; + // } + + // // Returns all the unbonding superfluid positions of a specific denom + // unbonding from one validator rpc + // SuperfluidUnbondingsByValidatorDenom(SuperfluidUnbondingsByValidatorDenomRequest) + // returns (SuperfluidUnbondingsByValidatorDenomResponse) { + // option (google.api.http).get = + // "/osmosis/superfluid/v1beta1/superfluid_unbondings_by_validator_denom"; + // } } message AssetTypeRequest { string denom = 1; }; @@ -74,3 +124,78 @@ message ConnectedIntermediaryAccountRequest { uint64 lock_id = 1; } message ConnectedIntermediaryAccountResponse { SuperfluidIntermediaryAccountInfo account = 1; } + +message SuperfluidDelegationAmountRequest { + string delegator_address = 1; + string validator_address = 2; + string denom = 3; +} + +message SuperfluidDelegationAmountResponse { + repeated cosmos.base.v1beta1.Coin amount = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +message SuperfluidDelegationsByDelegatorRequest { + string delegator_address = 1; +} + +message SuperfluidDelegationsByDelegatorResponse { + repeated SuperfluidDelegationRecord superfluid_delegation_records = 1 + [ (gogoproto.nullable) = false ]; + repeated cosmos.base.v1beta1.Coin total_delegated_coins = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +message SuperfluidDelegationsByValidatorDenomRequest { + string validator_address = 1; + string denom = 2; +} + +message SuperfluidDelegationsByValidatorDenomResponse { + repeated SuperfluidDelegationRecord superfluid_delegation_records = 1 + [ (gogoproto.nullable) = false ]; +} + +message EstimateSuperfluidDelegatedAmountByValidatorDenomRequest { + string validator_address = 1; + string denom = 2; +} + +message EstimateSuperfluidDelegatedAmountByValidatorDenomResponse { + repeated cosmos.base.v1beta1.Coin total_delegated_coins = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// message SuperfluidUnbondingsByDelegatorRequest { +// string delegator_address = 1; +// } + +// message SuperfluidUnbondingsByDelegatorResponse { +// repeated SuperfluidDelegationRecord superfluid_unbonding_records = 1 +// [ (gogoproto.nullable) = false ]; +// repeated cosmos.base.v1beta1.Coin total_unbonding_coins = 2 [ +// (gogoproto.nullable) = false, +// (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" +// ]; +// } + +// message SuperfluidUnbondingsByValidatorDenomRequest { +// string validator_address = 1; +// string denom = 2; +// } + +// message SuperfluidUnbondingsByValidatorDenomResponse { +// repeated SuperfluidDelegationRecord superfluid_unbonding_records = 1 +// [ (gogoproto.nullable) = false ]; +// repeated cosmos.base.v1beta1.Coin total_unbonding_coins = 2 [ +// (gogoproto.nullable) = false, +// (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" +// ]; +// } \ No newline at end of file diff --git a/proto/osmosis/superfluid/superfluid.proto b/proto/osmosis/superfluid/superfluid.proto index b39669e7f43..ce59c2fa934 100644 --- a/proto/osmosis/superfluid/superfluid.proto +++ b/proto/osmosis/superfluid/superfluid.proto @@ -49,3 +49,14 @@ message OsmoEquivalentMultiplierRecord { (gogoproto.nullable) = false ]; } + +// SuperfluidDelegationRecord takes the role of intermediary between LP token +// and OSMO tokens for superfluid staking +message SuperfluidDelegationRecord { + string delegator_address = 1; + string validator_address = 2; + cosmos.base.v1beta1.Coin delegation_amount = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin" + ]; +} diff --git a/x/lockup/keeper/store.go b/x/lockup/keeper/store.go index a8445afe21c..532c41dfa23 100644 --- a/x/lockup/keeper/store.go +++ b/x/lockup/keeper/store.go @@ -197,6 +197,11 @@ func (k Keeper) GetAccountLockedLongerDurationDenom(ctx sdk.Context, addr sdk.Ac return combineLocks(notUnlockings, unlockings) } +// GetAccountLockedLongerDurationDenom Returns account locked with duration longer than specified with specific denom +func (k Keeper) GetAccountLockedLongerDurationDenomNotUnlockingOnly(ctx sdk.Context, addr sdk.AccAddress, denom string, duration time.Duration) []types.PeriodLock { + return k.getLocksFromIterator(ctx, k.AccountLockIteratorLongerDurationDenom(ctx, false, addr, denom, duration)) +} + // GetLocksPastTimeDenom Returns the locks whose unlock time is beyond timestamp func (k Keeper) GetLocksPastTimeDenom(ctx sdk.Context, denom string, timestamp time.Time) []types.PeriodLock { // returns both unlocking started and not started assuming it started unlocking current time diff --git a/x/superfluid/keeper/distribution_test.go b/x/superfluid/keeper/distribution_test.go index a895b6eaaa2..7790270070a 100644 --- a/x/superfluid/keeper/distribution_test.go +++ b/x/superfluid/keeper/distribution_test.go @@ -42,28 +42,28 @@ func (suite *KeeperTestSuite) TestMoveSuperfluidDelegationRewardToGauges() { { "happy path with single validator and delegator", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []int64{0}, []gaugeChecker{{1, 0, "gamm/pool/1", true}}, }, { "two LP tokens delegation to a single validator", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/2"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/2", 1000000}}, []int64{0}, []gaugeChecker{{1, 0, "gamm/pool/1", true}, {2, 0, "gamm/pool/2", true}}, }, { "one LP token with two locks to a single validator", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/1", 1000000}}, []int64{0}, []gaugeChecker{{1, 0, "gamm/pool/1", true}}, }, { "add unbonded validator case", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Unbonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {1, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 1, "gamm/pool/1", 1000000}}, []int64{0}, []gaugeChecker{{1, 0, "gamm/pool/1", true}, {2, 1, "gamm/pool/1", false}}, }, @@ -75,11 +75,14 @@ func (suite *KeeperTestSuite) TestMoveSuperfluidDelegationRewardToGauges() { suite.Run(tc.name, func() { suite.SetupTest() + // Generate delegator addresses + delAddrs := CreateRandomAccounts(1) + // setup validators valAddrs := suite.SetupValidators(tc.validatorStats) // setup superfluid delegations - suite.SetupSuperfluidDelegations(valAddrs, tc.superDelegations) + suite.SetupSuperfluidDelegations(delAddrs, valAddrs, tc.superDelegations) unbondingDuration := suite.app.StakingKeeper.GetParams(suite.ctx).UnbondingTime // allocate rewards to first validator @@ -98,7 +101,7 @@ func (suite *KeeperTestSuite) TestMoveSuperfluidDelegationRewardToGauges() { suite.Require().Equal(gauge.IsPerpetual, true) suite.Require().Equal(gauge.DistributeTo, lockuptypes.QueryCondition{ LockQueryType: lockuptypes.ByDuration, - Denom: keeper.StakingSuffix(gaugeCheck.lpDenom, valAddrs[gaugeCheck.valIndex].String()), + Denom: keeper.StakingSyntheticDenom(gaugeCheck.lpDenom, valAddrs[gaugeCheck.valIndex].String()), Duration: unbondingDuration, }) if gaugeCheck.rewarded { diff --git a/x/superfluid/keeper/export_test.go b/x/superfluid/keeper/export_test.go index b777216b4e2..ebed50d197d 100644 --- a/x/superfluid/keeper/export_test.go +++ b/x/superfluid/keeper/export_test.go @@ -1,4 +1,4 @@ package keeper -var StakingSuffix = stakingSuffix -var UnstakingSuffix = unstakingSuffix +var StakingSyntheticDenom = stakingSyntheticDenom +var UnstakingSyntheticDenom = unstakingSyntheticDenom diff --git a/x/superfluid/keeper/grpc_query.go b/x/superfluid/keeper/grpc_query.go index c857c6c6ab4..9f0728b5b59 100644 --- a/x/superfluid/keeper/grpc_query.go +++ b/x/superfluid/keeper/grpc_query.go @@ -2,8 +2,11 @@ package keeper import ( "context" + "strings" + "time" sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/osmosis-labs/osmosis/v7/x/superfluid/types" ) @@ -75,3 +78,153 @@ func (k Keeper) ConnectedIntermediaryAccount(goCtx context.Context, req *types.C }, }, nil } + +// SuperfluidDelegationAmount returns the coins superfluid delegated for a +//delegator, validator, denom triplet +func (k Keeper) SuperfluidDelegationAmount(goCtx context.Context, req *types.SuperfluidDelegationAmountRequest) (*types.SuperfluidDelegationAmountResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + if k.GetSuperfluidAsset(ctx, req.Denom).Denom == "" { + return nil, types.ErrNonSuperfluidAsset + } + + _, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, err + } + + syntheticDenom := stakingSyntheticDenom(req.Denom, req.ValidatorAddress) + + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) + if err != nil { + return nil, err + } + + periodLocks := k.lk.GetAccountLockedLongerDurationDenomNotUnlockingOnly(ctx, delAddr, syntheticDenom, time.Second) + + if len(periodLocks) == 0 { + return &types.SuperfluidDelegationAmountResponse{sdk.NewCoins()}, nil + } + + return &types.SuperfluidDelegationAmountResponse{periodLocks[0].GetCoins()}, nil +} + +// SuperfluidDelegationsByDelegator returns all the superfluid poistions for a specific delegator +func (k Keeper) SuperfluidDelegationsByDelegator(goCtx context.Context, req *types.SuperfluidDelegationsByDelegatorRequest) (*types.SuperfluidDelegationsByDelegatorResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + delAddr, err := sdk.AccAddressFromBech32(req.DelegatorAddress) + if err != nil { + return nil, err + } + + res := types.SuperfluidDelegationsByDelegatorResponse{ + SuperfluidDelegationRecords: []types.SuperfluidDelegationRecord{}, + TotalDelegatedCoins: sdk.NewCoins(), + } + + syntheticLocks := k.lk.GetAllSyntheticLockupsByAddr(ctx, delAddr) + + for _, syntheticLock := range syntheticLocks { + // don't include unbonding delegations + if strings.Contains(syntheticLock.SynthDenom, "superunbonding") { + continue + } + + periodLock, err := k.lk.GetLockByID(ctx, syntheticLock.UnderlyingLockId) + if err != nil { + return nil, err + } + + baseDenom := periodLock.Coins.GetDenomByIndex(0) + lockedCoins := sdk.NewCoin(baseDenom, periodLock.GetCoins().AmountOf(baseDenom)) + valAddr, err := ValidatorAddressFromSuffix(syntheticLock.SynthDenom) + if err != nil { + return nil, err + } + res.SuperfluidDelegationRecords = append(res.SuperfluidDelegationRecords, + types.SuperfluidDelegationRecord{ + DelegatorAddress: req.DelegatorAddress, + ValidatorAddress: valAddr, + DelegationAmount: lockedCoins, + }, + ) + res.TotalDelegatedCoins = res.TotalDelegatedCoins.Add(lockedCoins) + } + return &res, nil + +} + +// SuperfluidDelegationsByValidatorDenom returns all the superfluid positions +// of a specific denom delegated to one validator +func (k Keeper) SuperfluidDelegationsByValidatorDenom(goCtx context.Context, req *types.SuperfluidDelegationsByValidatorDenomRequest) (*types.SuperfluidDelegationsByValidatorDenomResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + if k.GetSuperfluidAsset(ctx, req.Denom).Denom == "" { + return nil, types.ErrNonSuperfluidAsset + } + + _, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, err + } + + syntheticDenom := stakingSyntheticDenom(req.Denom, req.ValidatorAddress) + + res := types.SuperfluidDelegationsByValidatorDenomResponse{ + SuperfluidDelegationRecords: []types.SuperfluidDelegationRecord{}, + } + + periodLocks := k.lk.GetLocksLongerThanDurationDenom(ctx, syntheticDenom, time.Second) + + for _, lock := range periodLocks { + lockedCoins := sdk.NewCoin(req.Denom, lock.GetCoins().AmountOf(req.Denom)) + res.SuperfluidDelegationRecords = append(res.SuperfluidDelegationRecords, + types.SuperfluidDelegationRecord{ + DelegatorAddress: lock.GetOwner(), + ValidatorAddress: req.ValidatorAddress, + DelegationAmount: lockedCoins, + }, + ) + } + return &res, nil +} + +// EstimateSuperfluidDelegatedAmountByValidatorDenom returns the amount of a +// specific denom delegated to a specific validator +// This is labeled an estimate, because the way it calculates the amount can +// lead rounding errors from the true delegated amount +func (k Keeper) EstimateSuperfluidDelegatedAmountByValidatorDenom(goCtx context.Context, req *types.EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) (*types.EstimateSuperfluidDelegatedAmountByValidatorDenomResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + if k.GetSuperfluidAsset(ctx, req.Denom).Denom == "" { + return nil, types.ErrNonSuperfluidAsset + } + + valAddr, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + if err != nil { + return nil, err + } + + intermediaryAcc, err := k.GetOrCreateIntermediaryAccount(ctx, req.Denom, req.ValidatorAddress) + if err != nil { + return nil, err + } + + val, found := k.sk.GetValidator(ctx, valAddr) + if !found { + return nil, stakingtypes.ErrNoValidatorFound + } + + delegation, found := k.sk.GetDelegation(ctx, intermediaryAcc.GetAccAddress(), valAddr) + if err != nil { + return nil, stakingtypes.ErrNoDelegation + } + + syntheticOsmoAmt := delegation.Shares.Quo(val.DelegatorShares).MulInt(val.Tokens) + + baseAmount := k.UnriskAdjustOsmoValue(ctx, syntheticOsmoAmt).Quo(k.GetOsmoEquivalentMultiplier(ctx, req.Denom)).RoundInt() + return &types.EstimateSuperfluidDelegatedAmountByValidatorDenomResponse{ + TotalDelegatedCoins: sdk.NewCoins(sdk.NewCoin(req.Denom, baseAmount)), + }, nil +} diff --git a/x/superfluid/keeper/grpc_query_test.go b/x/superfluid/keeper/grpc_query_test.go index e8ded6f052f..9a92d9b8a13 100644 --- a/x/superfluid/keeper/grpc_query_test.go +++ b/x/superfluid/keeper/grpc_query_test.go @@ -1,9 +1,11 @@ package keeper_test import ( + appparams "github.com/osmosis-labs/osmosis/v7/app/params" "github.com/osmosis-labs/osmosis/v7/x/superfluid/types" sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) func (suite *KeeperTestSuite) TestGRPCSuperfluidAsset() { @@ -29,3 +31,157 @@ func (suite *KeeperTestSuite) TestGRPCSuperfluidAsset() { suite.Require().NoError(err) suite.Require().Len(resp.Assets, 1) } + +func (suite *KeeperTestSuite) TestGRPCQuerySuperfluidDelegations() { + suite.SetupTest() + + poolId := suite.createGammPool([]string{appparams.BaseCoinUnit, "foo"}) + suite.Require().Equal(poolId, uint64(1)) + + // Generate delegator addresses + delAddrs := CreateRandomAccounts(2) + + // setup 2 validators + valAddrs := suite.SetupValidators([]stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}) + + denoms := []string{"gamm/pool/1", "gamm/pool/2"} + + // create a delegation of 1000000 for every combination of 2 delegations, 2 validators, and 2 superfluid denoms + superfluidDelegations := []superfluidDelegation{ + {0, 0, denoms[0], 1000000}, + {0, 0, denoms[1], 1000000}, + + {0, 1, denoms[0], 1000000}, + {0, 1, denoms[1], 1000000}, + + {1, 0, denoms[0], 1000000}, + {1, 0, denoms[1], 1000000}, + + {1, 1, denoms[0], 1000000}, + {1, 1, denoms[1], 1000000}, + } + + // setup superfluid delegations + suite.SetupSuperfluidDelegations(delAddrs, valAddrs, superfluidDelegations) + + // for each superfluid delegation, query the amount and make sure it is 1000000 + for _, delegation := range superfluidDelegations { + res, err := suite.queryClient.SuperfluidDelegationAmount(sdk.WrapSDKContext(suite.ctx), &types.SuperfluidDelegationAmountRequest{ + DelegatorAddress: delAddrs[delegation.delIndex].String(), + ValidatorAddress: valAddrs[delegation.valIndex].String(), + Denom: delegation.lpDenom, + }) + suite.Require().NoError(err) + suite.Require().Equal(res.Amount.AmountOf(delegation.lpDenom).Int64(), delegation.lpAmount) + } + + // for each delegator, query all their superfluid delegations and make sure they have 4 delegations + for _, delegator := range delAddrs { + res, err := suite.queryClient.SuperfluidDelegationsByDelegator(sdk.WrapSDKContext(suite.ctx), &types.SuperfluidDelegationsByDelegatorRequest{ + DelegatorAddress: delegator.String(), + }) + suite.Require().NoError(err) + suite.Require().Len(res.SuperfluidDelegationRecords, 4) + suite.Require().True(res.TotalDelegatedCoins.IsEqual(sdk.NewCoins( + sdk.NewInt64Coin("gamm/pool/1", 2000000), + sdk.NewInt64Coin("gamm/pool/2", 2000000), + ))) + } + + // for each validator denom pair, make sure they have 2 delegations + for _, validator := range valAddrs { + for _, denom := range denoms { + amountRes, err := suite.queryClient.EstimateSuperfluidDelegatedAmountByValidatorDenom(sdk.WrapSDKContext(suite.ctx), &types.EstimateSuperfluidDelegatedAmountByValidatorDenomRequest{ + ValidatorAddress: validator.String(), + Denom: denom, + }) + + suite.Require().NoError(err) + suite.Require().True(amountRes.TotalDelegatedCoins.IsEqual(sdk.NewCoins( + sdk.NewInt64Coin(denom, 2000000), + ))) + + delegationsRes, err := suite.queryClient.SuperfluidDelegationsByValidatorDenom(sdk.WrapSDKContext(suite.ctx), &types.SuperfluidDelegationsByValidatorDenomRequest{ + ValidatorAddress: validator.String(), + Denom: denom, + }) + suite.Require().NoError(err) + suite.Require().Len(delegationsRes.SuperfluidDelegationRecords, 2) + } + } +} + +func (suite *KeeperTestSuite) TestGRPCQuerySuperfluidDelegationsDontIncludeUnbonding() { + suite.SetupTest() + + poolId := suite.createGammPool([]string{appparams.BaseCoinUnit, "foo"}) + suite.Require().Equal(poolId, uint64(1)) + + // Generate delegator addresses + delAddrs := CreateRandomAccounts(2) + + // setup 2 validators + valAddrs := suite.SetupValidators([]stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}) + + denoms := []string{"gamm/pool/1", "gamm/pool/2"} + + // create a delegation of 1000000 for every combination of 2 delegations, 2 validators, and 2 superfluid denoms + superfluidDelegations := []superfluidDelegation{ + {0, 0, denoms[0], 1000000}, + {0, 0, denoms[1], 1000000}, + + {0, 1, denoms[0], 1000000}, + {0, 1, denoms[1], 1000000}, + + {1, 0, denoms[0], 1000000}, + {1, 0, denoms[1], 1000000}, + + {1, 1, denoms[0], 1000000}, + {1, 1, denoms[1], 1000000}, + } + + // setup superfluid delegations + _, locks := suite.SetupSuperfluidDelegations(delAddrs, valAddrs, superfluidDelegations) + + // start unbonding the superfluid delegations of denom0 from delegator0 to validator0 + err := suite.app.SuperfluidKeeper.SuperfluidUndelegate(suite.ctx, locks[0].Owner, locks[0].ID) + suite.Require().NoError(err) + + // query to make sure that the amount delegated for the now unbonding delegation is 0 + res, err := suite.queryClient.SuperfluidDelegationAmount(sdk.WrapSDKContext(suite.ctx), &types.SuperfluidDelegationAmountRequest{ + DelegatorAddress: delAddrs[0].String(), + ValidatorAddress: valAddrs[0].String(), + Denom: denoms[0], + }) + suite.Require().NoError(err) + suite.Require().Equal(res.Amount.AmountOf(denoms[0]).Int64(), int64(0)) + + // query to make sure that the unbonding delegation is not included in delegator query + res2, err := suite.queryClient.SuperfluidDelegationsByDelegator(sdk.WrapSDKContext(suite.ctx), &types.SuperfluidDelegationsByDelegatorRequest{ + DelegatorAddress: delAddrs[0].String(), + }) + suite.Require().NoError(err) + suite.Require().Len(res2.SuperfluidDelegationRecords, 3) + suite.Require().True(res2.TotalDelegatedCoins.IsEqual(sdk.NewCoins( + sdk.NewInt64Coin("gamm/pool/1", 1000000), + sdk.NewInt64Coin("gamm/pool/2", 2000000), + ))) + + // query to make sure that the unbonding delegation is not included in the validator denom pair query + amountRes, err := suite.queryClient.EstimateSuperfluidDelegatedAmountByValidatorDenom(sdk.WrapSDKContext(suite.ctx), &types.EstimateSuperfluidDelegatedAmountByValidatorDenomRequest{ + ValidatorAddress: valAddrs[0].String(), + Denom: denoms[0], + }) + + suite.Require().NoError(err) + suite.Require().True(amountRes.TotalDelegatedCoins.IsEqual(sdk.NewCoins( + sdk.NewInt64Coin(denoms[0], 1000000), + ))) + + delegationsRes, err := suite.queryClient.SuperfluidDelegationsByValidatorDenom(sdk.WrapSDKContext(suite.ctx), &types.SuperfluidDelegationsByValidatorDenomRequest{ + ValidatorAddress: valAddrs[0].String(), + Denom: denoms[0], + }) + suite.Require().NoError(err) + suite.Require().Len(delegationsRes.SuperfluidDelegationRecords, 1) +} diff --git a/x/superfluid/keeper/hooks_test.go b/x/superfluid/keeper/hooks_test.go index e3388b01df0..293db341909 100644 --- a/x/superfluid/keeper/hooks_test.go +++ b/x/superfluid/keeper/hooks_test.go @@ -47,7 +47,7 @@ func (suite *KeeperTestSuite) TestSuperfluidAfterEpochEnd() { { "happy path with single validator and delegator", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, }, } @@ -61,9 +61,12 @@ func (suite *KeeperTestSuite) TestSuperfluidAfterEpochEnd() { poolId := suite.createGammPool([]string{bondDenom, "foo"}) suite.Require().Equal(poolId, uint64(1)) + // Generate delegator addresses + delAddrs := CreateRandomAccounts(1) + // setup validators valAddrs := suite.SetupValidators(tc.validatorStats) - intermediaryAccs, _ := suite.SetupSuperfluidDelegations(valAddrs, tc.superDelegations) + intermediaryAccs, _ := suite.SetupSuperfluidDelegations(delAddrs, valAddrs, tc.superDelegations) suite.checkIntermediaryAccountDelegations(intermediaryAccs) // gamm swap operation before refresh @@ -111,42 +114,42 @@ func (suite *KeeperTestSuite) TestOnStartUnlock() { { "with single validator and single superfluid delegation and single lockup unlock", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []uint64{1}, []bool{false}, }, { "with single validator and multiple superfluid delegations and single undelegation", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/1", 1000000}}, []uint64{1}, []bool{false}, }, { "with single validator and multiple superfluid delegations and multiple undelegation", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/1", 1000000}}, []uint64{1, 2}, []bool{false, false}, }, { "with multiple validators and multiple superfluid delegations and multiple undelegations", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {1, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 1, "gamm/pool/1", 1000000}}, []uint64{1, 2}, []bool{false, false}, }, { "undelegating not available lock id", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []uint64{2}, []bool{true}, }, { "try undelegating twice for same lock id", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []uint64{1, 1}, []bool{false, true}, }, @@ -160,11 +163,14 @@ func (suite *KeeperTestSuite) TestOnStartUnlock() { poolId := suite.createGammPool([]string{appparams.BaseCoinUnit, "foo"}) suite.Require().Equal(poolId, uint64(1)) + // Generate delegator addresses + delAddrs := CreateRandomAccounts(1) + // setup validators valAddrs := suite.SetupValidators(tc.validatorStats) // setup superfluid delegations - intermediaryAccs, _ := suite.SetupSuperfluidDelegations(valAddrs, tc.superDelegations) + intermediaryAccs, _ := suite.SetupSuperfluidDelegations(delAddrs, valAddrs, tc.superDelegations) suite.checkIntermediaryAccountDelegations(intermediaryAccs) for index, lockId := range tc.unbondingLockIds { @@ -190,15 +196,15 @@ func (suite *KeeperTestSuite) TestOnStartUnlock() { suite.Require().Equal(addr.String(), "") // check bonding synthetic lockup deletion - _, err = suite.app.LockupKeeper.GetSyntheticLockup(suite.ctx, lockId, keeper.StakingSuffix(lock.Coins[0].Denom, valAddr)) + _, err = suite.app.LockupKeeper.GetSyntheticLockup(suite.ctx, lockId, keeper.StakingSyntheticDenom(lock.Coins[0].Denom, valAddr)) suite.Require().Error(err) // check unbonding synthetic lockup creation unbondingDuration := suite.app.StakingKeeper.GetParams(suite.ctx).UnbondingTime - synthLock, err := suite.app.LockupKeeper.GetSyntheticLockup(suite.ctx, lockId, keeper.UnstakingSuffix(lock.Coins[0].Denom, valAddr)) + synthLock, err := suite.app.LockupKeeper.GetSyntheticLockup(suite.ctx, lockId, keeper.UnstakingSyntheticDenom(lock.Coins[0].Denom, valAddr)) suite.Require().NoError(err) suite.Require().Equal(synthLock.UnderlyingLockId, lockId) - suite.Require().Equal(synthLock.SynthDenom, keeper.UnstakingSuffix(lock.Coins[0].Denom, valAddr)) + suite.Require().Equal(synthLock.SynthDenom, keeper.UnstakingSyntheticDenom(lock.Coins[0].Denom, valAddr)) suite.Require().Equal(synthLock.EndTime, suite.ctx.BlockTime().Add(unbondingDuration)) } }) @@ -218,7 +224,7 @@ func (suite *KeeperTestSuite) TestBeforeSlashingUnbondingDelegationHook() { { "happy path with single validator and multiple superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []uint64{1}, []int64{0}, []uint64{1}, @@ -227,7 +233,7 @@ func (suite *KeeperTestSuite) TestBeforeSlashingUnbondingDelegationHook() { { "with single validator and multiple superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/1", 1000000}}, []uint64{1, 2}, []int64{0}, []uint64{1, 2}, @@ -236,7 +242,7 @@ func (suite *KeeperTestSuite) TestBeforeSlashingUnbondingDelegationHook() { { "with multiple validators and multiple superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {1, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 1, "gamm/pool/1", 1000000}}, []uint64{1, 2}, []int64{0}, []uint64{1}, @@ -255,10 +261,13 @@ func (suite *KeeperTestSuite) TestBeforeSlashingUnbondingDelegationHook() { slashFactor := sdk.NewDecWithPrec(5, 2) + // Generate delegator addresses + delAddrs := CreateRandomAccounts(1) + // setup validators valAddrs := suite.SetupValidators(tc.validatorStats) // setup superfluid delegations - intermediaryAccs, _ := suite.SetupSuperfluidDelegations(valAddrs, tc.superDelegations) + intermediaryAccs, _ := suite.SetupSuperfluidDelegations(delAddrs, valAddrs, tc.superDelegations) suite.checkIntermediaryAccountDelegations(intermediaryAccs) for _, lockId := range tc.superUnbondingLockIds { diff --git a/x/superfluid/keeper/intermediary_account.go b/x/superfluid/keeper/intermediary_account.go index f55dc66707a..abcfcb7e3c3 100644 --- a/x/superfluid/keeper/intermediary_account.go +++ b/x/superfluid/keeper/intermediary_account.go @@ -75,7 +75,7 @@ func (k Keeper) GetOrCreateIntermediaryAccount(ctx sdk.Context, denom, valAddr s gaugeID, err := k.ik.CreateGauge(ctx, true, accountAddr, sdk.Coins{}, lockuptypes.QueryCondition{ LockQueryType: lockuptypes.ByDuration, // move this synthetic denom creation to a dedicated function - Denom: stakingSuffix(denom, valAddr), + Denom: stakingSyntheticDenom(denom, valAddr), Duration: k.sk.GetParams(ctx).UnbondingTime, }, ctx.BlockTime(), 1) diff --git a/x/superfluid/keeper/keeper_test.go b/x/superfluid/keeper/keeper_test.go index 470f5311553..40acdbd7d66 100644 --- a/x/superfluid/keeper/keeper_test.go +++ b/x/superfluid/keeper/keeper_test.go @@ -4,8 +4,10 @@ import ( "testing" "time" + "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/osmosis-labs/osmosis/v7/app" + "github.com/osmosis-labs/osmosis/v7/x/superfluid/types" "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) @@ -13,14 +15,18 @@ import ( type KeeperTestSuite struct { suite.Suite - ctx sdk.Context - querier sdk.Querier - app *app.OsmosisApp + ctx sdk.Context + queryClient types.QueryClient + app *app.OsmosisApp } func (suite *KeeperTestSuite) SetupTest() { suite.app = app.Setup(false) suite.ctx = suite.app.BaseApp.NewContext(false, tmproto.Header{Height: 1, ChainID: "osmosis-1", Time: time.Now().UTC()}) + + queryHelper := baseapp.NewQueryServerTestHelper(suite.ctx, suite.app.InterfaceRegistry()) + types.RegisterQueryServer(queryHelper, suite.app.SuperfluidKeeper) + suite.queryClient = types.NewQueryClient(queryHelper) } func TestKeeperTestSuite(t *testing.T) { diff --git a/x/superfluid/keeper/slash.go b/x/superfluid/keeper/slash.go index 297e0712dda..0460438315f 100644 --- a/x/superfluid/keeper/slash.go +++ b/x/superfluid/keeper/slash.go @@ -37,10 +37,10 @@ func (k Keeper) SlashLockupsForValidatorSlash(ctx sdk.Context, valAddr sdk.ValAd locks := k.lk.GetLocksLongerThanDurationDenom(ctx, acc.Denom, time.Second) for _, lock := range locks { // slashing only applies to synthetic lockup amount - synthLock, err := k.lk.GetSyntheticLockup(ctx, lock.ID, stakingSuffix(acc.Denom, acc.ValAddr)) + synthLock, err := k.lk.GetSyntheticLockup(ctx, lock.ID, stakingSyntheticDenom(acc.Denom, acc.ValAddr)) // synth lock doesn't exist for bonding if err != nil { - synthLock, err = k.lk.GetSyntheticLockup(ctx, lock.ID, unstakingSuffix(acc.Denom, acc.ValAddr)) + synthLock, err = k.lk.GetSyntheticLockup(ctx, lock.ID, unstakingSyntheticDenom(acc.Denom, acc.ValAddr)) // synth lock doesn't exist for unbonding // => no superlfuid staking on this lock ID, so continue if err != nil { diff --git a/x/superfluid/keeper/slash_test.go b/x/superfluid/keeper/slash_test.go index 33e0ab112cf..6fdf4c7a233 100644 --- a/x/superfluid/keeper/slash_test.go +++ b/x/superfluid/keeper/slash_test.go @@ -19,28 +19,28 @@ func (suite *KeeperTestSuite) TestBeforeValidatorSlashed() { { "with single validator and single superfluid delegation", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []int64{0}, []int64{0}, }, { "with single validator and multiple superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/1", 1000000}}, []int64{0}, []int64{0, 1}, }, { "with multiple validators and multiple superfluid delegations with single validator slash", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {1, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 1, "gamm/pool/1", 1000000}}, []int64{0}, []int64{0}, }, { "with multiple validators and multiple superfluid delegations with two validators slash", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {1, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 1, "gamm/pool/1", 1000000}}, []int64{0, 1}, []int64{0, 1}, }, @@ -55,6 +55,9 @@ func (suite *KeeperTestSuite) TestBeforeValidatorSlashed() { poolId := suite.createGammPool([]string{appparams.BaseCoinUnit, "foo"}) suite.Require().Equal(poolId, uint64(1)) + // Generate delegator addresses + delAddrs := CreateRandomAccounts(1) + // setup validators valAddrs := suite.SetupValidators(tc.validatorStats) @@ -65,7 +68,7 @@ func (suite *KeeperTestSuite) TestBeforeValidatorSlashed() { // setup superfluid delegations for _, del := range tc.superDelegations { valAddr := valAddrs[del.valIndex] - lock := suite.SetupSuperfluidDelegate(valAddr, del.lpDenom) + lock := suite.SetupSuperfluidDelegate(delAddrs[0], valAddr, del.lpDenom, del.lpAmount) expAcc := types.NewSuperfluidIntermediaryAccount(lock.Coins[0].Denom, valAddr.String(), 0) // save accounts and locks for future use @@ -109,19 +112,19 @@ func (suite *KeeperTestSuite) TestSlashLockupsForUnbondingDelegationSlash() { { "happy path with single validator and multiple superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []uint64{1}, }, { "with single validator and multiple superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/1", 1000000}}, []uint64{1, 2}, }, { "with multiple validators and multiple superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {1, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 1, "gamm/pool/1", 1000000}}, []uint64{1, 2}, }, } @@ -135,10 +138,13 @@ func (suite *KeeperTestSuite) TestSlashLockupsForUnbondingDelegationSlash() { poolId := suite.createGammPool([]string{appparams.BaseCoinUnit, "foo"}) suite.Require().Equal(poolId, uint64(1)) + // Generate delegator addresses + delAddrs := CreateRandomAccounts(1) + // setup validators valAddrs := suite.SetupValidators(tc.validatorStats) // setup superfluid delegations - intermediaryAccs, _ := suite.SetupSuperfluidDelegations(valAddrs, tc.superDelegations) + intermediaryAccs, _ := suite.SetupSuperfluidDelegations(delAddrs, valAddrs, tc.superDelegations) suite.checkIntermediaryAccountDelegations(intermediaryAccs) for _, lockId := range tc.superUnbondingLockIds { diff --git a/x/superfluid/keeper/stake.go b/x/superfluid/keeper/stake.go index 63cb93ab8fa..648a3d18e6a 100644 --- a/x/superfluid/keeper/stake.go +++ b/x/superfluid/keeper/stake.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + "strings" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -9,14 +10,25 @@ import ( "github.com/osmosis-labs/osmosis/v7/x/superfluid/types" ) -func stakingSuffix(denom, valAddr string) string { +func stakingSyntheticDenom(denom, valAddr string) string { return fmt.Sprintf("%s/superbonding/%s", denom, valAddr) } -func unstakingSuffix(denom, valAddr string) string { +func unstakingSyntheticDenom(denom, valAddr string) string { return fmt.Sprintf("%s/superunbonding/%s", denom, valAddr) } +// quick fix for getting the validator addresss from a synthetic denom +func ValidatorAddressFromSuffix(suffix string) (string, error) { + if strings.Contains(suffix, "superbonding") { + return strings.TrimLeft(suffix, "superbonding"), nil + } + if strings.Contains(suffix, "superunbonding") { + return strings.TrimLeft(suffix, "superunbonding"), nil + } + return "", fmt.Errorf("%s is not a valid synthetic denom suffix", suffix) +} + func (k Keeper) GetTotalSyntheticAssetsLocked(ctx sdk.Context, denom string) sdk.Int { return k.lk.GetPeriodLocksAccumulation(ctx, lockuptypes.QueryCondition{ LockQueryType: lockuptypes.ByDuration, @@ -27,7 +39,7 @@ func (k Keeper) GetTotalSyntheticAssetsLocked(ctx sdk.Context, denom string) sdk func (k Keeper) GetExpectedDelegationAmount(ctx sdk.Context, acc types.SuperfluidIntermediaryAccount) sdk.Int { // Get total number of Osmo this account should have delegated after refresh - totalSuperfluidDelegation := k.GetTotalSyntheticAssetsLocked(ctx, stakingSuffix(acc.Denom, acc.ValAddr)) + totalSuperfluidDelegation := k.GetTotalSyntheticAssetsLocked(ctx, stakingSyntheticDenom(acc.Denom, acc.ValAddr)) refreshedAmount := k.GetSuperfluidOSMOTokens(ctx, acc.Denom, totalSuperfluidDelegation) return refreshedAmount } @@ -121,7 +133,7 @@ func (k Keeper) validateLockForSFDelegate(ctx sdk.Context, lock *lockuptypes.Per defaultSuperfluidAsset := types.SuperfluidAsset{} if k.GetSuperfluidAsset(ctx, lock.Coins[0].Denom) == defaultSuperfluidAsset { - return types.ErrAttemptingToSuperfluidNonSuperfluidAsset + return types.ErrNonSuperfluidAsset } // prevent unbonding lockups to be not able to be used for superfluid staking @@ -193,7 +205,7 @@ func (k Keeper) SuperfluidDelegate(ctx sdk.Context, sender string, lockID uint64 unbondingDuration := k.sk.GetParams(ctx).UnbondingTime // Register a synthetic lockup for superfluid staking - synthdenom := stakingSuffix(coin.Denom, valAddr) + synthdenom := stakingSyntheticDenom(coin.Denom, valAddr) notUnlocking := false err = k.lk.CreateSyntheticLockup(ctx, lockID, synthdenom, unbondingDuration, notUnlocking) if err != nil { @@ -246,7 +258,7 @@ func (k Keeper) SuperfluidUndelegate(ctx sdk.Context, sender string, lockID uint if err != nil { return err } - synthdenom := stakingSuffix(coin.Denom, intermediaryAcc.ValAddr) + synthdenom := stakingSyntheticDenom(coin.Denom, intermediaryAcc.ValAddr) err = k.lk.DeleteSyntheticLockup(ctx, lockID, synthdenom) if err != nil { @@ -267,7 +279,7 @@ func (k Keeper) SuperfluidUndelegate(ctx sdk.Context, sender string, lockID uint } unbondingDuration := k.sk.GetParams(ctx).UnbondingTime - synthdenom = unstakingSuffix(coin.Denom, intermediaryAcc.ValAddr) + synthdenom = unstakingSyntheticDenom(coin.Denom, intermediaryAcc.ValAddr) // Note: bonding synthetic lockup amount is always same as native lockup amount in current implementation. // If there's the case, it's different, we should create synthetic lockup at deleted bonding diff --git a/x/superfluid/keeper/stake_test.go b/x/superfluid/keeper/stake_test.go index cb3c4638c82..507dcfa0c92 100644 --- a/x/superfluid/keeper/stake_test.go +++ b/x/superfluid/keeper/stake_test.go @@ -13,11 +13,14 @@ import ( "github.com/osmosis-labs/osmosis/v7/x/superfluid/keeper" "github.com/osmosis-labs/osmosis/v7/x/superfluid/types" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/crypto/ed25519" ) type superfluidDelegation struct { + delIndex int64 valIndex int64 lpDenom string + lpAmount int64 } type superfluidRedelegation struct { lockId uint64 @@ -30,6 +33,17 @@ type assetTwap struct { price sdk.Dec } +// CreateRandomAccounts is a function return a list of randomly generated AccAddresses +func CreateRandomAccounts(accNum int) []sdk.AccAddress { + testAddrs := make([]sdk.AccAddress, accNum) + for i := 0; i < accNum; i++ { + pk := ed25519.GenPrivKey().PubKey() + testAddrs[i] = sdk.AccAddress(pk.Address()) + } + + return testAddrs +} + func (suite *KeeperTestSuite) LockTokens(addr sdk.AccAddress, coins sdk.Coins, duration time.Duration) lockuptypes.PeriodLock { err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) suite.Require().NoError(err) @@ -82,15 +96,16 @@ func (suite *KeeperTestSuite) SetupValidators(bondStatuses []stakingtypes.BondSt return valAddrs } -func (suite *KeeperTestSuite) SetupSuperfluidDelegations(valAddrs []sdk.ValAddress, superDelegations []superfluidDelegation) ([]types.SuperfluidIntermediaryAccount, []lockuptypes.PeriodLock) { +func (suite *KeeperTestSuite) SetupSuperfluidDelegations(delAddrs []sdk.AccAddress, valAddrs []sdk.ValAddress, superDelegations []superfluidDelegation) ([]types.SuperfluidIntermediaryAccount, []lockuptypes.PeriodLock) { flagIntermediaryAcc := make(map[string]bool) intermediaryAccs := []types.SuperfluidIntermediaryAccount{} locks := []lockuptypes.PeriodLock{} // setup superfluid delegations for _, del := range superDelegations { + delAddr := delAddrs[del.delIndex] valAddr := valAddrs[del.valIndex] - lock := suite.SetupSuperfluidDelegate(valAddr, del.lpDenom) + lock := suite.SetupSuperfluidDelegate(delAddr, valAddr, del.lpDenom, del.lpAmount) expAcc := types.NewSuperfluidIntermediaryAccount(lock.Coins[0].Denom, valAddr.String(), 0) // save accounts for future use @@ -122,7 +137,7 @@ func (suite *KeeperTestSuite) checkIntermediaryAccountDelegations(intermediaryAc } } -func (suite *KeeperTestSuite) SetupSuperfluidDelegate(valAddr sdk.ValAddress, denom string) lockuptypes.PeriodLock { +func (suite *KeeperTestSuite) SetupSuperfluidDelegate(delAddr sdk.AccAddress, valAddr sdk.ValAddress, denom string, amount int64) lockuptypes.PeriodLock { unbondingDuration := suite.app.StakingKeeper.GetParams(suite.ctx).UnbondingTime suite.app.IncentivesKeeper.SetLockableDurations(suite.ctx, []time.Duration{ @@ -148,9 +163,8 @@ func (suite *KeeperTestSuite) SetupSuperfluidDelegate(valAddr sdk.ValAddress, de }) // create lockup of LP token - addr1 := sdk.AccAddress([]byte("addr1---------------")) - coins := sdk.Coins{sdk.NewInt64Coin(denom, 1000000)} - lock := suite.LockTokens(addr1, coins, unbondingDuration) + coins := sdk.Coins{sdk.NewInt64Coin(denom, amount)} + lock := suite.LockTokens(delAddr, coins, unbondingDuration) // call SuperfluidDelegate and check response err := suite.app.SuperfluidKeeper.SuperfluidDelegate(suite.ctx, lock.Owner, lock.ID, valAddr.String()) @@ -169,19 +183,19 @@ func (suite *KeeperTestSuite) TestSuperfluidDelegate() { { "with single validator and single superfluid delegation", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []sdk.Dec{sdk.NewDec(19000000)}, // 95% x 2 x 1000000 }, { "with single validator and multiple superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/1", 1000000}}, []sdk.Dec{sdk.NewDec(38000000)}, // 95% x 2 x 1000000 x 2 }, { "with multiples validator and multiple superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {1, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 1, "gamm/pool/1", 1000000}}, []sdk.Dec{sdk.NewDec(19000000), sdk.NewDec(19000000)}, // 95% x 2 x 1000000 }, } @@ -194,9 +208,12 @@ func (suite *KeeperTestSuite) TestSuperfluidDelegate() { poolId := suite.createGammPool([]string{appparams.BaseCoinUnit, "foo"}) suite.Require().Equal(poolId, uint64(1)) + // Generate delegator addresses + delAddrs := CreateRandomAccounts(1) + // setup validators valAddrs := suite.SetupValidators(tc.validatorStats) - intermediaryAccs, locks := suite.SetupSuperfluidDelegations(valAddrs, tc.superDelegations) + intermediaryAccs, locks := suite.SetupSuperfluidDelegations(delAddrs, valAddrs, tc.superDelegations) unbondingDuration := suite.app.StakingKeeper.GetParams(suite.ctx).UnbondingTime // setup superfluid delegations @@ -205,10 +222,10 @@ func (suite *KeeperTestSuite) TestSuperfluidDelegate() { valAddr := valAddrs[del.valIndex] // check synthetic lockup creation - synthLock, err := suite.app.LockupKeeper.GetSyntheticLockup(suite.ctx, lock.ID, keeper.StakingSuffix(lock.Coins[0].Denom, valAddr.String())) + synthLock, err := suite.app.LockupKeeper.GetSyntheticLockup(suite.ctx, lock.ID, keeper.StakingSyntheticDenom(lock.Coins[0].Denom, valAddr.String())) suite.Require().NoError(err) suite.Require().Equal(synthLock.UnderlyingLockId, lock.ID) - suite.Require().Equal(synthLock.SynthDenom, keeper.StakingSuffix(lock.Coins[0].Denom, valAddr.String())) + suite.Require().Equal(synthLock.SynthDenom, keeper.StakingSyntheticDenom(lock.Coins[0].Denom, valAddr.String())) suite.Require().Equal(synthLock.EndTime, time.Time{}) expAcc := types.NewSuperfluidIntermediaryAccount(lock.Coins[0].Denom, valAddr.String(), 0) @@ -235,7 +252,7 @@ func (suite *KeeperTestSuite) TestSuperfluidDelegate() { suite.Require().Equal(gauge.IsPerpetual, true) suite.Require().Equal(gauge.DistributeTo, lockuptypes.QueryCondition{ LockQueryType: lockuptypes.ByDuration, - Denom: keeper.StakingSuffix(expAcc.Denom, valAddr.String()), + Denom: keeper.StakingSyntheticDenom(expAcc.Denom, valAddr.String()), Duration: unbondingDuration, }) suite.Require().Equal(gauge.Coins, sdk.Coins(nil)) @@ -273,7 +290,7 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() { { "with single validator and single superfluid delegation and single undelegation", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []uint64{}, []uint64{1}, []bool{false}, @@ -282,7 +299,7 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() { // { // "with single validator, single superfluid delegation, add more tokens to the lock, and single undelegation", // []stakingtypes.BondStatus{stakingtypes.Bonded}, - // []superfluidDelegation{{0, "gamm/pool/1"}}, + // []superfluidDelegation{{0, "gamm/pool/1", 1000000}}, // []uint64{1}, // []uint64{1}, // []bool{false}, @@ -291,7 +308,7 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() { { "with single validator and multiple superfluid delegations and single undelegation", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/1", 1000000}}, []uint64{}, []uint64{1}, []bool{false}, @@ -300,7 +317,7 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() { { "with single validator and multiple superfluid delegations and multiple undelegation", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/1", 1000000}}, []uint64{}, []uint64{1, 2}, []bool{false, false}, @@ -309,7 +326,7 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() { { "with multiple validators and multiple superfluid delegations and multiple undelegations", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {1, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 1, "gamm/pool/1", 1000000}}, []uint64{}, []uint64{1, 2}, []bool{false, false}, @@ -318,7 +335,7 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() { { "undelegating not available lock id", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []uint64{}, []uint64{2}, []bool{true}, @@ -327,7 +344,7 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() { { "try undelegating twice for same lock id", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []uint64{}, []uint64{1, 1}, []bool{false, true}, @@ -343,11 +360,14 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() { poolId := suite.createGammPool([]string{appparams.BaseCoinUnit, "foo"}) suite.Require().Equal(poolId, uint64(1)) + // Generate delegator addresses + delAddrs := CreateRandomAccounts(1) + // setup validators valAddrs := suite.SetupValidators(tc.validatorStats) // setup superfluid delegations - intermediaryAccs, _ := suite.SetupSuperfluidDelegations(valAddrs, tc.superDelegations) + intermediaryAccs, _ := suite.SetupSuperfluidDelegations(delAddrs, valAddrs, tc.superDelegations) suite.checkIntermediaryAccountDelegations(intermediaryAccs) for _, lockId := range tc.addMoreTokensLockIds { @@ -386,15 +406,15 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() { suite.Require().Equal(addr.String(), "") // check bonding synthetic lockup deletion - _, err = suite.app.LockupKeeper.GetSyntheticLockup(suite.ctx, lockId, keeper.StakingSuffix(lock.Coins[0].Denom, valAddr)) + _, err = suite.app.LockupKeeper.GetSyntheticLockup(suite.ctx, lockId, keeper.StakingSyntheticDenom(lock.Coins[0].Denom, valAddr)) suite.Require().Error(err) // check unbonding synthetic lockup creation unbondingDuration := suite.app.StakingKeeper.GetParams(suite.ctx).UnbondingTime - synthLock, err := suite.app.LockupKeeper.GetSyntheticLockup(suite.ctx, lockId, keeper.UnstakingSuffix(lock.Coins[0].Denom, valAddr)) + synthLock, err := suite.app.LockupKeeper.GetSyntheticLockup(suite.ctx, lockId, keeper.UnstakingSyntheticDenom(lock.Coins[0].Denom, valAddr)) suite.Require().NoError(err) suite.Require().Equal(synthLock.UnderlyingLockId, lockId) - suite.Require().Equal(synthLock.SynthDenom, keeper.UnstakingSuffix(lock.Coins[0].Denom, valAddr)) + suite.Require().Equal(synthLock.SynthDenom, keeper.UnstakingSyntheticDenom(lock.Coins[0].Denom, valAddr)) suite.Require().Equal(synthLock.EndTime, suite.ctx.BlockTime().Add(unbondingDuration)) } @@ -439,42 +459,42 @@ func (suite *KeeperTestSuite) TestSuperfluidUndelegate() { // { // "with single validator and single superfluid delegation with single redelegation", // []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, -// []superfluidDelegation{{0, "gamm/pool/1"}}, +// []superfluidDelegation{{0, "gamm/pool/1", 1000000}}, // []superfluidRedelegation{{1, 0, 1}}, // lock1 => val0 -> val1 // []bool{false}, // }, // { // "with multiple superfluid delegations with single redelegation", // []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, -// []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, +// []superfluidDelegation{{0, "gamm/pool/1", 1000000}, {0, "gamm/pool/1", 1000000}}, // []superfluidRedelegation{{1, 0, 1}}, // lock1 => val0 -> val1 // []bool{false}, // }, // { // "with multiple superfluid delegations with multiple redelegations", // []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, -// []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, +// []superfluidDelegation{{0, "gamm/pool/1", 1000000}, {0, "gamm/pool/1", 1000000}}, // []superfluidRedelegation{{1, 0, 1}, {2, 0, 1}}, // lock1 => val0 -> val1, lock2 => val0 -> val1 // []bool{false, false}, // }, // { // "try redelegating back from new validator to original validator", // []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, -// []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, +// []superfluidDelegation{{0, "gamm/pool/1", 1000000}, {0, "gamm/pool/1", 1000000}}, // []superfluidRedelegation{{1, 0, 1}, {1, 1, 0}}, // lock1 => val0 -> val1, lock1 => val1 -> val0 // []bool{false, true}, // }, // { // "not available lock id redelegation", // []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, -// []superfluidDelegation{{0, "gamm/pool/1"}}, +// []superfluidDelegation{{0, "gamm/pool/1", 1000000}}, // []superfluidRedelegation{{2, 0, 1}}, // lock1 => val0 -> val1 // []bool{true}, // }, // { // "redelegation for same validator", // []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, -// []superfluidDelegation{{0, "gamm/pool/1"}}, +// []superfluidDelegation{{0, "gamm/pool/1", 1000000}}, // []superfluidRedelegation{{1, 0, 0}}, // lock1 => val0 -> val0 // []bool{true}, // }, @@ -590,7 +610,7 @@ func (suite *KeeperTestSuite) TestRefreshIntermediaryDelegationAmounts() { { "with single validator and single delegation", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}}, []assetTwap{{"gamm/pool/1", sdk.NewDec(10)}}, []assetTwap{}, []int64{0}, @@ -598,7 +618,7 @@ func (suite *KeeperTestSuite) TestRefreshIntermediaryDelegationAmounts() { { "with single validator and multiple delegations", []stakingtypes.BondStatus{stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/1", 1000000}}, []assetTwap{{"gamm/pool/1", sdk.NewDec(10)}}, []assetTwap{}, []int64{0}, @@ -606,7 +626,7 @@ func (suite *KeeperTestSuite) TestRefreshIntermediaryDelegationAmounts() { { "with multiple validator and multiple superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {1, "gamm/pool/1"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 1, "gamm/pool/1", 1000000}}, []assetTwap{{"gamm/pool/1", sdk.NewDec(10)}}, []assetTwap{}, []int64{0, 1}, @@ -614,7 +634,7 @@ func (suite *KeeperTestSuite) TestRefreshIntermediaryDelegationAmounts() { { "with single validator and multiple denom superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {0, "gamm/pool/2"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 0, "gamm/pool/2", 1000000}}, []assetTwap{{"gamm/pool/1", sdk.NewDec(10)}, {"gamm/pool/2", sdk.NewDec(10)}}, []assetTwap{}, []int64{0, 1}, @@ -622,7 +642,7 @@ func (suite *KeeperTestSuite) TestRefreshIntermediaryDelegationAmounts() { { "with multiple validators and multiple denom superfluid delegations", []stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}, - []superfluidDelegation{{0, "gamm/pool/1"}, {1, "gamm/pool/2"}}, + []superfluidDelegation{{0, 0, "gamm/pool/1", 1000000}, {0, 1, "gamm/pool/2", 1000000}}, []assetTwap{{"gamm/pool/1", sdk.NewDec(10)}, {"gamm/pool/2", sdk.NewDec(10)}}, []assetTwap{}, []int64{0, 1}, @@ -630,7 +650,7 @@ func (suite *KeeperTestSuite) TestRefreshIntermediaryDelegationAmounts() { // { // "zero price twap check", // []stakingtypes.BondStatus{stakingtypes.Bonded}, - // []superfluidDelegation{{0, "gamm/pool/1"}}, + // []superfluidDelegation{{0, "gamm/pool/1", 1000000}}, // []assetTwap{{"gamm/pool/1", sdk.NewDec(0)}}, // []assetTwap{}, // []int64{0}, @@ -638,7 +658,7 @@ func (suite *KeeperTestSuite) TestRefreshIntermediaryDelegationAmounts() { // { // "refresh case from zero to non-zero", // []stakingtypes.BondStatus{stakingtypes.Bonded}, - // []superfluidDelegation{{0, "gamm/pool/1"}}, + // []superfluidDelegation{{0, "gamm/pool/1", 1000000}}, // []assetTwap{{"gamm/pool/1", sdk.NewDec(0)}}, // []assetTwap{{"gamm/pool/1", sdk.NewDec(10)}}, // []int64{0}, @@ -646,7 +666,7 @@ func (suite *KeeperTestSuite) TestRefreshIntermediaryDelegationAmounts() { // { // "dust price twap check", // []stakingtypes.BondStatus{stakingtypes.Bonded}, - // []superfluidDelegation{{0, "gamm/pool/1"}}, + // []superfluidDelegation{{0, "gamm/pool/1", 1000000}}, // []assetTwap{{"gamm/pool/1", sdk.NewDecWithPrec(1, 10)}}, // 10^-10 // []assetTwap{}, // []int64{0}, @@ -654,7 +674,7 @@ func (suite *KeeperTestSuite) TestRefreshIntermediaryDelegationAmounts() { // { // "refresh case from dust to non-dust", // []stakingtypes.BondStatus{stakingtypes.Bonded}, - // []superfluidDelegation{{0, "gamm/pool/1"}}, + // []superfluidDelegation{{0, "gamm/pool/1", 1000000}}, // []assetTwap{{"gamm/pool/1", sdk.NewDecWithPrec(1, 10)}}, // 10^-10 // []assetTwap{{"gamm/pool/1", sdk.NewDec(10)}}, // []int64{0}, @@ -671,10 +691,13 @@ func (suite *KeeperTestSuite) TestRefreshIntermediaryDelegationAmounts() { poolId := suite.createGammPool([]string{appparams.BaseCoinUnit, "foo"}) suite.Require().Equal(poolId, uint64(1)) + // Generate delegator addresses + delAddrs := CreateRandomAccounts(1) + // setup validators valAddrs := suite.SetupValidators(tc.validatorStats) // setup superfluid delegations - intermediaryAccs, locks := suite.SetupSuperfluidDelegations(valAddrs, tc.superDelegations) + intermediaryAccs, locks := suite.SetupSuperfluidDelegations(delAddrs, valAddrs, tc.superDelegations) suite.checkIntermediaryAccountDelegations(intermediaryAccs) intermediaryDels := []sdk.Dec{} diff --git a/x/superfluid/keeper/superfluid_asset.go b/x/superfluid/keeper/superfluid_asset.go index 0ecd8d6ae39..64119069641 100644 --- a/x/superfluid/keeper/superfluid_asset.go +++ b/x/superfluid/keeper/superfluid_asset.go @@ -24,3 +24,12 @@ func (k Keeper) GetRiskAdjustedOsmoValue(ctx sdk.Context, asset types.Superfluid minRiskFactor := k.GetParams(ctx).MinimumRiskFactor return amount.Sub(amount.ToDec().Mul(minRiskFactor).RoundInt()) } + +// y = x - (x * minRisk) +// y = x (1 - minRisk) +// y / (1 - minRisk) = x + +func (k Keeper) UnriskAdjustOsmoValue(ctx sdk.Context, amount sdk.Dec) sdk.Dec { + minRiskFactor := k.GetParams(ctx).MinimumRiskFactor + return amount.Quo(sdk.OneDec().Sub(minRiskFactor)) +} diff --git a/x/superfluid/types/errors.go b/x/superfluid/types/errors.go index 91bd9f5ab28..717422d54c1 100644 --- a/x/superfluid/types/errors.go +++ b/x/superfluid/types/errors.go @@ -15,5 +15,5 @@ var ( ErrAlreadyUsedSuperfluidLockup = sdkerrors.Register(ModuleName, 7, "lockup is already being used for superfluid staking") ErrUnbondingSyntheticLockupExists = sdkerrors.Register(ModuleName, 8, "unbonding synthetic lockup exists on the validator") - ErrAttemptingToSuperfluidNonSuperfluidAsset = sdkerrors.Register(ModuleName, 10, "attempting to superfluid stake an LP share thats not supported") + ErrNonSuperfluidAsset = sdkerrors.Register(ModuleName, 10, "provided asset is not supported for superfluid staking") ) diff --git a/x/superfluid/types/expected_keepers.go b/x/superfluid/types/expected_keepers.go index 53ddd548fc8..b96cda2a131 100644 --- a/x/superfluid/types/expected_keepers.go +++ b/x/superfluid/types/expected_keepers.go @@ -5,7 +5,6 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/staking/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" epochstypes "github.com/osmosis-labs/osmosis/v7/x/epochs/types" gammtypes "github.com/osmosis-labs/osmosis/v7/x/gamm/types" @@ -16,6 +15,7 @@ import ( type LockupKeeper interface { GetLocksPastTimeDenom(ctx sdk.Context, denom string, timestamp time.Time) []lockuptypes.PeriodLock GetLocksLongerThanDurationDenom(ctx sdk.Context, denom string, duration time.Duration) []lockuptypes.PeriodLock + GetAccountLockedLongerDurationDenomNotUnlockingOnly(ctx sdk.Context, addr sdk.AccAddress, denom string, duration time.Duration) []lockuptypes.PeriodLock GetPeriodLocksAccumulation(ctx sdk.Context, query lockuptypes.QueryCondition) sdk.Int GetAccountPeriodLocks(ctx sdk.Context, addr sdk.AccAddress) []lockuptypes.PeriodLock GetPeriodLocks(ctx sdk.Context) ([]lockuptypes.PeriodLock, error) @@ -24,6 +24,7 @@ type LockupKeeper interface { SlashTokensFromLockByID(ctx sdk.Context, lockID uint64, coins sdk.Coins) (*lockuptypes.PeriodLock, error) GetSyntheticLockup(ctx sdk.Context, lockID uint64, suffix string) (*lockuptypes.SyntheticLock, error) + GetAllSyntheticLockupsByAddr(ctx sdk.Context, owner sdk.AccAddress) []lockuptypes.SyntheticLock CreateSyntheticLockup(ctx sdk.Context, lockID uint64, suffix string, unlockDuration time.Duration, isUnlocking bool) error DeleteSyntheticLockup(ctx sdk.Context, lockID uint64, suffix string) error GetAllSyntheticLockupsByLockup(ctx sdk.Context, lockID uint64) []lockuptypes.SyntheticLock @@ -60,7 +61,7 @@ type StakingKeeper interface { Undelegate(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount sdk.Dec) (time.Time, error) InstantUndelegate(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount sdk.Dec) (sdk.Coins, error) GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation stakingtypes.Delegation, found bool) - GetUnbondingDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (ubd types.UnbondingDelegation, found bool) + GetUnbondingDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (ubd stakingtypes.UnbondingDelegation, found bool) UnbondingTime(ctx sdk.Context) time.Duration GetParams(ctx sdk.Context) stakingtypes.Params } diff --git a/x/superfluid/types/querier.go b/x/superfluid/types/querier.go deleted file mode 100644 index ab1254f4c2b..00000000000 --- a/x/superfluid/types/querier.go +++ /dev/null @@ -1 +0,0 @@ -package types diff --git a/x/superfluid/types/query.pb.go b/x/superfluid/types/query.pb.go index d63e92dfee1..d356911cf5a 100644 --- a/x/superfluid/types/query.pb.go +++ b/x/superfluid/types/query.pb.go @@ -6,7 +6,8 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -541,6 +542,418 @@ func (m *ConnectedIntermediaryAccountResponse) GetAccount() *SuperfluidIntermedi return nil } +type SuperfluidDelegationAmountRequest struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *SuperfluidDelegationAmountRequest) Reset() { *m = SuperfluidDelegationAmountRequest{} } +func (m *SuperfluidDelegationAmountRequest) String() string { return proto.CompactTextString(m) } +func (*SuperfluidDelegationAmountRequest) ProtoMessage() {} +func (*SuperfluidDelegationAmountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{11} +} +func (m *SuperfluidDelegationAmountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuperfluidDelegationAmountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SuperfluidDelegationAmountRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SuperfluidDelegationAmountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuperfluidDelegationAmountRequest.Merge(m, src) +} +func (m *SuperfluidDelegationAmountRequest) XXX_Size() int { + return m.Size() +} +func (m *SuperfluidDelegationAmountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SuperfluidDelegationAmountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SuperfluidDelegationAmountRequest proto.InternalMessageInfo + +func (m *SuperfluidDelegationAmountRequest) GetDelegatorAddress() string { + if m != nil { + return m.DelegatorAddress + } + return "" +} + +func (m *SuperfluidDelegationAmountRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *SuperfluidDelegationAmountRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +type SuperfluidDelegationAmountResponse struct { + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *SuperfluidDelegationAmountResponse) Reset() { *m = SuperfluidDelegationAmountResponse{} } +func (m *SuperfluidDelegationAmountResponse) String() string { return proto.CompactTextString(m) } +func (*SuperfluidDelegationAmountResponse) ProtoMessage() {} +func (*SuperfluidDelegationAmountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{12} +} +func (m *SuperfluidDelegationAmountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuperfluidDelegationAmountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SuperfluidDelegationAmountResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SuperfluidDelegationAmountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuperfluidDelegationAmountResponse.Merge(m, src) +} +func (m *SuperfluidDelegationAmountResponse) XXX_Size() int { + return m.Size() +} +func (m *SuperfluidDelegationAmountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SuperfluidDelegationAmountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SuperfluidDelegationAmountResponse proto.InternalMessageInfo + +func (m *SuperfluidDelegationAmountResponse) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +type SuperfluidDelegationsByDelegatorRequest struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` +} + +func (m *SuperfluidDelegationsByDelegatorRequest) Reset() { + *m = SuperfluidDelegationsByDelegatorRequest{} +} +func (m *SuperfluidDelegationsByDelegatorRequest) String() string { return proto.CompactTextString(m) } +func (*SuperfluidDelegationsByDelegatorRequest) ProtoMessage() {} +func (*SuperfluidDelegationsByDelegatorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{13} +} +func (m *SuperfluidDelegationsByDelegatorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuperfluidDelegationsByDelegatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SuperfluidDelegationsByDelegatorRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SuperfluidDelegationsByDelegatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuperfluidDelegationsByDelegatorRequest.Merge(m, src) +} +func (m *SuperfluidDelegationsByDelegatorRequest) XXX_Size() int { + return m.Size() +} +func (m *SuperfluidDelegationsByDelegatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SuperfluidDelegationsByDelegatorRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SuperfluidDelegationsByDelegatorRequest proto.InternalMessageInfo + +func (m *SuperfluidDelegationsByDelegatorRequest) GetDelegatorAddress() string { + if m != nil { + return m.DelegatorAddress + } + return "" +} + +type SuperfluidDelegationsByDelegatorResponse struct { + SuperfluidDelegationRecords []SuperfluidDelegationRecord `protobuf:"bytes,1,rep,name=superfluid_delegation_records,json=superfluidDelegationRecords,proto3" json:"superfluid_delegation_records"` + TotalDelegatedCoins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=total_delegated_coins,json=totalDelegatedCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_delegated_coins"` +} + +func (m *SuperfluidDelegationsByDelegatorResponse) Reset() { + *m = SuperfluidDelegationsByDelegatorResponse{} +} +func (m *SuperfluidDelegationsByDelegatorResponse) String() string { return proto.CompactTextString(m) } +func (*SuperfluidDelegationsByDelegatorResponse) ProtoMessage() {} +func (*SuperfluidDelegationsByDelegatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{14} +} +func (m *SuperfluidDelegationsByDelegatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuperfluidDelegationsByDelegatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SuperfluidDelegationsByDelegatorResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SuperfluidDelegationsByDelegatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuperfluidDelegationsByDelegatorResponse.Merge(m, src) +} +func (m *SuperfluidDelegationsByDelegatorResponse) XXX_Size() int { + return m.Size() +} +func (m *SuperfluidDelegationsByDelegatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SuperfluidDelegationsByDelegatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SuperfluidDelegationsByDelegatorResponse proto.InternalMessageInfo + +func (m *SuperfluidDelegationsByDelegatorResponse) GetSuperfluidDelegationRecords() []SuperfluidDelegationRecord { + if m != nil { + return m.SuperfluidDelegationRecords + } + return nil +} + +func (m *SuperfluidDelegationsByDelegatorResponse) GetTotalDelegatedCoins() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TotalDelegatedCoins + } + return nil +} + +type SuperfluidDelegationsByValidatorDenomRequest struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *SuperfluidDelegationsByValidatorDenomRequest) Reset() { + *m = SuperfluidDelegationsByValidatorDenomRequest{} +} +func (m *SuperfluidDelegationsByValidatorDenomRequest) String() string { + return proto.CompactTextString(m) +} +func (*SuperfluidDelegationsByValidatorDenomRequest) ProtoMessage() {} +func (*SuperfluidDelegationsByValidatorDenomRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{15} +} +func (m *SuperfluidDelegationsByValidatorDenomRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuperfluidDelegationsByValidatorDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SuperfluidDelegationsByValidatorDenomRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SuperfluidDelegationsByValidatorDenomRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuperfluidDelegationsByValidatorDenomRequest.Merge(m, src) +} +func (m *SuperfluidDelegationsByValidatorDenomRequest) XXX_Size() int { + return m.Size() +} +func (m *SuperfluidDelegationsByValidatorDenomRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SuperfluidDelegationsByValidatorDenomRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SuperfluidDelegationsByValidatorDenomRequest proto.InternalMessageInfo + +func (m *SuperfluidDelegationsByValidatorDenomRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *SuperfluidDelegationsByValidatorDenomRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +type SuperfluidDelegationsByValidatorDenomResponse struct { + SuperfluidDelegationRecords []SuperfluidDelegationRecord `protobuf:"bytes,1,rep,name=superfluid_delegation_records,json=superfluidDelegationRecords,proto3" json:"superfluid_delegation_records"` +} + +func (m *SuperfluidDelegationsByValidatorDenomResponse) Reset() { + *m = SuperfluidDelegationsByValidatorDenomResponse{} +} +func (m *SuperfluidDelegationsByValidatorDenomResponse) String() string { + return proto.CompactTextString(m) +} +func (*SuperfluidDelegationsByValidatorDenomResponse) ProtoMessage() {} +func (*SuperfluidDelegationsByValidatorDenomResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{16} +} +func (m *SuperfluidDelegationsByValidatorDenomResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuperfluidDelegationsByValidatorDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SuperfluidDelegationsByValidatorDenomResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SuperfluidDelegationsByValidatorDenomResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuperfluidDelegationsByValidatorDenomResponse.Merge(m, src) +} +func (m *SuperfluidDelegationsByValidatorDenomResponse) XXX_Size() int { + return m.Size() +} +func (m *SuperfluidDelegationsByValidatorDenomResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SuperfluidDelegationsByValidatorDenomResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SuperfluidDelegationsByValidatorDenomResponse proto.InternalMessageInfo + +func (m *SuperfluidDelegationsByValidatorDenomResponse) GetSuperfluidDelegationRecords() []SuperfluidDelegationRecord { + if m != nil { + return m.SuperfluidDelegationRecords + } + return nil +} + +type EstimateSuperfluidDelegatedAmountByValidatorDenomRequest struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) Reset() { + *m = EstimateSuperfluidDelegatedAmountByValidatorDenomRequest{} +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) String() string { + return proto.CompactTextString(m) +} +func (*EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) ProtoMessage() {} +func (*EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{17} +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EstimateSuperfluidDelegatedAmountByValidatorDenomRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EstimateSuperfluidDelegatedAmountByValidatorDenomRequest.Merge(m, src) +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) XXX_Size() int { + return m.Size() +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EstimateSuperfluidDelegatedAmountByValidatorDenomRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_EstimateSuperfluidDelegatedAmountByValidatorDenomRequest proto.InternalMessageInfo + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +type EstimateSuperfluidDelegatedAmountByValidatorDenomResponse struct { + TotalDelegatedCoins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=total_delegated_coins,json=totalDelegatedCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_delegated_coins"` +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) Reset() { + *m = EstimateSuperfluidDelegatedAmountByValidatorDenomResponse{} +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) String() string { + return proto.CompactTextString(m) +} +func (*EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) ProtoMessage() {} +func (*EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{18} +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EstimateSuperfluidDelegatedAmountByValidatorDenomResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EstimateSuperfluidDelegatedAmountByValidatorDenomResponse.Merge(m, src) +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) XXX_Size() int { + return m.Size() +} +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EstimateSuperfluidDelegatedAmountByValidatorDenomResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_EstimateSuperfluidDelegatedAmountByValidatorDenomResponse proto.InternalMessageInfo + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) GetTotalDelegatedCoins() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TotalDelegatedCoins + } + return nil +} + func init() { proto.RegisterType((*AssetTypeRequest)(nil), "osmosis.superfluid.AssetTypeRequest") proto.RegisterType((*AssetTypeResponse)(nil), "osmosis.superfluid.AssetTypeResponse") @@ -553,64 +966,98 @@ func init() { proto.RegisterType((*AllIntermediaryAccountsResponse)(nil), "osmosis.superfluid.AllIntermediaryAccountsResponse") proto.RegisterType((*ConnectedIntermediaryAccountRequest)(nil), "osmosis.superfluid.ConnectedIntermediaryAccountRequest") proto.RegisterType((*ConnectedIntermediaryAccountResponse)(nil), "osmosis.superfluid.ConnectedIntermediaryAccountResponse") + proto.RegisterType((*SuperfluidDelegationAmountRequest)(nil), "osmosis.superfluid.SuperfluidDelegationAmountRequest") + proto.RegisterType((*SuperfluidDelegationAmountResponse)(nil), "osmosis.superfluid.SuperfluidDelegationAmountResponse") + proto.RegisterType((*SuperfluidDelegationsByDelegatorRequest)(nil), "osmosis.superfluid.SuperfluidDelegationsByDelegatorRequest") + proto.RegisterType((*SuperfluidDelegationsByDelegatorResponse)(nil), "osmosis.superfluid.SuperfluidDelegationsByDelegatorResponse") + proto.RegisterType((*SuperfluidDelegationsByValidatorDenomRequest)(nil), "osmosis.superfluid.SuperfluidDelegationsByValidatorDenomRequest") + proto.RegisterType((*SuperfluidDelegationsByValidatorDenomResponse)(nil), "osmosis.superfluid.SuperfluidDelegationsByValidatorDenomResponse") + proto.RegisterType((*EstimateSuperfluidDelegatedAmountByValidatorDenomRequest)(nil), "osmosis.superfluid.EstimateSuperfluidDelegatedAmountByValidatorDenomRequest") + proto.RegisterType((*EstimateSuperfluidDelegatedAmountByValidatorDenomResponse)(nil), "osmosis.superfluid.EstimateSuperfluidDelegatedAmountByValidatorDenomResponse") } func init() { proto.RegisterFile("osmosis/superfluid/query.proto", fileDescriptor_e3d9448e4ed3943f) } var fileDescriptor_e3d9448e4ed3943f = []byte{ - // 828 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4d, 0x4f, 0xdb, 0x48, - 0x18, 0x8e, 0xf9, 0x48, 0x60, 0x90, 0x76, 0x61, 0x84, 0x96, 0x6c, 0x84, 0x0c, 0x6b, 0x58, 0x88, - 0x58, 0xad, 0xbd, 0x84, 0x05, 0xf6, 0xb0, 0xad, 0x14, 0xda, 0x52, 0x45, 0x6a, 0x45, 0x9b, 0x56, - 0xad, 0xd4, 0x1e, 0xa2, 0x89, 0x3d, 0x18, 0xab, 0xb6, 0xc7, 0x78, 0xc6, 0x69, 0x23, 0xc4, 0xa5, - 0xa7, 0x56, 0xbd, 0x20, 0xf5, 0x4f, 0xf4, 0x6f, 0x54, 0xbd, 0x70, 0x44, 0xea, 0xa5, 0xa7, 0xb6, - 0x82, 0xfe, 0x86, 0x9e, 0x2b, 0x8f, 0xc7, 0x8e, 0x09, 0x4e, 0x02, 0xbd, 0x79, 0xe6, 0xfd, 0x7a, - 0x9e, 0x77, 0xde, 0xf7, 0x31, 0x90, 0x09, 0x75, 0x08, 0xb5, 0xa8, 0x46, 0x03, 0x0f, 0xfb, 0xbb, - 0x76, 0x60, 0x19, 0xda, 0x7e, 0x80, 0xfd, 0xb6, 0xea, 0xf9, 0x84, 0x11, 0x08, 0x85, 0x5d, 0xed, - 0xd8, 0x4b, 0xd3, 0x26, 0x31, 0x09, 0x37, 0x6b, 0xe1, 0x57, 0xe4, 0x59, 0x92, 0x75, 0xee, 0xaa, - 0x35, 0x11, 0xc5, 0x5a, 0x6b, 0xb5, 0x89, 0x19, 0x5a, 0xd5, 0x74, 0x62, 0xb9, 0xc2, 0x3e, 0x6b, - 0x12, 0x62, 0xda, 0x58, 0x43, 0x9e, 0xa5, 0x21, 0xd7, 0x25, 0x0c, 0x31, 0x8b, 0xb8, 0x54, 0x58, - 0xe7, 0x84, 0x95, 0x9f, 0x9a, 0xc1, 0xae, 0xc6, 0x2c, 0x07, 0x53, 0x86, 0x1c, 0x2f, 0x4e, 0xdf, - 0xed, 0x60, 0x04, 0x3e, 0xcf, 0x20, 0xec, 0x0b, 0x19, 0x44, 0x3a, 0x9f, 0xc2, 0x69, 0x25, 0x8d, - 0x91, 0xd3, 0x4c, 0x90, 0x7a, 0xc8, 0xb4, 0xdc, 0x54, 0x42, 0xa5, 0x0c, 0x26, 0xab, 0x94, 0x62, - 0xf6, 0xb0, 0xed, 0xe1, 0x3a, 0xde, 0x0f, 0x30, 0x65, 0x70, 0x1a, 0x8c, 0x1a, 0xd8, 0x25, 0x4e, - 0x51, 0x9a, 0x97, 0xca, 0xe3, 0xf5, 0xe8, 0xa0, 0x3c, 0x05, 0x53, 0x29, 0x4f, 0xea, 0x11, 0x97, - 0x62, 0xb8, 0x0d, 0x00, 0x0a, 0x2f, 0x1b, 0xac, 0xed, 0x61, 0xee, 0xff, 0x4b, 0x65, 0x59, 0xbd, - 0xd8, 0x4d, 0xf5, 0x41, 0xf2, 0xd9, 0x49, 0x32, 0x8e, 0xe2, 0x4f, 0x05, 0x82, 0xc9, 0xaa, 0x6d, - 0x73, 0x13, 0x15, 0x30, 0x94, 0x47, 0x60, 0x2a, 0x75, 0x27, 0x0a, 0x56, 0x41, 0x9e, 0x47, 0xd1, - 0xa2, 0x34, 0x3f, 0x5c, 0x9e, 0xa8, 0x2c, 0x5c, 0xa2, 0xd8, 0xd6, 0xc8, 0xf1, 0xe7, 0xb9, 0x5c, - 0x5d, 0x04, 0x2a, 0x2a, 0xf8, 0x8d, 0x5f, 0xdf, 0x0d, 0x6c, 0x66, 0x79, 0xb6, 0x85, 0xfd, 0xfe, - 0xc4, 0xdf, 0x48, 0x60, 0xe6, 0x42, 0x80, 0x80, 0xe3, 0x81, 0x52, 0x58, 0xbf, 0x81, 0xf7, 0x03, - 0xab, 0x85, 0x6c, 0xec, 0xb2, 0x86, 0x93, 0x78, 0xf1, 0x34, 0x13, 0x95, 0x4a, 0x16, 0xc4, 0x1d, - 0xea, 0x90, 0x5b, 0x49, 0x50, 0x3a, 0xb3, 0x4e, 0x7c, 0xa3, 0x5e, 0x24, 0x3d, 0xec, 0xca, 0x6b, - 0x09, 0xfc, 0xd1, 0xe1, 0x57, 0x73, 0x19, 0xf6, 0x1d, 0x6c, 0x58, 0xc8, 0x6f, 0x57, 0x75, 0x9d, - 0x04, 0x2e, 0xab, 0xb9, 0xbb, 0x24, 0x9b, 0x09, 0xfc, 0x1d, 0x8c, 0xb5, 0x90, 0xdd, 0x40, 0x86, - 0xe1, 0x17, 0x87, 0xb8, 0xa1, 0xd0, 0x42, 0x76, 0xd5, 0x30, 0xfc, 0xd0, 0x64, 0xa2, 0xc0, 0xc4, - 0x0d, 0xcb, 0x28, 0x0e, 0xcf, 0x4b, 0xe5, 0x91, 0x7a, 0x81, 0x9f, 0x6b, 0x06, 0x2c, 0x82, 0x42, - 0x18, 0x81, 0x29, 0x2d, 0x8e, 0x44, 0x41, 0xe2, 0xa8, 0xec, 0x01, 0xb9, 0x6a, 0xdb, 0x19, 0x18, - 0xe2, 0x37, 0x0c, 0xe7, 0xa3, 0x33, 0x72, 0xa2, 0x1f, 0x4b, 0x6a, 0x34, 0x9f, 0x6a, 0x38, 0x9f, - 0x6a, 0xb4, 0x86, 0x62, 0x3e, 0xd5, 0x7b, 0xc8, 0x8c, 0xc7, 0xb0, 0x9e, 0x8a, 0x54, 0x3e, 0x48, - 0x60, 0xae, 0x67, 0x29, 0xf1, 0x16, 0x8f, 0xc1, 0x18, 0x12, 0x77, 0x62, 0x38, 0xd6, 0xfb, 0x0f, - 0x47, 0x8f, 0xe6, 0x89, 0x71, 0x49, 0x92, 0xc1, 0xdb, 0xe7, 0x48, 0x0c, 0x71, 0x12, 0xcb, 0x03, - 0x49, 0x44, 0xa8, 0xce, 0xb1, 0xb8, 0x0e, 0x16, 0x6e, 0x10, 0xd7, 0xc5, 0x3a, 0xc3, 0x59, 0xc5, - 0xe3, 0xa6, 0xcd, 0x80, 0x82, 0x4d, 0xf4, 0x67, 0xe1, 0x53, 0x48, 0xfc, 0x29, 0xf2, 0xe1, 0xb1, - 0x66, 0x28, 0xcf, 0xc1, 0x62, 0xff, 0x78, 0xd1, 0x89, 0x1d, 0x50, 0x10, 0xe0, 0x45, 0xcb, 0x7f, - 0xae, 0x11, 0xf5, 0x38, 0x4b, 0xe5, 0x7b, 0x1e, 0x8c, 0xde, 0x0f, 0x39, 0xc2, 0x23, 0x09, 0x8c, - 0x27, 0x1b, 0x0c, 0x17, 0xb3, 0xf2, 0x76, 0xeb, 0x49, 0xe9, 0xcf, 0x01, 0x5e, 0x11, 0x6a, 0x65, - 0xe3, 0xe5, 0xc7, 0x6f, 0x6f, 0x87, 0xfe, 0x81, 0xaa, 0x96, 0x21, 0x72, 0xb1, 0x80, 0x75, 0xd4, - 0x46, 0x3b, 0xe0, 0x43, 0x7d, 0x08, 0x5f, 0x85, 0x90, 0x62, 0xa1, 0xe8, 0x01, 0xa9, 0x4b, 0x5b, - 0x7a, 0x40, 0xea, 0x56, 0x1b, 0x45, 0xe5, 0x90, 0xca, 0x70, 0xa9, 0x2f, 0x24, 0xdb, 0x6e, 0x44, - 0xd2, 0x02, 0xdf, 0x49, 0xe0, 0xd7, 0x2e, 0xa9, 0x80, 0x2b, 0x3d, 0xd9, 0x5f, 0x10, 0xa0, 0xd2, - 0x5f, 0x97, 0xf2, 0x15, 0xe0, 0xfe, 0xe7, 0xe0, 0x36, 0xe0, 0xbf, 0x83, 0xfb, 0xd5, 0xd1, 0xa4, - 0xa4, 0x6b, 0xef, 0x43, 0x55, 0xcb, 0xde, 0x28, 0x58, 0xe9, 0xd1, 0x9d, 0x3e, 0x9b, 0x5e, 0x5a, - 0xbb, 0x52, 0x8c, 0xa0, 0x70, 0x8d, 0x53, 0xd8, 0x84, 0xeb, 0x83, 0xfa, 0x6b, 0xa5, 0xb2, 0x34, - 0x92, 0xc5, 0xfc, 0x22, 0x81, 0xd9, 0x7e, 0x0b, 0x01, 0x37, 0xb3, 0x40, 0x5d, 0x62, 0x05, 0x4b, - 0xff, 0x5d, 0x3d, 0x50, 0x50, 0xba, 0xc3, 0x29, 0x6d, 0xc3, 0x9b, 0xfd, 0x28, 0xe9, 0x71, 0xa6, - 0x4c, 0x62, 0xda, 0x81, 0x58, 0xff, 0xc3, 0xad, 0x9d, 0xe3, 0x53, 0x59, 0x3a, 0x39, 0x95, 0xa5, - 0xaf, 0xa7, 0xb2, 0x74, 0x74, 0x26, 0xe7, 0x4e, 0xce, 0xe4, 0xdc, 0xa7, 0x33, 0x39, 0xf7, 0x64, - 0xdd, 0xb4, 0xd8, 0x5e, 0xd0, 0x54, 0x75, 0xe2, 0xc4, 0x95, 0xfe, 0xb6, 0x51, 0x93, 0x26, 0x65, - 0x5b, 0x9b, 0xda, 0x8b, 0x74, 0xed, 0x70, 0x67, 0x68, 0x33, 0xcf, 0x7f, 0xfb, 0x6b, 0x3f, 0x02, - 0x00, 0x00, 0xff, 0xff, 0xd8, 0x33, 0xd6, 0x57, 0x12, 0x09, 0x00, 0x00, + // 1239 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4d, 0x6f, 0xdc, 0x44, + 0x18, 0xce, 0x6c, 0xd3, 0xa4, 0x99, 0x4a, 0x25, 0x19, 0x0a, 0xdd, 0x9a, 0xb2, 0x09, 0x4e, 0xdb, + 0xac, 0x5a, 0x62, 0x37, 0x5b, 0xf2, 0x01, 0x14, 0xd4, 0x4d, 0x93, 0x94, 0x48, 0x0d, 0x81, 0xa5, + 0x0a, 0x12, 0x20, 0x59, 0xb3, 0xeb, 0xc9, 0xd6, 0xaa, 0xed, 0xd9, 0x78, 0xec, 0xa5, 0xab, 0x2a, + 0x42, 0xe2, 0x44, 0xc5, 0xa5, 0x52, 0x7f, 0x03, 0x12, 0x70, 0xe0, 0x17, 0x70, 0x41, 0x5c, 0x7a, + 0x41, 0xaa, 0xc4, 0x85, 0x13, 0x45, 0x09, 0x1c, 0xf9, 0x05, 0x5c, 0x90, 0xc7, 0x63, 0xaf, 0x77, + 0x63, 0x7b, 0x3f, 0x28, 0x70, 0x8a, 0xed, 0xf7, 0x63, 0xde, 0xe7, 0x7d, 0x9f, 0x99, 0x79, 0xb2, + 0xb0, 0x40, 0x99, 0x45, 0x99, 0xc1, 0x54, 0xe6, 0x35, 0x88, 0xb3, 0x6b, 0x7a, 0x86, 0xae, 0xee, + 0x79, 0xc4, 0x69, 0x29, 0x0d, 0x87, 0xba, 0x14, 0x21, 0x61, 0x57, 0xda, 0x76, 0xe9, 0x74, 0x9d, + 0xd6, 0x29, 0x37, 0xab, 0xfe, 0x53, 0xe0, 0x29, 0x15, 0x6a, 0xdc, 0x55, 0xad, 0x62, 0x46, 0xd4, + 0xe6, 0x42, 0x95, 0xb8, 0x78, 0x41, 0xad, 0x51, 0xc3, 0x16, 0xf6, 0x73, 0x75, 0x4a, 0xeb, 0x26, + 0x51, 0x71, 0xc3, 0x50, 0xb1, 0x6d, 0x53, 0x17, 0xbb, 0x06, 0xb5, 0x99, 0xb0, 0x4e, 0x0b, 0x2b, + 0x7f, 0xab, 0x7a, 0xbb, 0xaa, 0x6b, 0x58, 0x84, 0xb9, 0xd8, 0x6a, 0x84, 0xe9, 0xbb, 0x1d, 0x74, + 0xcf, 0xe1, 0x19, 0x84, 0x7d, 0x36, 0x01, 0x48, 0xfb, 0x51, 0x38, 0x5d, 0x8a, 0xd7, 0xc8, 0x61, + 0x46, 0x95, 0x36, 0x70, 0xdd, 0xb0, 0x63, 0x09, 0xe5, 0x22, 0x9c, 0x2c, 0x33, 0x46, 0xdc, 0xdb, + 0xad, 0x06, 0xa9, 0x90, 0x3d, 0x8f, 0x30, 0x17, 0x9d, 0x86, 0xc7, 0x75, 0x62, 0x53, 0x2b, 0x0f, + 0x66, 0x40, 0x71, 0xa2, 0x12, 0xbc, 0xc8, 0x1f, 0xc3, 0xa9, 0x98, 0x27, 0x6b, 0x50, 0x9b, 0x11, + 0xb4, 0x01, 0x21, 0xf6, 0x3f, 0x6a, 0x6e, 0xab, 0x41, 0xb8, 0xff, 0xa9, 0xd2, 0x9c, 0x72, 0xb4, + 0x9b, 0xca, 0x07, 0xd1, 0x63, 0x3b, 0xc9, 0x04, 0x0e, 0x1f, 0x65, 0x04, 0x27, 0xcb, 0xa6, 0xc9, + 0x4d, 0x4c, 0x94, 0x21, 0xef, 0xc0, 0xa9, 0xd8, 0x37, 0xb1, 0x60, 0x19, 0x8e, 0xf1, 0x28, 0x96, + 0x07, 0x33, 0xc7, 0x8a, 0x27, 0x4b, 0xb3, 0x7d, 0x2c, 0xb6, 0x3a, 0xfa, 0xf8, 0xd7, 0xe9, 0x91, + 0x8a, 0x08, 0x94, 0x15, 0xf8, 0x22, 0xff, 0xbc, 0xe5, 0x99, 0xae, 0xd1, 0x30, 0x0d, 0xe2, 0x64, + 0x03, 0xff, 0x12, 0xc0, 0x33, 0x47, 0x02, 0x44, 0x39, 0x0d, 0x28, 0xf9, 0xeb, 0x6b, 0x64, 0xcf, + 0x33, 0x9a, 0xd8, 0x24, 0xb6, 0xab, 0x59, 0x91, 0x17, 0x4f, 0x73, 0xb2, 0x54, 0x4a, 0x2a, 0x71, + 0x9b, 0x59, 0x74, 0x3d, 0x0a, 0x8a, 0x67, 0xae, 0x51, 0x47, 0xaf, 0xe4, 0x69, 0x8a, 0x5d, 0x7e, + 0x00, 0xe0, 0x2b, 0x6d, 0x7c, 0x9b, 0xb6, 0x4b, 0x1c, 0x8b, 0xe8, 0x06, 0x76, 0x5a, 0xe5, 0x5a, + 0x8d, 0x7a, 0xb6, 0xbb, 0x69, 0xef, 0xd2, 0x64, 0x24, 0xe8, 0x2c, 0x3c, 0xd1, 0xc4, 0xa6, 0x86, + 0x75, 0xdd, 0xc9, 0xe7, 0xb8, 0x61, 0xbc, 0x89, 0xcd, 0xb2, 0xae, 0x3b, 0xbe, 0xa9, 0x8e, 0xbd, + 0x3a, 0xd1, 0x0c, 0x3d, 0x7f, 0x6c, 0x06, 0x14, 0x47, 0x2b, 0xe3, 0xfc, 0x7d, 0x53, 0x47, 0x79, + 0x38, 0xee, 0x47, 0x10, 0xc6, 0xf2, 0xa3, 0x41, 0x90, 0x78, 0x95, 0xef, 0xc0, 0x42, 0xd9, 0x34, + 0x13, 0x6a, 0x08, 0x67, 0xe8, 0xf3, 0xa3, 0x4d, 0x39, 0xd1, 0x8f, 0x8b, 0x4a, 0xc0, 0x4f, 0xc5, + 0xe7, 0xa7, 0x12, 0x6c, 0x43, 0xc1, 0x4f, 0xe5, 0x3d, 0x5c, 0x0f, 0x69, 0x58, 0x89, 0x45, 0xca, + 0x3f, 0x02, 0x38, 0x9d, 0xba, 0x94, 0x98, 0xc5, 0x87, 0xf0, 0x04, 0x16, 0xdf, 0x04, 0x39, 0x16, + 0xb3, 0xc9, 0x91, 0xd2, 0x3c, 0x41, 0x97, 0x28, 0x19, 0xba, 0xd9, 0x01, 0x22, 0xc7, 0x41, 0xcc, + 0xf5, 0x04, 0x11, 0x54, 0xd5, 0x81, 0xe2, 0x6d, 0x38, 0x7b, 0x83, 0xda, 0x36, 0xa9, 0xb9, 0x24, + 0x69, 0xf1, 0xb0, 0x69, 0x67, 0xe0, 0xb8, 0x49, 0x6b, 0x77, 0xfd, 0x51, 0x00, 0x3e, 0x8a, 0x31, + 0xff, 0x75, 0x53, 0x97, 0x3f, 0x85, 0xe7, 0xb3, 0xe3, 0x45, 0x27, 0xb6, 0xe1, 0xb8, 0x28, 0x5e, + 0xb4, 0x7c, 0xb8, 0x46, 0x54, 0xc2, 0x2c, 0xf2, 0xa3, 0x0e, 0xd2, 0xad, 0x11, 0x93, 0xd4, 0x39, + 0xa2, 0xb2, 0x15, 0xaf, 0xfb, 0x32, 0x9c, 0xd2, 0x03, 0x13, 0x75, 0xb4, 0x90, 0x32, 0x01, 0x01, + 0x27, 0x23, 0x43, 0x39, 0xf8, 0xee, 0x3b, 0x37, 0xb1, 0x69, 0xe8, 0x1d, 0xce, 0x01, 0x29, 0x27, + 0x23, 0x43, 0xe8, 0x1c, 0xd1, 0xf9, 0x58, 0x7c, 0x63, 0x3e, 0x00, 0x50, 0xce, 0xaa, 0x4a, 0x74, + 0xa3, 0x06, 0xc7, 0xb0, 0x25, 0x9a, 0xe1, 0xb3, 0xe2, 0x6c, 0xc7, 0xe8, 0xc2, 0xa1, 0xdd, 0xa0, + 0x86, 0xbd, 0x7a, 0xc5, 0x9f, 0xfc, 0xb7, 0x4f, 0xa7, 0x8b, 0x75, 0xc3, 0xbd, 0xe3, 0x55, 0x95, + 0x1a, 0xb5, 0x54, 0x71, 0x98, 0x06, 0x7f, 0xe6, 0x99, 0x7e, 0x57, 0xf5, 0xcf, 0x3a, 0xc6, 0x03, + 0x58, 0x45, 0xa4, 0x96, 0x77, 0xe0, 0x5c, 0x52, 0x29, 0x6c, 0xb5, 0xb5, 0x16, 0x22, 0x1f, 0xa6, + 0x4d, 0xf2, 0x57, 0x39, 0x58, 0xec, 0x9d, 0x58, 0x20, 0xbd, 0x07, 0x5f, 0x6e, 0xcf, 0x57, 0xd3, + 0x23, 0x67, 0xcd, 0xe1, 0xa7, 0x4a, 0xb8, 0x2d, 0x94, 0x6c, 0x36, 0xb4, 0x17, 0x09, 0x0e, 0x23, + 0xb1, 0x1f, 0x5e, 0x62, 0xa9, 0x1e, 0x0c, 0x7d, 0x06, 0x5f, 0x70, 0xa9, 0x8b, 0xcd, 0x70, 0x51, + 0xa2, 0x6b, 0xfe, 0xa5, 0xe8, 0x4f, 0xf4, 0x99, 0xb7, 0xfc, 0x79, 0xbe, 0xd2, 0x5a, 0xb8, 0x10, + 0xff, 0x28, 0xef, 0xc1, 0x57, 0x53, 0xda, 0xb4, 0x13, 0x92, 0x69, 0xcd, 0x27, 0x4d, 0x6c, 0x08, + 0x47, 0xe9, 0x07, 0x7a, 0xd1, 0x2f, 0x17, 0xa7, 0xdf, 0x37, 0x00, 0xce, 0xf7, 0xb9, 0xe6, 0xff, + 0x3d, 0x1f, 0x79, 0x1f, 0xae, 0xac, 0x33, 0xd7, 0xb0, 0xb0, 0x4b, 0x8e, 0x24, 0x22, 0x7a, 0xb0, + 0x61, 0xfe, 0xc5, 0x56, 0x7d, 0x0f, 0xe0, 0xeb, 0x43, 0xac, 0x2f, 0xda, 0x96, 0x4a, 0x2e, 0xf0, + 0xdf, 0x90, 0xab, 0xf4, 0xc7, 0x29, 0x78, 0xfc, 0x7d, 0xff, 0x88, 0x47, 0x0f, 0x01, 0x9c, 0x88, + 0x04, 0x0c, 0x3a, 0x9f, 0x34, 0xa8, 0x6e, 0x39, 0x25, 0x5d, 0xe8, 0xe1, 0x15, 0xa0, 0x94, 0x97, + 0x3e, 0xff, 0xf9, 0xf7, 0x47, 0xb9, 0x2b, 0x48, 0x51, 0x13, 0x34, 0x5e, 0xa8, 0xdf, 0xda, 0x62, + 0x4b, 0xbd, 0xcf, 0x5b, 0xbb, 0x8f, 0xbe, 0xf0, 0x4b, 0x0a, 0x75, 0x52, 0x4a, 0x49, 0x5d, 0xd2, + 0x2a, 0xa5, 0xa4, 0x6e, 0xb1, 0x25, 0x2b, 0xbc, 0xa4, 0x22, 0xba, 0x98, 0x59, 0x92, 0x69, 0x6a, + 0x81, 0xb2, 0x42, 0x5f, 0x03, 0xf8, 0x5c, 0x97, 0x52, 0x42, 0x97, 0x52, 0xd1, 0x1f, 0xd1, 0x5f, + 0xd2, 0xe5, 0xbe, 0x7c, 0x45, 0x71, 0xd7, 0x78, 0x71, 0x4b, 0xe8, 0xb5, 0xde, 0xfd, 0x6a, 0x4b, + 0xb2, 0xa8, 0x6b, 0x3f, 0xf8, 0xa2, 0x2e, 0x59, 0x50, 0xa0, 0x52, 0x4a, 0x77, 0x32, 0x84, 0x8e, + 0x74, 0x75, 0xa0, 0x18, 0x01, 0xe1, 0x2d, 0x0e, 0x61, 0x19, 0x2d, 0xf6, 0xea, 0xaf, 0x11, 0xcb, + 0xa2, 0x45, 0xba, 0xe4, 0x29, 0x80, 0xe7, 0xb2, 0xf4, 0x00, 0x5a, 0x4e, 0x2a, 0xaa, 0x0f, 0x05, + 0x22, 0xad, 0x0c, 0x1e, 0x28, 0x20, 0xdd, 0xe2, 0x90, 0x36, 0xd0, 0x5a, 0x16, 0xa4, 0x5a, 0x98, + 0x29, 0x11, 0x98, 0x7a, 0x5f, 0xa8, 0x9f, 0x7d, 0xf4, 0x13, 0x80, 0x52, 0xfa, 0x0d, 0x8f, 0x16, + 0xfb, 0x3d, 0x28, 0x3b, 0x74, 0x8a, 0xb4, 0x34, 0x68, 0x98, 0xc0, 0x76, 0x9d, 0x63, 0x7b, 0x03, + 0xad, 0x64, 0x61, 0x4b, 0x3e, 0xe0, 0x03, 0x95, 0x80, 0xfe, 0x04, 0x70, 0xa6, 0xd7, 0x6d, 0x8e, + 0xde, 0xec, 0xb7, 0xbc, 0x04, 0x71, 0x21, 0x5d, 0x1b, 0x2e, 0x58, 0x20, 0x7c, 0x97, 0x23, 0x7c, + 0x07, 0x6d, 0x0c, 0x8c, 0x90, 0xf9, 0x3b, 0xab, 0x4b, 0xd4, 0xec, 0xa3, 0xbf, 0x00, 0xbc, 0xd0, + 0xd7, 0x15, 0x89, 0xae, 0x0f, 0x50, 0x77, 0xe2, 0x35, 0x25, 0x95, 0xff, 0x41, 0x06, 0x01, 0x7f, + 0x8b, 0xc3, 0xbf, 0x89, 0xd6, 0x07, 0x87, 0xaf, 0x55, 0x5b, 0x5a, 0xfb, 0x96, 0x0c, 0xfe, 0xdd, + 0xfa, 0x2e, 0x07, 0x17, 0x06, 0xbe, 0xf5, 0xd0, 0xad, 0x24, 0x1c, 0xc3, 0x5e, 0xde, 0xd2, 0xd6, + 0x33, 0xca, 0x26, 0x3a, 0xf4, 0x09, 0xef, 0xd0, 0x0e, 0xba, 0x9d, 0xd5, 0x21, 0x22, 0xd2, 0x6b, + 0x59, 0x7b, 0x21, 0xa1, 0x61, 0xab, 0xdb, 0x8f, 0x0f, 0x0a, 0xe0, 0xc9, 0x41, 0x01, 0xfc, 0x76, + 0x50, 0x00, 0x0f, 0x0f, 0x0b, 0x23, 0x4f, 0x0e, 0x0b, 0x23, 0xbf, 0x1c, 0x16, 0x46, 0x3e, 0x5a, + 0x8c, 0x5d, 0xe0, 0x62, 0xe5, 0x79, 0x13, 0x57, 0x59, 0x54, 0x46, 0x73, 0x59, 0xbd, 0x17, 0xaf, + 0x85, 0xdf, 0xe9, 0xd5, 0x31, 0xfe, 0x23, 0xc7, 0xd5, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x86, + 0xf4, 0x38, 0x4a, 0x00, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -635,6 +1082,18 @@ type QueryClient interface { AllIntermediaryAccounts(ctx context.Context, in *AllIntermediaryAccountsRequest, opts ...grpc.CallOption) (*AllIntermediaryAccountsResponse, error) // Returns intermediary account connected to a superfluid staked lock by id ConnectedIntermediaryAccount(ctx context.Context, in *ConnectedIntermediaryAccountRequest, opts ...grpc.CallOption) (*ConnectedIntermediaryAccountResponse, error) + // Returns the coins superfluid delegated for a delegator, validator, denom + // triplet + SuperfluidDelegationAmount(ctx context.Context, in *SuperfluidDelegationAmountRequest, opts ...grpc.CallOption) (*SuperfluidDelegationAmountResponse, error) + // Returns all the superfluid poistions for a specific delegator + SuperfluidDelegationsByDelegator(ctx context.Context, in *SuperfluidDelegationsByDelegatorRequest, opts ...grpc.CallOption) (*SuperfluidDelegationsByDelegatorResponse, error) + // Returns all the superfluid positions of a specific denom delegated to one + // validator + SuperfluidDelegationsByValidatorDenom(ctx context.Context, in *SuperfluidDelegationsByValidatorDenomRequest, opts ...grpc.CallOption) (*SuperfluidDelegationsByValidatorDenomResponse, error) + // Returns the amount of a specific denom delegated to a specific validator + // This is labeled an estimate, because the way it calculates the amount can + // lead rounding errors from the true delegated amount + EstimateSuperfluidDelegatedAmountByValidatorDenom(ctx context.Context, in *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest, opts ...grpc.CallOption) (*EstimateSuperfluidDelegatedAmountByValidatorDenomResponse, error) } type queryClient struct { @@ -690,18 +1149,66 @@ func (c *queryClient) ConnectedIntermediaryAccount(ctx context.Context, in *Conn return out, nil } -// QueryServer is the server API for Query service. -type QueryServer interface { - // Returns superfluid asset type - AssetType(context.Context, *AssetTypeRequest) (*AssetTypeResponse, error) - // Returns all superfluid asset types - AllAssets(context.Context, *AllAssetsRequest) (*AllAssetsResponse, error) - // Returns superfluid asset Multiplier - AssetMultiplier(context.Context, *AssetMultiplierRequest) (*AssetMultiplierResponse, error) - // Returns all superfluid intermediary account - AllIntermediaryAccounts(context.Context, *AllIntermediaryAccountsRequest) (*AllIntermediaryAccountsResponse, error) +func (c *queryClient) SuperfluidDelegationAmount(ctx context.Context, in *SuperfluidDelegationAmountRequest, opts ...grpc.CallOption) (*SuperfluidDelegationAmountResponse, error) { + out := new(SuperfluidDelegationAmountResponse) + err := c.cc.Invoke(ctx, "/osmosis.superfluid.Query/SuperfluidDelegationAmount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SuperfluidDelegationsByDelegator(ctx context.Context, in *SuperfluidDelegationsByDelegatorRequest, opts ...grpc.CallOption) (*SuperfluidDelegationsByDelegatorResponse, error) { + out := new(SuperfluidDelegationsByDelegatorResponse) + err := c.cc.Invoke(ctx, "/osmosis.superfluid.Query/SuperfluidDelegationsByDelegator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SuperfluidDelegationsByValidatorDenom(ctx context.Context, in *SuperfluidDelegationsByValidatorDenomRequest, opts ...grpc.CallOption) (*SuperfluidDelegationsByValidatorDenomResponse, error) { + out := new(SuperfluidDelegationsByValidatorDenomResponse) + err := c.cc.Invoke(ctx, "/osmosis.superfluid.Query/SuperfluidDelegationsByValidatorDenom", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) EstimateSuperfluidDelegatedAmountByValidatorDenom(ctx context.Context, in *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest, opts ...grpc.CallOption) (*EstimateSuperfluidDelegatedAmountByValidatorDenomResponse, error) { + out := new(EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) + err := c.cc.Invoke(ctx, "/osmosis.superfluid.Query/EstimateSuperfluidDelegatedAmountByValidatorDenom", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Returns superfluid asset type + AssetType(context.Context, *AssetTypeRequest) (*AssetTypeResponse, error) + // Returns all superfluid asset types + AllAssets(context.Context, *AllAssetsRequest) (*AllAssetsResponse, error) + // Returns superfluid asset Multiplier + AssetMultiplier(context.Context, *AssetMultiplierRequest) (*AssetMultiplierResponse, error) + // Returns all superfluid intermediary account + AllIntermediaryAccounts(context.Context, *AllIntermediaryAccountsRequest) (*AllIntermediaryAccountsResponse, error) // Returns intermediary account connected to a superfluid staked lock by id ConnectedIntermediaryAccount(context.Context, *ConnectedIntermediaryAccountRequest) (*ConnectedIntermediaryAccountResponse, error) + // Returns the coins superfluid delegated for a delegator, validator, denom + // triplet + SuperfluidDelegationAmount(context.Context, *SuperfluidDelegationAmountRequest) (*SuperfluidDelegationAmountResponse, error) + // Returns all the superfluid poistions for a specific delegator + SuperfluidDelegationsByDelegator(context.Context, *SuperfluidDelegationsByDelegatorRequest) (*SuperfluidDelegationsByDelegatorResponse, error) + // Returns all the superfluid positions of a specific denom delegated to one + // validator + SuperfluidDelegationsByValidatorDenom(context.Context, *SuperfluidDelegationsByValidatorDenomRequest) (*SuperfluidDelegationsByValidatorDenomResponse, error) + // Returns the amount of a specific denom delegated to a specific validator + // This is labeled an estimate, because the way it calculates the amount can + // lead rounding errors from the true delegated amount + EstimateSuperfluidDelegatedAmountByValidatorDenom(context.Context, *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) (*EstimateSuperfluidDelegatedAmountByValidatorDenomResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -723,6 +1230,18 @@ func (*UnimplementedQueryServer) AllIntermediaryAccounts(ctx context.Context, re func (*UnimplementedQueryServer) ConnectedIntermediaryAccount(ctx context.Context, req *ConnectedIntermediaryAccountRequest) (*ConnectedIntermediaryAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConnectedIntermediaryAccount not implemented") } +func (*UnimplementedQueryServer) SuperfluidDelegationAmount(ctx context.Context, req *SuperfluidDelegationAmountRequest) (*SuperfluidDelegationAmountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SuperfluidDelegationAmount not implemented") +} +func (*UnimplementedQueryServer) SuperfluidDelegationsByDelegator(ctx context.Context, req *SuperfluidDelegationsByDelegatorRequest) (*SuperfluidDelegationsByDelegatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SuperfluidDelegationsByDelegator not implemented") +} +func (*UnimplementedQueryServer) SuperfluidDelegationsByValidatorDenom(ctx context.Context, req *SuperfluidDelegationsByValidatorDenomRequest) (*SuperfluidDelegationsByValidatorDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SuperfluidDelegationsByValidatorDenom not implemented") +} +func (*UnimplementedQueryServer) EstimateSuperfluidDelegatedAmountByValidatorDenom(ctx context.Context, req *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) (*EstimateSuperfluidDelegatedAmountByValidatorDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EstimateSuperfluidDelegatedAmountByValidatorDenom not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -818,6 +1337,78 @@ func _Query_ConnectedIntermediaryAccount_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _Query_SuperfluidDelegationAmount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SuperfluidDelegationAmountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SuperfluidDelegationAmount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.superfluid.Query/SuperfluidDelegationAmount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SuperfluidDelegationAmount(ctx, req.(*SuperfluidDelegationAmountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SuperfluidDelegationsByDelegator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SuperfluidDelegationsByDelegatorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SuperfluidDelegationsByDelegator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.superfluid.Query/SuperfluidDelegationsByDelegator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SuperfluidDelegationsByDelegator(ctx, req.(*SuperfluidDelegationsByDelegatorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SuperfluidDelegationsByValidatorDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SuperfluidDelegationsByValidatorDenomRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SuperfluidDelegationsByValidatorDenom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.superfluid.Query/SuperfluidDelegationsByValidatorDenom", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SuperfluidDelegationsByValidatorDenom(ctx, req.(*SuperfluidDelegationsByValidatorDenomRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EstimateSuperfluidDelegatedAmountByValidatorDenom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.superfluid.Query/EstimateSuperfluidDelegatedAmountByValidatorDenom", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EstimateSuperfluidDelegatedAmountByValidatorDenom(ctx, req.(*EstimateSuperfluidDelegatedAmountByValidatorDenomRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "osmosis.superfluid.Query", HandlerType: (*QueryServer)(nil), @@ -842,6 +1433,22 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ConnectedIntermediaryAccount", Handler: _Query_ConnectedIntermediaryAccount_Handler, }, + { + MethodName: "SuperfluidDelegationAmount", + Handler: _Query_SuperfluidDelegationAmount_Handler, + }, + { + MethodName: "SuperfluidDelegationsByDelegator", + Handler: _Query_SuperfluidDelegationsByDelegator_Handler, + }, + { + MethodName: "SuperfluidDelegationsByValidatorDenom", + Handler: _Query_SuperfluidDelegationsByValidatorDenom_Handler, + }, + { + MethodName: "EstimateSuperfluidDelegatedAmountByValidatorDenom", + Handler: _Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "osmosis/superfluid/query.proto", @@ -1226,180 +1833,1328 @@ func (m *ConnectedIntermediaryAccountResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *SuperfluidDelegationAmountRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *AssetTypeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n + +func (m *SuperfluidDelegationAmountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AssetTypeResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *SuperfluidDelegationAmountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.AssetType != 0 { - n += 1 + sovQuery(uint64(m.AssetType)) + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x1a } - return n + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *AllAssetsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *SuperfluidDelegationAmountResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *AllAssetsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *SuperfluidDelegationAmountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SuperfluidDelegationAmountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Assets) > 0 { - for _, e := range m.Assets { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } } - return n + return len(dAtA) - i, nil } -func (m *AssetMultiplierRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) +func (m *SuperfluidDelegationsByDelegatorRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *AssetMultiplierResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OsmoEquivalentMultiplier != nil { - l = m.OsmoEquivalentMultiplier.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *SuperfluidDelegationsByDelegatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SuperfluidIntermediaryAccountInfo) Size() (n int) { - if m == nil { - return 0 - } +func (m *SuperfluidDelegationsByDelegatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ValAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.GaugeId != 0 { - n += 1 + sovQuery(uint64(m.GaugeId)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *AllIntermediaryAccountsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *SuperfluidDelegationsByDelegatorResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *AllIntermediaryAccountsResponse) Size() (n int) { - if m == nil { +func (m *SuperfluidDelegationsByDelegatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SuperfluidDelegationsByDelegatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TotalDelegatedCoins) > 0 { + for iNdEx := len(m.TotalDelegatedCoins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalDelegatedCoins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.SuperfluidDelegationRecords) > 0 { + for iNdEx := len(m.SuperfluidDelegationRecords) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SuperfluidDelegationRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SuperfluidDelegationsByValidatorDenomRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SuperfluidDelegationsByValidatorDenomRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SuperfluidDelegationsByValidatorDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SuperfluidDelegationsByValidatorDenomResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SuperfluidDelegationsByValidatorDenomResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SuperfluidDelegationsByValidatorDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SuperfluidDelegationRecords) > 0 { + for iNdEx := len(m.SuperfluidDelegationRecords) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SuperfluidDelegationRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TotalDelegatedCoins) > 0 { + for iNdEx := len(m.TotalDelegatedCoins) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalDelegatedCoins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AssetTypeRequest) Size() (n int) { + if m == nil { return 0 } var l int _ = l - if len(m.Accounts) > 0 { - for _, e := range m.Accounts { + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *AssetTypeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AssetType != 0 { + n += 1 + sovQuery(uint64(m.AssetType)) + } + return n +} + +func (m *AllAssetsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *AllAssetsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Assets) > 0 { + for _, e := range m.Assets { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } } - if m.Pagination != nil { - l = m.Pagination.Size() + return n +} + +func (m *AssetMultiplierRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *ConnectedIntermediaryAccountRequest) Size() (n int) { +func (m *AssetMultiplierResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.LockId != 0 { - n += 1 + sovQuery(uint64(m.LockId)) + if m.OsmoEquivalentMultiplier != nil { + l = m.OsmoEquivalentMultiplier.Size() + n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *ConnectedIntermediaryAccountResponse) Size() (n int) { +func (m *SuperfluidIntermediaryAccountInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Account != nil { - l = m.Account.Size() + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ValAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.GaugeId != 0 { + n += 1 + sovQuery(uint64(m.GaugeId)) + } + l = len(m.Address) + if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +func (m *AllIntermediaryAccountsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n } -func sozQuery(x uint64) (n int) { + +func (m *AllIntermediaryAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *ConnectedIntermediaryAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.LockId != 0 { + n += 1 + sovQuery(uint64(m.LockId)) + } + return n +} + +func (m *ConnectedIntermediaryAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SuperfluidDelegationAmountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SuperfluidDelegationAmountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *SuperfluidDelegationsByDelegatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SuperfluidDelegationsByDelegatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SuperfluidDelegationRecords) > 0 { + for _, e := range m.SuperfluidDelegationRecords { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.TotalDelegatedCoins) > 0 { + for _, e := range m.TotalDelegatedCoins { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *SuperfluidDelegationsByValidatorDenomRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SuperfluidDelegationsByValidatorDenomResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SuperfluidDelegationRecords) > 0 { + for _, e := range m.SuperfluidDelegationRecords { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TotalDelegatedCoins) > 0 { + for _, e := range m.TotalDelegatedCoins { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *AssetTypeRequest) Unmarshal(dAtA []byte) error { +func (m *AssetTypeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AssetTypeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssetTypeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AssetTypeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AssetTypeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssetTypeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) + } + m.AssetType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AssetType |= SuperfluidAssetType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllAssetsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllAssetsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllAssetsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllAssetsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllAssetsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllAssetsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Assets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Assets = append(m.Assets, SuperfluidAsset{}) + if err := m.Assets[len(m.Assets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AssetMultiplierRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AssetMultiplierRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssetMultiplierRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AssetMultiplierResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AssetMultiplierResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssetMultiplierResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OsmoEquivalentMultiplier", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OsmoEquivalentMultiplier == nil { + m.OsmoEquivalentMultiplier = &OsmoEquivalentMultiplierRecord{} + } + if err := m.OsmoEquivalentMultiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SuperfluidIntermediaryAccountInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SuperfluidIntermediaryAccountInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SuperfluidIntermediaryAccountInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GaugeId", wireType) + } + m.GaugeId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GaugeId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllIntermediaryAccountsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllIntermediaryAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllIntermediaryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllIntermediaryAccountsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1422,17 +3177,17 @@ func (m *AssetTypeRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AssetTypeRequest: wiretype end group for non-group") + return fmt.Errorf("proto: AllIntermediaryAccountsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AssetTypeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AllIntermediaryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1442,23 +3197,61 @@ func (m *AssetTypeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.Accounts = append(m.Accounts, SuperfluidIntermediaryAccountInfo{}) + if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -1481,7 +3274,7 @@ func (m *AssetTypeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *AssetTypeResponse) Unmarshal(dAtA []byte) error { +func (m *ConnectedIntermediaryAccountRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1504,17 +3297,17 @@ func (m *AssetTypeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AssetTypeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ConnectedIntermediaryAccountRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AssetTypeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConnectedIntermediaryAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LockId", wireType) } - m.AssetType = 0 + m.LockId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1524,7 +3317,7 @@ func (m *AssetTypeResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.AssetType |= SuperfluidAssetType(b&0x7F) << shift + m.LockId |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1550,7 +3343,93 @@ func (m *AssetTypeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *AllAssetsRequest) Unmarshal(dAtA []byte) error { +func (m *ConnectedIntermediaryAccountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConnectedIntermediaryAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConnectedIntermediaryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Account == nil { + m.Account = &SuperfluidIntermediaryAccountInfo{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SuperfluidDelegationAmountRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1560,25 +3439,121 @@ func (m *AllAssetsRequest) Unmarshal(dAtA []byte) error { if shift >= 64 { return ErrIntOverflowQuery } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SuperfluidDelegationAmountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SuperfluidDelegationAmountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllAssetsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllAssetsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1600,7 +3575,7 @@ func (m *AllAssetsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *AllAssetsResponse) Unmarshal(dAtA []byte) error { +func (m *SuperfluidDelegationAmountResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1623,15 +3598,15 @@ func (m *AllAssetsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AllAssetsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SuperfluidDelegationAmountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AllAssetsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SuperfluidDelegationAmountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Assets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1658,8 +3633,8 @@ func (m *AllAssetsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Assets = append(m.Assets, SuperfluidAsset{}) - if err := m.Assets[len(m.Assets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1684,7 +3659,7 @@ func (m *AllAssetsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *AssetMultiplierRequest) Unmarshal(dAtA []byte) error { +func (m *SuperfluidDelegationsByDelegatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1707,15 +3682,15 @@ func (m *AssetMultiplierRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AssetMultiplierRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SuperfluidDelegationsByDelegatorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AssetMultiplierRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SuperfluidDelegationsByDelegatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1743,7 +3718,7 @@ func (m *AssetMultiplierRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1766,7 +3741,7 @@ func (m *AssetMultiplierRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *AssetMultiplierResponse) Unmarshal(dAtA []byte) error { +func (m *SuperfluidDelegationsByDelegatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1789,15 +3764,15 @@ func (m *AssetMultiplierResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AssetMultiplierResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SuperfluidDelegationsByDelegatorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AssetMultiplierResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SuperfluidDelegationsByDelegatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OsmoEquivalentMultiplier", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SuperfluidDelegationRecords", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1824,10 +3799,42 @@ func (m *AssetMultiplierResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OsmoEquivalentMultiplier == nil { - m.OsmoEquivalentMultiplier = &OsmoEquivalentMultiplierRecord{} + m.SuperfluidDelegationRecords = append(m.SuperfluidDelegationRecords, SuperfluidDelegationRecord{}) + if err := m.SuperfluidDelegationRecords[len(m.SuperfluidDelegationRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.OsmoEquivalentMultiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalDelegatedCoins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalDelegatedCoins = append(m.TotalDelegatedCoins, types.Coin{}) + if err := m.TotalDelegatedCoins[len(m.TotalDelegatedCoins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1852,7 +3859,7 @@ func (m *AssetMultiplierResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SuperfluidIntermediaryAccountInfo) Unmarshal(dAtA []byte) error { +func (m *SuperfluidDelegationsByValidatorDenomRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1875,15 +3882,15 @@ func (m *SuperfluidIntermediaryAccountInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SuperfluidIntermediaryAccountInfo: wiretype end group for non-group") + return fmt.Errorf("proto: SuperfluidDelegationsByValidatorDenomRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SuperfluidIntermediaryAccountInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SuperfluidDelegationsByValidatorDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1911,62 +3918,11 @@ func (m *SuperfluidIntermediaryAccountInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GaugeId", wireType) - } - m.GaugeId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GaugeId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1994,7 +3950,7 @@ func (m *SuperfluidIntermediaryAccountInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2017,7 +3973,7 @@ func (m *SuperfluidIntermediaryAccountInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *AllIntermediaryAccountsRequest) Unmarshal(dAtA []byte) error { +func (m *SuperfluidDelegationsByValidatorDenomResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2040,15 +3996,15 @@ func (m *AllIntermediaryAccountsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AllIntermediaryAccountsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SuperfluidDelegationsByValidatorDenomResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AllIntermediaryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SuperfluidDelegationsByValidatorDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SuperfluidDelegationRecords", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2075,10 +4031,8 @@ func (m *AllIntermediaryAccountsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SuperfluidDelegationRecords = append(m.SuperfluidDelegationRecords, SuperfluidDelegationRecord{}) + if err := m.SuperfluidDelegationRecords[len(m.SuperfluidDelegationRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2103,7 +4057,7 @@ func (m *AllIntermediaryAccountsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *AllIntermediaryAccountsResponse) Unmarshal(dAtA []byte) error { +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2126,17 +4080,17 @@ func (m *AllIntermediaryAccountsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AllIntermediaryAccountsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AllIntermediaryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EstimateSuperfluidDelegatedAmountByValidatorDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2146,31 +4100,29 @@ func (m *AllIntermediaryAccountsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Accounts = append(m.Accounts, SuperfluidIntermediaryAccountInfo{}) - if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2180,27 +4132,23 @@ func (m *AllIntermediaryAccountsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2223,76 +4171,7 @@ func (m *AllIntermediaryAccountsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConnectedIntermediaryAccountRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConnectedIntermediaryAccountRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConnectedIntermediaryAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LockId", wireType) - } - m.LockId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LockId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConnectedIntermediaryAccountResponse) Unmarshal(dAtA []byte) error { +func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2315,15 +4194,15 @@ func (m *ConnectedIntermediaryAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConnectedIntermediaryAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConnectedIntermediaryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EstimateSuperfluidDelegatedAmountByValidatorDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalDelegatedCoins", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2350,10 +4229,8 @@ func (m *ConnectedIntermediaryAccountResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Account == nil { - m.Account = &SuperfluidIntermediaryAccountInfo{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.TotalDelegatedCoins = append(m.TotalDelegatedCoins, types.Coin{}) + if err := m.TotalDelegatedCoins[len(m.TotalDelegatedCoins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/superfluid/types/query.pb.gw.go b/x/superfluid/types/query.pb.gw.go index 77d0c00587a..0c17f95ae98 100644 --- a/x/superfluid/types/query.pb.gw.go +++ b/x/superfluid/types/query.pb.gw.go @@ -247,6 +247,168 @@ func local_request_Query_ConnectedIntermediaryAccount_0(ctx context.Context, mar } +var ( + filter_Query_SuperfluidDelegationAmount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_SuperfluidDelegationAmount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SuperfluidDelegationAmountRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SuperfluidDelegationAmount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SuperfluidDelegationAmount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SuperfluidDelegationAmount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SuperfluidDelegationAmountRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SuperfluidDelegationAmount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SuperfluidDelegationAmount(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_SuperfluidDelegationsByDelegator_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SuperfluidDelegationsByDelegatorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + msg, err := client.SuperfluidDelegationsByDelegator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SuperfluidDelegationsByDelegator_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SuperfluidDelegationsByDelegatorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + msg, err := server.SuperfluidDelegationsByDelegator(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_SuperfluidDelegationsByValidatorDenom_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_SuperfluidDelegationsByValidatorDenom_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SuperfluidDelegationsByValidatorDenomRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SuperfluidDelegationsByValidatorDenom_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SuperfluidDelegationsByValidatorDenom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SuperfluidDelegationsByValidatorDenom_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SuperfluidDelegationsByValidatorDenomRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SuperfluidDelegationsByValidatorDenom_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SuperfluidDelegationsByValidatorDenom(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EstimateSuperfluidDelegatedAmountByValidatorDenomRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EstimateSuperfluidDelegatedAmountByValidatorDenom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq EstimateSuperfluidDelegatedAmountByValidatorDenomRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EstimateSuperfluidDelegatedAmountByValidatorDenom(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -353,6 +515,86 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_SuperfluidDelegationAmount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_SuperfluidDelegationAmount_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SuperfluidDelegationAmount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SuperfluidDelegationsByDelegator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_SuperfluidDelegationsByDelegator_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SuperfluidDelegationsByDelegator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SuperfluidDelegationsByValidatorDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_SuperfluidDelegationsByValidatorDenom_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SuperfluidDelegationsByValidatorDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -494,6 +736,86 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_SuperfluidDelegationAmount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_SuperfluidDelegationAmount_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SuperfluidDelegationAmount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SuperfluidDelegationsByDelegator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_SuperfluidDelegationsByDelegator_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SuperfluidDelegationsByDelegator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SuperfluidDelegationsByValidatorDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_SuperfluidDelegationsByValidatorDenom_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SuperfluidDelegationsByValidatorDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -507,6 +829,14 @@ var ( pattern_Query_AllIntermediaryAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "superfluid", "v1beta1", "all_intermediary_accounts"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_ConnectedIntermediaryAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "superfluid", "v1beta1", "connected_intermediary_account", "lock_id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_SuperfluidDelegationAmount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "superfluid", "v1beta1", "superfluid_delegation_amount"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_SuperfluidDelegationsByDelegator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "superfluid", "v1beta1", "superfluid_delegations", "delegator_address"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_SuperfluidDelegationsByValidatorDenom_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "superfluid", "v1beta1", "superfluid_delegations_by_validator_denom"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "superfluid", "v1beta1", "estimate_superfluid_delegation_amount_by_validator_denom"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -519,4 +849,12 @@ var ( forward_Query_AllIntermediaryAccounts_0 = runtime.ForwardResponseMessage forward_Query_ConnectedIntermediaryAccount_0 = runtime.ForwardResponseMessage + + forward_Query_SuperfluidDelegationAmount_0 = runtime.ForwardResponseMessage + + forward_Query_SuperfluidDelegationsByDelegator_0 = runtime.ForwardResponseMessage + + forward_Query_SuperfluidDelegationsByValidatorDenom_0 = runtime.ForwardResponseMessage + + forward_Query_EstimateSuperfluidDelegatedAmountByValidatorDenom_0 = runtime.ForwardResponseMessage ) diff --git a/x/superfluid/types/superfluid.pb.go b/x/superfluid/types/superfluid.pb.go index 6884be991a0..b3e31c0036e 100644 --- a/x/superfluid/types/superfluid.pb.go +++ b/x/superfluid/types/superfluid.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/protobuf/types/known/durationpb" @@ -213,11 +213,74 @@ func (m *OsmoEquivalentMultiplierRecord) GetDenom() string { return "" } +// SuperfluidDelegationRecord takes the role of intermediary between LP token +// and OSMO tokens for superfluid staking +type SuperfluidDelegationRecord struct { + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + DelegationAmount types.Coin `protobuf:"bytes,3,opt,name=delegation_amount,json=delegationAmount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"delegation_amount"` +} + +func (m *SuperfluidDelegationRecord) Reset() { *m = SuperfluidDelegationRecord{} } +func (m *SuperfluidDelegationRecord) String() string { return proto.CompactTextString(m) } +func (*SuperfluidDelegationRecord) ProtoMessage() {} +func (*SuperfluidDelegationRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_79d3c29d82dbb734, []int{3} +} +func (m *SuperfluidDelegationRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SuperfluidDelegationRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SuperfluidDelegationRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SuperfluidDelegationRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_SuperfluidDelegationRecord.Merge(m, src) +} +func (m *SuperfluidDelegationRecord) XXX_Size() int { + return m.Size() +} +func (m *SuperfluidDelegationRecord) XXX_DiscardUnknown() { + xxx_messageInfo_SuperfluidDelegationRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_SuperfluidDelegationRecord proto.InternalMessageInfo + +func (m *SuperfluidDelegationRecord) GetDelegatorAddress() string { + if m != nil { + return m.DelegatorAddress + } + return "" +} + +func (m *SuperfluidDelegationRecord) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *SuperfluidDelegationRecord) GetDelegationAmount() types.Coin { + if m != nil { + return m.DelegationAmount + } + return types.Coin{} +} + func init() { proto.RegisterEnum("osmosis.superfluid.SuperfluidAssetType", SuperfluidAssetType_name, SuperfluidAssetType_value) proto.RegisterType((*SuperfluidAsset)(nil), "osmosis.superfluid.SuperfluidAsset") proto.RegisterType((*SuperfluidIntermediaryAccount)(nil), "osmosis.superfluid.SuperfluidIntermediaryAccount") proto.RegisterType((*OsmoEquivalentMultiplierRecord)(nil), "osmosis.superfluid.OsmoEquivalentMultiplierRecord") + proto.RegisterType((*SuperfluidDelegationRecord)(nil), "osmosis.superfluid.SuperfluidDelegationRecord") } func init() { @@ -225,38 +288,44 @@ func init() { } var fileDescriptor_79d3c29d82dbb734 = []byte{ - // 487 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xb6, 0xdb, 0x42, 0x9b, 0x05, 0x41, 0x31, 0x3d, 0xb4, 0x91, 0xba, 0x0e, 0x41, 0x82, 0x08, - 0xa9, 0x5e, 0x15, 0x84, 0x90, 0x7a, 0x4b, 0xf9, 0x91, 0x2a, 0x41, 0x8b, 0x5c, 0x4e, 0xbd, 0x44, - 0x6b, 0xef, 0xd4, 0x59, 0xd5, 0xeb, 0x35, 0xfb, 0x63, 0x91, 0x37, 0xe8, 0x91, 0x47, 0xa8, 0xc4, - 0x7b, 0x70, 0xee, 0xb1, 0x47, 0xc4, 0x21, 0x42, 0xc9, 0x85, 0x33, 0x4f, 0x80, 0xb2, 0x49, 0x9a, - 0xa8, 0x84, 0xd3, 0xce, 0x37, 0xdf, 0xe8, 0x9b, 0x6f, 0x67, 0x06, 0x3d, 0x96, 0x5a, 0x48, 0xcd, - 0x35, 0xd1, 0xb6, 0x04, 0x75, 0x9a, 0x5b, 0xce, 0xe6, 0xc2, 0xa8, 0x54, 0xd2, 0xc8, 0x20, 0x98, - 0x14, 0x45, 0x33, 0xa6, 0xbe, 0x91, 0xc9, 0x4c, 0x3a, 0x9a, 0x8c, 0xa2, 0x71, 0x65, 0x1d, 0x67, - 0x52, 0x66, 0x39, 0x10, 0x87, 0x12, 0x7b, 0x4a, 0x98, 0x55, 0xd4, 0x70, 0x59, 0x4c, 0xf8, 0xf0, - 0x26, 0x6f, 0xb8, 0x00, 0x6d, 0xa8, 0x28, 0xa7, 0x02, 0xa9, 0xeb, 0x45, 0x12, 0xaa, 0x81, 0x54, - 0xbb, 0x09, 0x18, 0xba, 0x4b, 0x52, 0xc9, 0x27, 0x02, 0xcd, 0x1e, 0xba, 0x7f, 0x7c, 0x6d, 0xa2, - 0xad, 0x35, 0x98, 0x60, 0x03, 0xdd, 0x62, 0x50, 0x48, 0xb1, 0xe9, 0x37, 0xfc, 0x56, 0x2d, 0x1e, - 0x83, 0xe0, 0x1d, 0x42, 0x74, 0x44, 0x77, 0x4c, 0xaf, 0x84, 0xcd, 0xa5, 0x86, 0xdf, 0xba, 0xf7, - 0xfc, 0x69, 0xf4, 0xef, 0x47, 0xa2, 0x1b, 0x72, 0x9f, 0x7a, 0x25, 0xc4, 0x35, 0x3a, 0x0d, 0xf7, - 0xd6, 0xce, 0x2f, 0x42, 0xef, 0xf7, 0x45, 0xe8, 0x37, 0xcf, 0xd0, 0xf6, 0xac, 0xf6, 0xa0, 0x30, - 0xa0, 0x04, 0x30, 0x4e, 0x55, 0xaf, 0x9d, 0xa6, 0xd2, 0x16, 0xff, 0x33, 0xb2, 0x85, 0xd6, 0x2a, - 0x9a, 0x77, 0x28, 0x63, 0xca, 0xd9, 0xa8, 0xc5, 0xab, 0x15, 0xcd, 0xdb, 0x8c, 0xa9, 0x11, 0x95, - 0x51, 0x9b, 0x41, 0x87, 0xb3, 0xcd, 0xe5, 0x86, 0xdf, 0x5a, 0x89, 0x57, 0x1d, 0x3e, 0x60, 0xcd, - 0xef, 0x3e, 0xc2, 0x47, 0x5a, 0xc8, 0xb7, 0x9f, 0x2d, 0xaf, 0x68, 0x0e, 0x85, 0xf9, 0x60, 0x73, - 0xc3, 0xcb, 0x9c, 0x83, 0x8a, 0x21, 0x95, 0x8a, 0x05, 0x8f, 0xd0, 0x5d, 0x28, 0x65, 0xda, 0xed, - 0x14, 0x56, 0x24, 0xa0, 0x5c, 0xd7, 0xe5, 0xf8, 0x8e, 0xcb, 0x1d, 0xba, 0xd4, 0xcc, 0xd1, 0xd2, - 0xbc, 0xa3, 0x14, 0x21, 0x71, 0x2d, 0xe6, 0x1a, 0xd7, 0xf6, 0x5f, 0x5f, 0xf6, 0x43, 0xef, 0x67, - 0x3f, 0x7c, 0x92, 0x71, 0xd3, 0xb5, 0x49, 0x94, 0x4a, 0x41, 0x26, 0xab, 0x18, 0x3f, 0x3b, 0x9a, - 0x9d, 0x91, 0xd1, 0x2c, 0x75, 0xf4, 0x06, 0xd2, 0x3f, 0xfd, 0xf0, 0x41, 0x8f, 0x8a, 0x7c, 0xaf, - 0x39, 0x53, 0x6a, 0xc6, 0x73, 0xb2, 0xcf, 0x4e, 0xd0, 0xc3, 0x05, 0x93, 0x0d, 0xb6, 0xd1, 0xd6, - 0x82, 0xf4, 0x21, 0x35, 0xbc, 0x82, 0x75, 0x2f, 0xc0, 0xa8, 0xbe, 0x80, 0x7e, 0xff, 0xf1, 0xb8, - 0x4b, 0x15, 0xac, 0xfb, 0xf5, 0x95, 0xf3, 0x6f, 0xd8, 0xdb, 0x3f, 0xba, 0x1c, 0x60, 0xff, 0x6a, - 0x80, 0xfd, 0x5f, 0x03, 0xec, 0x7f, 0x1d, 0x62, 0xef, 0x6a, 0x88, 0xbd, 0x1f, 0x43, 0xec, 0x9d, - 0xbc, 0x9c, 0xb3, 0x3f, 0xd9, 0xf5, 0x4e, 0x4e, 0x13, 0x3d, 0x05, 0xa4, 0x7a, 0x45, 0xbe, 0xcc, - 0xdf, 0xba, 0xfb, 0x51, 0x72, 0xdb, 0x1d, 0xd7, 0x8b, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb0, - 0x95, 0xfc, 0x77, 0x0e, 0x03, 0x00, 0x00, + // 585 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x41, 0x4f, 0xd4, 0x4e, + 0x14, 0x6f, 0x81, 0xff, 0x1f, 0x76, 0x30, 0xba, 0x54, 0x0e, 0xb0, 0x09, 0xed, 0x5a, 0x13, 0xd9, + 0x68, 0xe8, 0x04, 0x8c, 0x31, 0xe1, 0xb6, 0x0b, 0x9a, 0x90, 0x28, 0x98, 0xe2, 0x89, 0xcb, 0x66, + 0xda, 0x19, 0xba, 0x13, 0xda, 0x4e, 0x9d, 0x99, 0x56, 0xf7, 0x1b, 0x70, 0xf4, 0x23, 0x90, 0x78, + 0xf3, 0x43, 0x78, 0xe6, 0xc8, 0xd1, 0x78, 0x58, 0xcd, 0xee, 0xc5, 0x9b, 0x89, 0x9f, 0xc0, 0x74, + 0xda, 0xed, 0x56, 0xc4, 0xc4, 0x53, 0xe7, 0xbd, 0xdf, 0xeb, 0xef, 0xfd, 0x7e, 0x6f, 0xde, 0x80, + 0xfb, 0x4c, 0x44, 0x4c, 0x50, 0x01, 0x45, 0x9a, 0x10, 0x7e, 0x1a, 0xa6, 0x14, 0xd7, 0x8e, 0x4e, + 0xc2, 0x99, 0x64, 0x86, 0x51, 0x16, 0x39, 0x33, 0xa4, 0xb5, 0x1a, 0xb0, 0x80, 0x29, 0x18, 0xe6, + 0xa7, 0xa2, 0xb2, 0x65, 0x06, 0x8c, 0x05, 0x21, 0x81, 0x2a, 0xf2, 0xd2, 0x53, 0x88, 0x53, 0x8e, + 0x24, 0x65, 0x71, 0x89, 0x5b, 0xd7, 0x71, 0x49, 0x23, 0x22, 0x24, 0x8a, 0x92, 0x29, 0x81, 0xaf, + 0x7a, 0x41, 0x0f, 0x09, 0x02, 0xb3, 0x6d, 0x8f, 0x48, 0xb4, 0x0d, 0x7d, 0x46, 0x4b, 0x02, 0x7b, + 0x08, 0xee, 0x1c, 0x57, 0x22, 0xba, 0x42, 0x10, 0x69, 0xac, 0x82, 0xff, 0x30, 0x89, 0x59, 0xb4, + 0xa6, 0xb7, 0xf5, 0x4e, 0xc3, 0x2d, 0x02, 0xe3, 0x39, 0x00, 0x28, 0x87, 0xfb, 0x72, 0x98, 0x90, + 0xb5, 0xb9, 0xb6, 0xde, 0xb9, 0xbd, 0xb3, 0xe9, 0xfc, 0x69, 0xc4, 0xb9, 0x46, 0xf7, 0x7a, 0x98, + 0x10, 0xb7, 0x81, 0xa6, 0xc7, 0xdd, 0xa5, 0xf3, 0x0b, 0x4b, 0xfb, 0x7e, 0x61, 0xe9, 0xf6, 0x19, + 0xd8, 0x98, 0xd5, 0x1e, 0xc4, 0x92, 0xf0, 0x88, 0x60, 0x8a, 0xf8, 0xb0, 0xeb, 0xfb, 0x2c, 0x8d, + 0xff, 0x26, 0x64, 0x1d, 0x2c, 0x65, 0x28, 0xec, 0x23, 0x8c, 0xb9, 0x92, 0xd1, 0x70, 0x17, 0x33, + 0x14, 0x76, 0x31, 0xe6, 0x39, 0x14, 0xa0, 0x34, 0x20, 0x7d, 0x8a, 0xd7, 0xe6, 0xdb, 0x7a, 0x67, + 0xc1, 0x5d, 0x54, 0xf1, 0x01, 0xb6, 0x3f, 0xe9, 0xc0, 0x3c, 0x12, 0x11, 0x7b, 0xf6, 0x26, 0xa5, + 0x19, 0x0a, 0x49, 0x2c, 0x5f, 0xa6, 0xa1, 0xa4, 0x49, 0x48, 0x09, 0x77, 0x89, 0xcf, 0x38, 0x36, + 0xee, 0x81, 0x5b, 0x24, 0x61, 0xfe, 0xa0, 0x1f, 0xa7, 0x91, 0x47, 0xb8, 0xea, 0x3a, 0xef, 0x2e, + 0xab, 0xdc, 0xa1, 0x4a, 0xcd, 0x14, 0xcd, 0xd5, 0x15, 0xf9, 0x00, 0x44, 0x15, 0x99, 0x6a, 0xdc, + 0xe8, 0xed, 0x5d, 0x8e, 0x2c, 0xed, 0xcb, 0xc8, 0x7a, 0x10, 0x50, 0x39, 0x48, 0x3d, 0xc7, 0x67, + 0x11, 0x2c, 0xaf, 0xa2, 0xf8, 0x6c, 0x09, 0x7c, 0x06, 0xf3, 0x59, 0x0a, 0x67, 0x9f, 0xf8, 0x3f, + 0x47, 0xd6, 0xca, 0x10, 0x45, 0xe1, 0xae, 0x3d, 0x63, 0xb2, 0xdd, 0x1a, 0xad, 0xfd, 0x43, 0x07, + 0xad, 0xd9, 0xb8, 0xf6, 0x49, 0x48, 0x02, 0xb5, 0x08, 0xa5, 0xf8, 0x47, 0x60, 0x05, 0x17, 0x39, + 0xc6, 0xd5, 0x6c, 0x88, 0x10, 0xe5, 0xdc, 0x9a, 0x15, 0xd0, 0x2d, 0xf2, 0x79, 0x71, 0x86, 0x42, + 0x8a, 0x7f, 0x2b, 0x2e, 0x2c, 0x35, 0x2b, 0x60, 0x5a, 0xfc, 0xb6, 0x62, 0xa6, 0x2c, 0xee, 0xa3, + 0x28, 0xbf, 0x1a, 0x65, 0x72, 0x79, 0x67, 0xdd, 0x29, 0xbc, 0x38, 0xf9, 0x76, 0x39, 0xe5, 0x76, + 0x39, 0x7b, 0x8c, 0xc6, 0x3d, 0x98, 0xfb, 0xff, 0xf8, 0xd5, 0xda, 0xfc, 0x07, 0xff, 0xf9, 0x0f, + 0x95, 0x4a, 0xca, 0xe2, 0xae, 0xea, 0xf1, 0xf0, 0x04, 0xdc, 0xbd, 0x61, 0x97, 0x8c, 0x0d, 0xb0, + 0x7e, 0x43, 0xfa, 0x10, 0x49, 0x9a, 0x91, 0xa6, 0x66, 0x98, 0xf5, 0x31, 0x55, 0xf0, 0x8b, 0x57, + 0xc7, 0x03, 0xc4, 0x49, 0x53, 0x6f, 0x2d, 0x9c, 0x7f, 0x30, 0xb5, 0xde, 0xd1, 0xe5, 0xd8, 0xd4, + 0xaf, 0xc6, 0xa6, 0xfe, 0x6d, 0x6c, 0xea, 0xef, 0x27, 0xa6, 0x76, 0x35, 0x31, 0xb5, 0xcf, 0x13, + 0x53, 0x3b, 0x79, 0x52, 0x13, 0x5c, 0x6e, 0xf7, 0x56, 0x88, 0x3c, 0x31, 0x0d, 0x60, 0xf6, 0x14, + 0xbe, 0xab, 0xbf, 0x6e, 0xe5, 0xc1, 0xfb, 0x5f, 0x3d, 0xa7, 0xc7, 0xbf, 0x02, 0x00, 0x00, 0xff, + 0xff, 0xc4, 0xb7, 0x3f, 0xbd, 0x00, 0x04, 0x00, 0x00, } func (this *SuperfluidAsset) Equal(that interface{}) bool { @@ -408,6 +477,53 @@ func (m *OsmoEquivalentMultiplierRecord) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *SuperfluidDelegationRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SuperfluidDelegationRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SuperfluidDelegationRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.DelegationAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSuperfluid(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintSuperfluid(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintSuperfluid(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintSuperfluid(dAtA []byte, offset int, v uint64) int { offset -= sovSuperfluid(v) base := offset @@ -473,6 +589,25 @@ func (m *OsmoEquivalentMultiplierRecord) Size() (n int) { return n } +func (m *SuperfluidDelegationRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovSuperfluid(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovSuperfluid(uint64(l)) + } + l = m.DelegationAmount.Size() + n += 1 + l + sovSuperfluid(uint64(l)) + return n +} + func sovSuperfluid(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -848,6 +983,153 @@ func (m *OsmoEquivalentMultiplierRecord) Unmarshal(dAtA []byte) error { } return nil } +func (m *SuperfluidDelegationRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSuperfluid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SuperfluidDelegationRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SuperfluidDelegationRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSuperfluid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSuperfluid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSuperfluid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSuperfluid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSuperfluid + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSuperfluid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegationAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSuperfluid + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSuperfluid + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSuperfluid + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DelegationAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSuperfluid(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSuperfluid + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipSuperfluid(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0