Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Feature] Add Oracle module #9

Merged
merged 71 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
e9eb4d7
add base genesis
ThanhNhann Sep 4, 2024
59a9f6d
update oracle ibc handle
ThanhNhann Sep 4, 2024
165b08a
setup handle oracle requests at begin block
ThanhNhann Sep 6, 2024
9630cf4
delete data record incase timeout and ack error
ThanhNhann Sep 9, 2024
ef78524
add msg request band rates
ThanhNhann Sep 9, 2024
8494c41
add process band oracle prices flow
ThanhNhann Sep 9, 2024
fa4f6ba
clean tx request band rates
ThanhNhann Sep 9, 2024
5fa5715
update genesis
ThanhNhann Sep 9, 2024
b277181
add update band params proposal
ThanhNhann Sep 10, 2024
0bd4d22
clean
ThanhNhann Sep 10, 2024
b311cc8
Merge branch 'main' of https://github.com/onomyprotocol/reserve into …
ThanhNhann Sep 10, 2024
6b5c4f1
add ProposalAuthorizeBandOracleRequest
ThanhNhann Sep 11, 2024
825adef
add UpdateBandOracleRequestProposal
ThanhNhann Sep 11, 2024
bca13eb
add tx authorize-band-oracle-request-proposal
ThanhNhann Sep 11, 2024
c894fc0
Merge branch 'main' of https://github.com/onomyprotocol/reserve into …
ThanhNhann Sep 11, 2024
6f4932b
add tx update-band-oracle-request-proposal
ThanhNhann Sep 11, 2024
9847429
add DeleteBandOracleRequestProposal
ThanhNhann Sep 11, 2024
263c0ef
add delete-band-oracle-request-proposal
ThanhNhann Sep 12, 2024
4ff4908
Merge branch 'main' of https://github.com/onomyprotocol/reserve into …
ThanhNhann Sep 12, 2024
4a77a0b
minor
ThanhNhann Sep 13, 2024
ade9184
switch oracle to non inject module and add test for proposal to check
ThanhNhann Sep 15, 2024
7019e03
add test for band oracle
ThanhNhann Sep 16, 2024
56bd9db
add getprice func with base and quote
ThanhNhann Sep 16, 2024
4b860f1
add bandtesting support chain test
ThanhNhann Sep 16, 2024
5c250c5
Merge branch 'main' of https://github.com/onomyprotocol/reserve into …
ThanhNhann Sep 16, 2024
e3550a8
add price relay test
ThanhNhann Sep 19, 2024
09be7d2
add tx RequestBandRates to msg
ThanhNhann Sep 19, 2024
20bcd91
add ibc test
ThanhNhann Sep 20, 2024
00b172f
add register oracle ibc
ThanhNhann Sep 20, 2024
99d0620
add check empty version in OnChanOpenInit
ThanhNhann Sep 23, 2024
d06d95c
update logic and add test for OnRecvPacket
ThanhNhann Sep 24, 2024
eb9b486
clean
ThanhNhann Sep 24, 2024
5502d66
add query band prices state
ThanhNhann Sep 25, 2024
e4055d4
add logging
ThanhNhann Sep 25, 2024
6ca701f
Merge branch 'dev' of https://github.com/onomyprotocol/reserve into n…
ThanhNhann Sep 25, 2024
b6f9969
nit
vuong177 Sep 26, 2024
af61347
fix test getPrice
hungdinh82 Sep 26, 2024
d0b5186
fix test getPrice
hungdinh82 Sep 26, 2024
50fceea
fix test getPrice
hungdinh82 Sep 26, 2024
4bef72a
fix test getPrice
hungdinh82 Sep 26, 2024
892f919
update genesis
ThanhNhann Sep 26, 2024
22834ab
add AddNewSymbolToBandOracleRequest to support vault
ThanhNhann Sep 26, 2024
ba927e9
fix testGetPrice update
hungdinh82 Sep 27, 2024
04c4490
add test ProcessBandOraclePrices
hungdinh82 Sep 27, 2024
80c6e02
fix testGetPrice update final
hungdinh82 Sep 27, 2024
e1c9abc
Merge pull request #23 from hungdinh82/hung/oracle_module
ThanhNhann Sep 27, 2024
bfe2c30
add testProcessBandOraclePrices
hungdinh82 Sep 27, 2024
b939f07
Merge remote-tracking branch 'upstream/nhan/oracle_module' into hung_…
hungdinh82 Sep 27, 2024
fbd6be6
fix depinject and ibc test
ThanhNhann Sep 30, 2024
81c9ccb
Merge branch 'nhan/oracle_module' of https://github.com/onomyprotocol…
ThanhNhann Sep 30, 2024
0da340e
sdk context to context
ThanhNhann Sep 30, 2024
5f3507e
Merge branch 'dev' of https://github.com/onomyprotocol/reserve into n…
ThanhNhann Sep 30, 2024
5dd0747
minor
ThanhNhann Sep 30, 2024
667c3d4
fix ibc channel handshake
ThanhNhann Sep 30, 2024
ba5bcef
minor
ThanhNhann Sep 30, 2024
0aa253c
debug
ThanhNhann Sep 30, 2024
0d5798d
checking
ThanhNhann Sep 30, 2024
555d1b8
update ibc
ThanhNhann Sep 30, 2024
4134eca
fix capability
ThanhNhann Sep 30, 2024
d0599dc
Merge branch 'dev' of https://github.com/onomyprotocol/reserve into n…
ThanhNhann Oct 3, 2024
c37ec60
clean stale band call data record
ThanhNhann Oct 3, 2024
df18d72
Merge branch 'nhan/oracle_module' into hung_oracle_module_test_Proces…
hungdinh82 Oct 3, 2024
0605596
merge
hungdinh82 Oct 3, 2024
af1cbda
fix test update
hungdinh82 Oct 3, 2024
b525b15
fix test update
hungdinh82 Oct 3, 2024
4844705
fix test update 3
hungdinh82 Oct 3, 2024
1b5f180
Merge pull request #24 from hungdinh82/hung_oracle_module_test_Proces…
ThanhNhann Oct 4, 2024
451e9ee
minor
ThanhNhann Oct 4, 2024
7d42bf6
sdk context to context
ThanhNhann Oct 4, 2024
148c9e3
Merge branch 'dev' of https://github.com/onomyprotocol/reserve into n…
ThanhNhann Oct 7, 2024
df4c2be
Merge pull request #32 from onomyprotocol/nhan/clean_stale_band_call_…
vuong177 Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
24 changes: 22 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ import (
ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper"
ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
ibctestingtypes "github.com/cosmos/ibc-go/v8/testing/types"

oraclemodulekeeper "github.com/onomyprotocol/reserve/x/oracle/keeper"

Expand Down Expand Up @@ -141,6 +142,8 @@ type App struct {
ScopedIBCTransferKeeper capabilitykeeper.ScopedKeeper
ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper
ScopedICAHostKeeper capabilitykeeper.ScopedKeeper
ScopedKeepers map[string]capabilitykeeper.ScopedKeeper
// ScopedOracleKeeper capabilitykeeper.ScopedKeeper

OracleKeeper oraclemodulekeeper.Keeper
VaultsKeeper vaultskeeper.Keeper
Expand Down Expand Up @@ -213,7 +216,7 @@ func New(
baseAppOptions ...func(*baseapp.BaseApp),
) (*App, error) {
var (
app = &App{}
app = &App{ScopedKeepers: make(map[string]capabilitykeeper.ScopedKeeper)}
appBuilder *runtime.AppBuilder

// merge the AppConfig and other configuration in one config
Expand Down Expand Up @@ -438,7 +441,12 @@ func (app *App) GetIBCKeeper() *ibckeeper.Keeper {

// GetCapabilityScopedKeeper returns the capability scoped keeper.
func (app *App) GetCapabilityScopedKeeper(moduleName string) capabilitykeeper.ScopedKeeper {
return app.CapabilityKeeper.ScopeToModule(moduleName)
sk, ok := app.ScopedKeepers[moduleName]
if !ok {
sk = app.CapabilityKeeper.ScopeToModule(moduleName)
app.ScopedKeepers[moduleName] = sk
}
return sk
}

// SimulationManager implements the SimulationApp interface.
Expand All @@ -459,6 +467,18 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig
docs.RegisterOpenAPIService(Name, apiSvr.Router)
}

func (app *App) GetBaseApp() *baseapp.BaseApp { return app.BaseApp }

func (app *App) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper {
return app.ScopedIBCKeeper
}

func (app *App) GetStakingKeeper() ibctestingtypes.StakingKeeper {
return app.StakingKeeper
}

func (app *App) GetTxConfig() client.TxConfig { return app.txConfig }

// GetMaccPerms returns a copy of the module account permissions
//
// NOTE: This is solely to be used for testing purposes.
Expand Down
15 changes: 12 additions & 3 deletions app/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ import (
solomachine "github.com/cosmos/ibc-go/v8/modules/light-clients/06-solomachine"
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"

// this line is used by starport scaffolding # ibc/app/import
oraclemodule "github.com/onomyprotocol/reserve/x/oracle/module"
oracle "github.com/onomyprotocol/reserve/x/oracle"
oraclemoduletypes "github.com/onomyprotocol/reserve/x/oracle/types"
oraclemodule "github.com/onomyprotocol/reserve/x/oracle/module"
)

// registerIBCModules register IBC keepers and non dependency inject modules.
Expand Down Expand Up @@ -93,7 +93,8 @@ func (app *App) registerIBCModules() error {
// by granting the governance module the right to execute the message.
// See: https://docs.cosmos.network/main/modules/gov#proposal-messages
govRouter := govv1beta1.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler)
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(oraclemoduletypes.RouterKey, oracle.NewOracleProposalHandler(app.OracleKeeper))

app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
app.appCodec, app.GetKey(ibcfeetypes.StoreKey),
Expand Down Expand Up @@ -161,6 +162,12 @@ func (app *App) registerIBCModules() error {
AddRoute(icahosttypes.SubModuleName, icaHostIBCModule)

oracleIBCModule := ibcfee.NewIBCMiddleware(oraclemodule.NewIBCModule(app.OracleKeeper), app.IBCFeeKeeper)
// oracleStack, err := app.registerOracleModule()
// if err != nil {
// return err
// }

// ibcRouter.AddRoute(oraclemoduletypes.ModuleName, oracleStack)
ibcRouter.AddRoute(oraclemoduletypes.ModuleName, oracleIBCModule)
// this line is used by starport scaffolding # ibc/app/module

Expand Down Expand Up @@ -199,6 +206,8 @@ func RegisterIBC(registry cdctypes.InterfaceRegistry) map[string]appmodule.AppMo
capabilitytypes.ModuleName: capability.AppModule{},
ibctm.ModuleName: ibctm.AppModule{},
solomachine.ModuleName: solomachine.AppModule{},

// oraclemoduletypes.ModuleName: oraclemodule.AppModule{},
}

for name, m := range modules {
Expand Down
56 changes: 56 additions & 0 deletions app/oracle.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package app

// import (
// storetypes "cosmossdk.io/store/types"
// oraclekeeper "github.com/onomyprotocol/reserve/x/oracle/keeper"
// oraclemodule "github.com/onomyprotocol/reserve/x/oracle/module"
// oracletypes "github.com/onomyprotocol/reserve/x/oracle/types"
// "github.com/cosmos/cosmos-sdk/runtime"
// authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
// ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee"
// porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types"
// )

// // registerOracleModule register Oracle keepers and non dependency inject modules.
// func (app *App) registerOracleModule() (porttypes.IBCModule, error) {
// // set up non depinject support modules store keys
// if err := app.RegisterStores(
// storetypes.NewKVStoreKey(oracletypes.StoreKey),
// ); err != nil {
// panic(err)
// }

// // register the key tables for legacy param subspaces
// app.ParamsKeeper.Subspace(oracletypes.ModuleName).WithKeyTable(oracletypes.ParamKeyTable())
// // add capability keeper and ScopeToModule for oracle ibc module
// scopedOralceKeeper := app.CapabilityKeeper.ScopeToModule(oracletypes.ModuleName)

// app.OracleKeeper = oraclekeeper.NewKeeper(
// app.AppCodec(),
// runtime.NewKVStoreService(app.GetKey(oracletypes.StoreKey)),
// app.Logger(),
// authtypes.NewModuleAddress(oracletypes.ModuleName).String(),
// app.GetIBCKeeper,
// scopedOralceKeeper,
// )

// // register IBC modules
// if err := app.RegisterModules(
// oraclemodule.NewAppModule(
// app.AppCodec(),
// app.OracleKeeper,
// app.AccountKeeper,
// app.BankKeeper,
// )); err != nil {
// return nil, err
// }

// app.ScopedOracleKeeper = scopedOralceKeeper

// // Create fee enabled ibc stack for oracel
// var oracleStack porttypes.IBCModule
// oracleStack = oraclemodule.NewIBCModule(app.OracleKeeper)
// oracleStack = ibcfee.NewIBCMiddleware(oracleStack, app.IBCFeeKeeper)

// return oracleStack, nil
// }
5 changes: 5 additions & 0 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package app
import (
"encoding/json"
"testing"
"os"

abci "github.com/cometbft/cometbft/abci/types"
cmtjson "github.com/cometbft/cometbft/libs/json"
Expand Down Expand Up @@ -209,3 +210,7 @@ func initAccountWithCoins(app *App, ctx sdk.Context, addr sdk.AccAddress, coins
panic(err)
}
}

func Cleanup(app *App) { // release cosmwasm instance cache lock
_ = os.RemoveAll(DefaultNodeHome) // remove default dir, if it was overridden during test Setup, it's a responsibility of the sender to remove the folder
}
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ require (
cosmossdk.io/x/evidence v0.1.0
cosmossdk.io/x/feegrant v0.1.0
cosmossdk.io/x/nft v0.1.0
cosmossdk.io/x/tx v0.13.1
cosmossdk.io/x/upgrade v0.1.1
github.com/bufbuild/buf v1.30.0
github.com/cometbft/cometbft v0.38.6
Expand All @@ -37,6 +38,9 @@ require (
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.18.2
Expand All @@ -46,6 +50,7 @@ require (
google.golang.org/grpc v1.64.1
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v2 v2.4.0
)

require (
Expand All @@ -56,7 +61,6 @@ require (
cloud.google.com/go/storage v1.38.0 // indirect
connectrpc.com/connect v1.15.0 // indirect
connectrpc.com/otelconnect v0.7.0 // indirect
cosmossdk.io/x/tx v0.13.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
Expand Down Expand Up @@ -190,7 +194,6 @@ require (
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/profile v1.7.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
Expand All @@ -208,7 +211,6 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
Expand Down Expand Up @@ -245,7 +247,6 @@ require (
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.5.1 // indirect
nhooyr.io/websocket v1.8.6 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ=
github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
Expand Down
30 changes: 30 additions & 0 deletions proto/reserve/oracle/events.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto3";
package reserve.oracle;

import "gogoproto/gogo.proto";

option go_package = "github.com/onomyprotocol/reserve/x/oracle/types";

message EventBandAckSuccess {
string ack_result = 1;
int64 client_id = 2;
}

message EventBandAckError {
string ack_error = 1;
int64 client_id = 2;
}

message EventBandResponseTimeout { int64 client_id = 1; }

message SetBandPriceEvent {
string relayer = 1;
repeated string symbols = 2;
repeated string prices = 3 [
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
uint64 resolve_time = 4;
uint64 request_id = 5;
int64 client_id = 6;
}
108 changes: 107 additions & 1 deletion proto/reserve/oracle/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package reserve.oracle;
import "amino/amino.proto";
import "gogoproto/gogo.proto";
import "reserve/oracle/params.proto";
import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/onomyprotocol/reserve/x/oracle/types";

Expand All @@ -14,5 +15,110 @@ message GenesisState {
// params defines all the parameters of the module.
Params params = 1
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ];
string port_id = 2;
BandParams band_params = 2 [ (gogoproto.nullable) = false ];
repeated BandPriceState band_price_states = 3;
repeated BandOracleRequest band_oracle_requests = 4;
uint64 band_latest_client_id = 5;
repeated CalldataRecord calldata_records = 6;
uint64 band_latest_request_id = 7;
BandOracleRequestParams band_oracle_request_params = 8 [ (gogoproto.nullable) = false ];
}

message BandOracleRequest {
// Unique Identifier for band ibc oracle request
uint64 request_id = 1;

// OracleScriptID is the unique identifier of the oracle script to be
// executed.
int64 oracle_script_id = 2;

// Symbols is the list of symbols to prepare in the calldata
repeated string symbols = 3;

// AskCount is the number of validators that are requested to respond to this
// oracle request. Higher value means more security, at a higher gas cost.
uint64 ask_count = 4;

// MinCount is the minimum number of validators necessary for the request to
// proceed to the execution phase. Higher value means more security, at the
// cost of liveness.
uint64 min_count = 5;

// FeeLimit is the maximum tokens that will be paid to all data source
// providers.
repeated cosmos.base.v1beta1.Coin fee_limit = 6 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

// PrepareGas is amount of gas to pay to prepare raw requests
uint64 prepare_gas = 7;
// ExecuteGas is amount of gas to reserve for executing
uint64 execute_gas = 8;
// MinSourceCount is the minimum number of data sources that must be used by
// each validator
uint64 min_source_count = 9;
}

message BandOracleRequestParams {
// AskCount is the number of validators that are requested to respond to this
// oracle request. Higher value means more security, at a higher gas cost.
uint64 ask_count = 1;

// MinCount is the minimum number of validators necessary for the request to
// proceed to the execution phase. Higher value means more security, at the
// cost of liveness.
uint64 min_count = 2;

// FeeLimit is the maximum tokens that will be paid to all data source
// providers.
repeated cosmos.base.v1beta1.Coin fee_limit = 3 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

// PrepareGas is amount of gas to pay to prepare raw requests
uint64 prepare_gas = 4;
// ExecuteGas is amount of gas to reserve for executing
uint64 execute_gas = 5;
// MinSourceCount is the minimum number of data sources that must be used by
// each validator
uint64 min_source_count = 6;
}

message BandParams {
// block request interval to send Band IBC prices
int64 ibc_request_interval = 2;
// band IBC source channel
string ibc_source_channel = 3;
// band IBC version
string ibc_version = 4;
// band IBC portID
string ibc_port_id = 5;
// legacy oracle scheme ids
repeated int64 legacy_oracle_ids = 6;
}

message BandPriceState {
string symbol = 1;
string rate = 2 [
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
uint64 resolve_time = 3;
uint64 request_ID = 4;
PriceState price_state = 5 [ (gogoproto.nullable) = false ];
}

message PriceState {
string price = 1 [
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
int64 timestamp = 2;
}

message CalldataRecord {
uint64 client_id = 1;
bytes calldata = 2;
}
Loading
Loading