Skip to content

Commit

Permalink
rename(osmoutils/coins): rename coins package to coinutil (backport
Browse files Browse the repository at this point in the history
#6584) (#6600)

* rename(osmoutils/coins): rename `coins` package to `coinutil` (#6584)

* rename coins to coinutil

* update deps

* change import path

* selfrev: remove named improt path

* more changes of import paths

* unblock ci

* Revert "unblock ci"

This reverts commit cb7b5f1.

* minor

* Auto: update go.mod after push to pysel/coins-rename that modified dependencies locally

* unblock

* Revert "unblock"

This reverts commit f1189a5.

---------

Co-authored-by: github-actions <[email protected]>
(cherry picked from commit 1ead3dc)

# Conflicts:
#	go.mod
#	go.sum
#	x/epochs/go.mod
#	x/epochs/go.sum
#	x/ibc-hooks/go.mod
#	x/ibc-hooks/go.sum
#	x/incentives/keeper/distribute.go
#	x/incentives/keeper/distribute_test.go
#	x/incentives/keeper/hooks_test.go
#	x/pool-incentives/keeper/distr_test.go

* clean

* remove file

---------

Co-authored-by: Ruslan Akhtariev <[email protected]>
Co-authored-by: Ruslan Akhtariev <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2023
1 parent 057a0dc commit 6642120
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 50 deletions.
15 changes: 7 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ require (
github.com/mattn/go-sqlite3 v1.14.17
github.com/ory/dockertest/v3 v3.10.0
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3
github.com/osmosis-labs/osmosis/osmomath v0.0.8-0.20230926014346-27a13ec134bd
github.com/osmosis-labs/osmosis/osmoutils v0.0.8-0.20230926154241-a9f2936565f4
github.com/osmosis-labs/osmosis/x/epochs v0.0.2
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.8
github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20230924192433-36cf2950dca4
github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20230929193736-aae32321cac7
github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20230911120014-b14342e08daf
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20230911120014-b14342e08daf
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.5.1
Expand Down Expand Up @@ -63,12 +63,13 @@ require (
github.com/curioswitch/go-reassign v0.2.0 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/gogo/gateway v1.1.0 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/kkHAIKE/contextcheck v1.1.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/maratori/testableexamples v1.0.0 // indirect
github.com/nunnatsa/ginkgolinter v0.13.3 // indirect
github.com/regen-network/cosmos-proto v0.3.1 // indirect
Expand All @@ -79,7 +80,6 @@ require (
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/timonwong/loggercheck v0.9.4 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/xen0n/gosmopolitan v1.2.1 // indirect
github.com/ykadowak/zerologlint v0.1.3 // indirect
github.com/zimmski/go-mutesting v0.0.0-20210610104036-6d9217011a00 // indirect
Expand All @@ -88,7 +88,6 @@ require (
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/goleak v1.1.12 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/arch v0.5.0 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect
)
Expand Down
26 changes: 13 additions & 13 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbS
github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo=
github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA=
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
Expand Down Expand Up @@ -425,9 +426,9 @@ github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTM
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
Expand Down Expand Up @@ -462,7 +463,6 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm
github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
Expand Down Expand Up @@ -796,6 +796,7 @@ github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5j
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU=
github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
Expand Down Expand Up @@ -937,7 +938,7 @@ github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
Expand All @@ -963,14 +964,14 @@ github.com/osmosis-labs/cosmos-sdk v0.45.0-rc1.0.20230927020814-2854ac001f06 h1:
github.com/osmosis-labs/cosmos-sdk v0.45.0-rc1.0.20230927020814-2854ac001f06/go.mod h1:nZwthKhHt2cvngoDGFR1kSFsAz+MxCJWAg1hTDiwp8E=
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:YlmchqTmlwdWSmrRmXKR+PcU96ntOd8u10vTaTZdcNY=
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI=
github.com/osmosis-labs/osmosis/osmomath v0.0.8-0.20230926014346-27a13ec134bd h1:Op+svYjumlLTHIupuXrTh8OWOhjP0vKWQR3LLZv24Dg=
github.com/osmosis-labs/osmosis/osmomath v0.0.8-0.20230926014346-27a13ec134bd/go.mod h1:8VWhMEgMVTavPs8ttIJdG5VE0xiJXhnFazQdIBhKzH0=
github.com/osmosis-labs/osmosis/osmoutils v0.0.8-0.20230926154241-a9f2936565f4 h1:w/1YTjPZ5qf9iKzBJgUqVnNWhrJyC1gsfqrdX0/6vcI=
github.com/osmosis-labs/osmosis/osmoutils v0.0.8-0.20230926154241-a9f2936565f4/go.mod h1:ukjFgxfR9obDrMd8ZsxKcp3HWL7+boYORVL7Bt7YOZM=
github.com/osmosis-labs/osmosis/x/epochs v0.0.2 h1:aEeXHGCSJMgMtAvCucsD2RSaWZ8lISFLD5u4MyF9KPc=
github.com/osmosis-labs/osmosis/x/epochs v0.0.2/go.mod h1:8dvJFHTpu6SIxmOaSaEw0tHnQ/Z9blf5qsF/ZJnMVHo=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.8 h1:BUGowctYQT0vdPgULrvwraEsW+sS6DnbzndTLKLmWVY=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.8/go.mod h1:sR0lpev9mcm9/9RY50T1og3UC3WpZAsINh/OmgrmFlg=
github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20230924192433-36cf2950dca4 h1:venI3u6DjxKcQbjiCO3V8s0ww/jx+cAZRkpwLHadms8=
github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20230924192433-36cf2950dca4/go.mod h1:IlCTpM2uoi8SUAigc9r9kAaoz7K5H9O84u7CwaTLDdY=
github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20230929193736-aae32321cac7 h1:E5rwhxKEt6XOIfLkoLNiqCCFNCymJjiwMYIP+0ABMKM=
github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20230929193736-aae32321cac7/go.mod h1:YT53hlXr54D4MVKp3eoBxigiiYvy3F+h+xTZuGPW5R8=
github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20230911120014-b14342e08daf h1:8lkIsAj3L7zxvOZbqVLNJRpSdDxaYhYfAIG7XjPaJiU=
github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20230911120014-b14342e08daf/go.mod h1:C0Uqe6X4N5ASA+1xZ6guaaJyUVKLcaVJIQa4Q4LG9Vk=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20230911120014-b14342e08daf h1:ZEi+yJJPgpYtmNwZ1bMiP5cMBDQ83FK/YGgmTnWmoAI=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20230911120014-b14342e08daf/go.mod h1:pqkAsS04Er1kFM41gg3aWTSaYHyLe8C9Dw3Sj8KMXk8=
github.com/osmosis-labs/wasmd v0.31.0-osmo-v16 h1:X747cZYdnqc/+RV48iPVeGprpVb/fUWSaKGsZUWrdbg=
github.com/osmosis-labs/wasmd v0.31.0-osmo-v16/go.mod h1:Rf8zW/GgBQyFRRB4s62VQHWA6sTlMFSjoDQQpoq64iI=
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
Expand Down Expand Up @@ -1238,11 +1239,11 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=
github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI=
github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4=
github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI=
Expand Down Expand Up @@ -1334,7 +1335,6 @@ go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.5.0 h1:jpGode6huXQxcskEIpOCvrU+tzo81b6+oFLUYXWtH/Y=
golang.org/x/arch v0.5.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
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=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package coins
package coinutil

import (
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package coins_test
package coinutil_test

import (
"testing"
Expand All @@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/osmosis-labs/osmosis/osmomath"
"github.com/osmosis-labs/osmosis/osmoutils/coins"
"github.com/osmosis-labs/osmosis/osmoutils/coinutil"
)

var (
Expand Down Expand Up @@ -44,19 +44,19 @@ func TestMul(t *testing.T) {
t.Run("test mutative multiplication", func(t *testing.T) {
t.Run("MulIntMut", func(t *testing.T) {
defaulCoins := deepCopy(defaultCoins)
coins.MulIntMut(defaulCoins, defaultMultiplier)
coinutil.MulIntMut(defaulCoins, defaultMultiplier)
require.Equal(t, defaultMulExpectedResult, defaulCoins)
})

t.Run("MulIntRawMut", func(t *testing.T) {
defaulCoins := deepCopy(defaultCoins)
coins.MulRawMut(defaulCoins, defaultMultiplier.Int64())
coinutil.MulRawMut(defaulCoins, defaultMultiplier.Int64())
require.Equal(t, defaultMulExpectedResult, defaulCoins)
})

t.Run("MulDecMut", func(t *testing.T) {
defaulCoins := deepCopy(defaultCoins)
coins.MulDecMut(defaulCoins, osmomath.NewDecFromInt(defaultMultiplier))
coinutil.MulDecMut(defaulCoins, osmomath.NewDecFromInt(defaultMultiplier))
require.Equal(t, defaultMulExpectedResult, defaulCoins)
})
})
Expand All @@ -66,21 +66,21 @@ func TestMul(t *testing.T) {
t.Run("test non-mutative multiplication", func(t *testing.T) {
t.Run("MulInt", func(t *testing.T) {
defaulCoinsCopy := deepCopy(defaultCoins)
result := coins.MulInt(defaulCoinsCopy, defaultMultiplier)
result := coinutil.MulInt(defaulCoinsCopy, defaultMultiplier)
require.Equal(t, defaultMulExpectedResult, result)
require.Equal(t, defaultCoins, defaulCoinsCopy)
})

t.Run("MulIntRaw", func(t *testing.T) {
defaulCoinsCopy := deepCopy(defaultCoins)
result := coins.MulRaw(defaulCoinsCopy, defaultMultiplier.Int64())
result := coinutil.MulRaw(defaulCoinsCopy, defaultMultiplier.Int64())
require.Equal(t, defaultMulExpectedResult, result)
require.Equal(t, defaultCoins, defaulCoinsCopy)
})

t.Run("MulDec", func(t *testing.T) {
defaulCoinsCopy := deepCopy(defaultCoins)
result := coins.MulDec(defaulCoinsCopy, osmomath.NewDecFromInt(defaultMultiplier))
result := coinutil.MulDec(defaulCoinsCopy, osmomath.NewDecFromInt(defaultMultiplier))
require.Equal(t, defaultMulExpectedResult, result)
require.Equal(t, defaultCoins, defaulCoinsCopy)
})
Expand All @@ -91,19 +91,19 @@ func TestQuo(t *testing.T) {
t.Run("test mutative division", func(t *testing.T) {
t.Run("QuoIntMut", func(t *testing.T) {
defaulCoins := deepCopy(defaultCoins)
coins.QuoIntMut(defaulCoins, defaultMultiplier)
coinutil.QuoIntMut(defaulCoins, defaultMultiplier)
require.Equal(t, defaultQuoExpectedResult, defaulCoins)
})

t.Run("QuoIntRawMut", func(t *testing.T) {
defaulCoins := deepCopy(defaultCoins)
coins.QuoRawMut(defaulCoins, defaultMultiplier.Int64())
coinutil.QuoRawMut(defaulCoins, defaultMultiplier.Int64())
require.Equal(t, defaultQuoExpectedResult, defaulCoins)
})

t.Run("QuoDecMut", func(t *testing.T) {
defaulCoins := deepCopy(defaultCoins)
coins.QuoDecMut(defaulCoins, osmomath.NewDecFromInt(defaultMultiplier))
coinutil.QuoDecMut(defaulCoins, osmomath.NewDecFromInt(defaultMultiplier))
require.Equal(t, defaultQuoExpectedResult, defaulCoins)
})
})
Expand All @@ -113,21 +113,21 @@ func TestQuo(t *testing.T) {
t.Run("test non-mutative division", func(t *testing.T) {
t.Run("QuoInt", func(t *testing.T) {
defaulCoinsCopy := deepCopy(defaultCoins)
result := coins.QuoInt(defaulCoinsCopy, defaultMultiplier)
result := coinutil.QuoInt(defaulCoinsCopy, defaultMultiplier)
require.Equal(t, defaultQuoExpectedResult, result)
require.Equal(t, defaultCoins, defaulCoinsCopy)
})

t.Run("QuoIntRaw", func(t *testing.T) {
defaulCoinsCopy := deepCopy(defaultCoins)
result := coins.QuoRaw(defaulCoinsCopy, defaultMultiplier.Int64())
result := coinutil.QuoRaw(defaulCoinsCopy, defaultMultiplier.Int64())
require.Equal(t, defaultQuoExpectedResult, result)
require.Equal(t, defaultCoins, defaulCoinsCopy)
})

t.Run("QuoDec", func(t *testing.T) {
defaulCoinsCopy := deepCopy(defaultCoins)
result := coins.QuoDec(defaulCoinsCopy, osmomath.NewDecFromInt(defaultMultiplier))
result := coinutil.QuoDec(defaulCoinsCopy, osmomath.NewDecFromInt(defaultMultiplier))
require.Equal(t, defaultQuoExpectedResult, result)
require.Equal(t, defaultCoins, defaulCoinsCopy)
})
Expand Down
3 changes: 2 additions & 1 deletion x/epochs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/golang/protobuf v1.5.3
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/osmosis-labs/osmosis/osmoutils v0.0.8-0.20230926014346-27a13ec134bd
github.com/osmosis-labs/osmosis/osmoutils v0.0.7
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.4
github.com/tendermint/tendermint v0.37.0-rc1
Expand Down Expand Up @@ -87,6 +87,7 @@ require (
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/onsi/gomega v1.27.10 // indirect
github.com/opencontainers/runc v1.1.5 // indirect
github.com/osmosis-labs/osmosis/osmomath v0.0.8-0.20230926014346-27a13ec134bd // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
Expand Down
9 changes: 5 additions & 4 deletions x/epochs/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,8 @@ github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034=
Expand All @@ -721,9 +722,9 @@ github.com/osmosis-labs/cosmos-sdk v0.45.0-rc1.0.20230927020814-2854ac001f06 h1:
github.com/osmosis-labs/cosmos-sdk v0.45.0-rc1.0.20230927020814-2854ac001f06/go.mod h1:nZwthKhHt2cvngoDGFR1kSFsAz+MxCJWAg1hTDiwp8E=
github.com/osmosis-labs/osmosis/osmomath v0.0.8-0.20230926014346-27a13ec134bd h1:Op+svYjumlLTHIupuXrTh8OWOhjP0vKWQR3LLZv24Dg=
github.com/osmosis-labs/osmosis/osmomath v0.0.8-0.20230926014346-27a13ec134bd/go.mod h1:8VWhMEgMVTavPs8ttIJdG5VE0xiJXhnFazQdIBhKzH0=
github.com/osmosis-labs/osmosis/osmoutils v0.0.8-0.20230926014346-27a13ec134bd h1:oi2HhLQqBsOG4iBDj9MkKY1KsDE2JeDz+A2L0cQ8og4=
github.com/osmosis-labs/osmosis/osmoutils v0.0.8-0.20230926014346-27a13ec134bd/go.mod h1:wYNqZbQ6Woo2gOQJDv6l2dFGI74uABNPvz1dCOGW6qo=
github.com/osmosis-labs/osmosis/v19 v19.1.0 h1:UjtvMa/aQJmPElJ6Dgw/JCOn/jK9inrokWLLuvyWiOs=
github.com/osmosis-labs/osmosis/osmoutils v0.0.7 h1:HnOgJiOo3XH2MQ2bsUTL7b0Xj29fObN4tVacza8M13g=
github.com/osmosis-labs/osmosis/osmoutils v0.0.7/go.mod h1:ukjFgxfR9obDrMd8ZsxKcp3HWL7+boYORVL7Bt7YOZM=
github.com/osmosis-labs/osmosis/v19 v19.0.0 h1:gqcas/XfxtEuZXsWGTO9vNMHiY78Qs09FBQw73djIVM=
github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE=
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
Expand Down
5 changes: 2 additions & 3 deletions x/ibc-hooks/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ require (
github.com/gogo/protobuf v1.3.3
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/osmosis-labs/osmosis/osmomath v0.0.8-0.20230926014346-27a13ec134bd
github.com/osmosis-labs/osmosis/osmoutils v0.0.8-0.20230926014346-27a13ec134bd
github.com/osmosis-labs/osmosis/osmomath v0.0.6
github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20230929193736-aae32321cac7
github.com/spf13/cobra v1.7.0
github.com/tendermint/tendermint v0.37.0-rc1
google.golang.org/grpc v1.57.0
Expand Down Expand Up @@ -128,7 +128,6 @@ require (
github.com/zondax/ledger-go v0.14.1 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/arch v0.5.0 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect
golang.org/x/net v0.14.0 // indirect
Expand Down
Loading

0 comments on commit 6642120

Please sign in to comment.