-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: feed oracle with meTokens price every endBlock (#2316)
* done * mocks fixed * e2e test added * e2e frequency changed * remove e2e test * adding symbol denom * e2e test added * rollback mock script * fix e2e test * lint * pr comments * intest * fix test * fix test * fix * fix test * fix test2 * fix test3
- Loading branch information
Showing
10 changed files
with
116 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package intest | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
"github.com/umee-network/umee/v6/util/checkers" | ||
"github.com/umee-network/umee/v6/x/metoken" | ||
"github.com/umee-network/umee/v6/x/metoken/mocks" | ||
) | ||
|
||
func TestPrice_SetPricesToOracle(t *testing.T) { | ||
index := mocks.StableIndex(mocks.MeUSDDenom) | ||
|
||
s := initTestSuite(t, nil, nil) | ||
msgServer, ctx, app := s.msgServer, s.ctx, s.app | ||
|
||
_, err := msgServer.GovUpdateRegistry( | ||
ctx, &metoken.MsgGovUpdateRegistry{ | ||
Authority: checkers.GovModuleAddr, | ||
AddIndex: []metoken.Index{index}, | ||
UpdateIndex: nil, | ||
}, | ||
) | ||
require := require.New(t) | ||
require.NoError(err) | ||
|
||
err = app.MetokenKeeperB.Keeper(&ctx).SetPricesToOracle() | ||
require.NoError(err) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters