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

Make oracle-related data on-chain parameters #537

Closed
RiccardoM opened this issue Jul 6, 2021 · 0 comments · Fixed by #547
Closed

Make oracle-related data on-chain parameters #537

RiccardoM opened this issue Jul 6, 2021 · 0 comments · Fixed by #547
Assignees
Labels
kind/enhancement Enhance an already existing feature; no "New feature" to add x/profiles Module that allows to create and manage decentralized social profiles
Milestone

Comments

@RiccardoM
Copy link
Contributor

Context

Currently there some things about the Band Protocol integration that are hard-coded inside the Desmos codebase. You can find such things here:

const (
	// OracleScriptID represents the oracle script to be called on Band Protocol
	OracleScriptID = 32

	OracleAskCount   = 10
	OracleMinCount   = 6
	OraclePrepareGas = 50_000
	OracleExecuteGas = 200_000

	FeePayer = "desmos-ibc-profiles"
)

var (
	FeeCoins = sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(0)))
)

All of these should be moved as on-chain parameters in order to allow the governance to change them if needed (eg. Band Protocol changes the denom name, or we change the oracle script to be used).

Implementation proposal

I propose to implement a new set of x/profiles parameters as follows:

// Params defines the x/profile parameters
type Params struct {
 ... 
 Oracle Oracle
}

// Oracle contains the parameters of the oracle to be used when verifying application links
type Oracle struct {
  ScriptID int64
  AskCount uint64
  PrepareGas uint64
  ExecuteGas uint64
  FeePayer string
  FeeAmount sdk.Coins
}
@RiccardoM RiccardoM added kind/enhancement Enhance an already existing feature; no "New feature" to add x/profiles Module that allows to create and manage decentralized social profiles labels Jul 6, 2021
@dadamu dadamu self-assigned this Jul 8, 2021
@dadamu dadamu mentioned this issue Jul 8, 2021
7 tasks
@RiccardoM RiccardoM added this to the v0.17.1 milestone Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Enhance an already existing feature; no "New feature" to add x/profiles Module that allows to create and manage decentralized social profiles
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants