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 11, 2024
1 parent 7d8140a commit da5dbc2
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 @@ -164,6 +164,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 @@ -287,6 +313,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 @@ -1286,6 +1332,7 @@
"babylon_tag",
"btc_confirmation_depth",
"checkpoint_finalization_timeout",
"denom",
"network",
"notify_cosmos_zone"
],
Expand Down Expand Up @@ -1344,6 +1391,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 @@ -48,6 +48,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 @@ -171,6 +197,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 da5dbc2

Please sign in to comment.