refactor: optimize oracle genesis proto

This commit is contained in:
Prad Nukala
2024-09-27 21:08:53 -04:00
parent 92ff87cc2c
commit d06dfb5a93
25 changed files with 421 additions and 441 deletions
+3 -12
View File
@@ -10,22 +10,13 @@ import (
func TestORM(t *testing.T) {
f := SetupTest(t)
dt := f.k.OrmDB.ExampleDataTable()
acc := []byte("test_acc")
dt := f.k.OrmDB.BalanceTable()
amt := uint64(7)
err := dt.Insert(f.ctx, &apiv1.ExampleData{
Account: acc,
Amount: amt,
err := dt.Insert(f.ctx, &apiv1.Balance{
Amount: amt,
})
require.NoError(t, err)
d, err := dt.Has(f.ctx, []byte("test_acc"))
require.NoError(t, err)
require.True(t, d)
res, err := dt.Get(f.ctx, []byte("test_acc"))
require.NoError(t, err)
require.NotNil(t, res)
require.EqualValues(t, amt, res.Amount)
}