-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Description
Params are platform configurations that can be changed by spells.
Updated schema
type Param @entity {
id: ID!
description: String! # Human-readable description
currentValue: String! # String representation of the value
platform: Platform! # Affected platform
target: Target! # Affected contract
history: [ParamHistory]! @derivedFrom(field:"param")
proposals: [ParamProposal]! @derivedFrom(field:"param")
}
type ParamHistory @entity {
id: ID!
param: Param!
oldValue: String!
newValue: String!
changedInSpell: Spell! # Spell that changed the Param when it was executed
timestamp: BigInt! # Time of spell execution
}
type ParamProposal @entity {
id: ID!
param: Param!
proposedValue: String!
proposedInSpell: Spell!
timestamp: BigInt! # Time of spell creation
eta: BigInt! # Eta of spell
}Current value
When a Spell is executed, the current value of the Param should be updated.
The current value of the Param will also often be set at contract execution. This must be handled manually for now, when the Params are initially created.
The old value will be placed in a proto object ParamHistory.
Proposed values
Params may have multiple proposed values from multiple spells. These are tracked and updated as a proto object ParamProposal.
The proto object only needs to be created when a new Spell is cast and does not need to be further updated.
Metadata
Metadata
Assignees
Labels
No labels