Skip to content

Commit

Permalink
Update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Lacy committed Dec 16, 2024
1 parent 471b2cf commit e528d44
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
50 changes: 50 additions & 0 deletions contracts/babylon/schema/babylon-contract.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,32 @@
}
},
"additionalProperties": false
},
{
"description": "`SendRewards` is a message sent by the finality contract, to send rewards to Babylon",
"type": "object",
"required": [
"send_rewards"
],
"properties": {
"send_rewards": {
"type": "object",
"required": [
"fp_distribution"
],
"properties": {
"fp_distribution": {
"description": "`fp_distribution` is the list of finality providers and their rewards",
"type": "array",
"items": {
"$ref": "#/definitions/RewardsDistribution"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"definitions": {
Expand Down Expand Up @@ -217,6 +243,26 @@
}
},
"additionalProperties": false
},
"RewardsDistribution": {
"type": "object",
"required": [
"fp_pubkey_hex",
"reward"
],
"properties": {
"fp_pubkey_hex": {
"type": "string"
},
"reward": {
"$ref": "#/definitions/Uint128"
}
},
"additionalProperties": false
},
"Uint128": {
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
"type": "string"
}
}
},
Expand Down Expand Up @@ -295,6 +341,7 @@
"babylon_tag",
"btc_confirmation_depth",
"checkpoint_finalization_timeout",
"denom",
"network",
"notify_cosmos_zone"
],
Expand Down Expand Up @@ -353,6 +400,9 @@
"null"
]
},
"denom": {
"type": "string"
},
"network": {
"$ref": "#/definitions/Network"
},
Expand Down
46 changes: 46 additions & 0 deletions contracts/babylon/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,32 @@
}
},
"additionalProperties": false
},
{
"description": "`SendRewards` is a message sent by the finality contract, to send rewards to Babylon",
"type": "object",
"required": [
"send_rewards"
],
"properties": {
"send_rewards": {
"type": "object",
"required": [
"fp_distribution"
],
"properties": {
"fp_distribution": {
"description": "`fp_distribution` is the list of finality providers and their rewards",
"type": "array",
"items": {
"$ref": "#/definitions/RewardsDistribution"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"definitions": {
Expand Down Expand Up @@ -101,6 +127,26 @@
}
},
"additionalProperties": false
},
"RewardsDistribution": {
"type": "object",
"required": [
"fp_pubkey_hex",
"reward"
],
"properties": {
"fp_pubkey_hex": {
"type": "string"
},
"reward": {
"$ref": "#/definitions/Uint128"
}
},
"additionalProperties": false
},
"Uint128": {
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
"type": "string"
}
}
}
4 changes: 4 additions & 0 deletions contracts/babylon/schema/raw/response_to_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"babylon_tag",
"btc_confirmation_depth",
"checkpoint_finalization_timeout",
"denom",
"network",
"notify_cosmos_zone"
],
Expand Down Expand Up @@ -64,6 +65,9 @@
"null"
]
},
"denom": {
"type": "string"
},
"network": {
"$ref": "#/definitions/Network"
},
Expand Down

0 comments on commit e528d44

Please sign in to comment.