Skip to content

Commit

Permalink
Merge pull request #7 from babylonchain/release-0.2
Browse files Browse the repository at this point in the history
Release 0.2
  • Loading branch information
maurolacy authored Feb 13, 2024
2 parents 4b6f0aa + 09237d9 commit 35bea9c
Show file tree
Hide file tree
Showing 10 changed files with 301 additions and 6 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Build results
/target
/schema
/artifacts

# Cargo+Git helper file (https://github.com/rust-lang/cargo/blob/0.44.1/src/cargo/sources/git/utils.rs#L320-L327)
Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## [Unreleased](https://github.com/babylonchain/storage-contract/tree/HEAD)
## [v0.2.0](https://github.com/babylonchain/storage-contract/tree/v0.2.0) (2024-02-13)

[Full Changelog](https://github.com/babylonchain/storage-contract/compare/v0.1.1...HEAD)
[Full Changelog](https://github.com/babylonchain/storage-contract/compare/v0.1.1...v0.2.0)

**Merged pull requests:**

- Small polish [\#4](https://github.com/babylonchain/storage-contract/pull/4) ([llllllluc](https://github.com/llllllluc))

## [v0.1.1](https://github.com/babylonchain/storage-contract/tree/v0.1.1) (2024-01-24)

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[package]
name = "storage-contract"
version = "0.1.1"
authors = ["KonradStaniec <konrad.staniec@gmail.com>"]
version = "0.2.0"
authors = ["KonradStaniec <konrad.staniec@gmail.com>",
"Mauro Lacy <mauro@lacy.com.es>"]
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
32 changes: 32 additions & 0 deletions schema/raw/execute.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"oneOf": [
{
"type": "object",
"required": [
"save_data"
],
"properties": {
"save_data": {
"$ref": "#/definitions/SaveDataMsg"
}
},
"additionalProperties": false
}
],
"definitions": {
"SaveDataMsg": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "string"
}
},
"additionalProperties": false
}
}
}
6 changes: 6 additions & 0 deletions schema/raw/instantiate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InstantiateMsg",
"type": "object",
"additionalProperties": false
}
32 changes: 32 additions & 0 deletions schema/raw/query.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"oneOf": [
{
"type": "object",
"required": [
"query_data"
],
"properties": {
"query_data": {
"$ref": "#/definitions/QueryDataMsg"
}
},
"additionalProperties": false
}
],
"definitions": {
"QueryDataMsg": {
"type": "object",
"required": [
"data_hash"
],
"properties": {
"data_hash": {
"type": "string"
}
},
"additionalProperties": false
}
}
}
38 changes: 38 additions & 0 deletions schema/raw/response_to_check_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CheckDataResponse",
"type": "object",
"required": [
"finalized",
"height",
"latest_finalized_epoch",
"save_epoch",
"timestamp"
],
"properties": {
"finalized": {
"type": "boolean"
},
"height": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"latest_finalized_epoch": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"save_epoch": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"timestamp": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
52 changes: 52 additions & 0 deletions schema/raw/response_to_query_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DataResponse",
"type": "object",
"required": [
"data",
"finalized",
"latest_finalized_epoch"
],
"properties": {
"data": {
"$ref": "#/definitions/StoredData"
},
"finalized": {
"type": "boolean"
},
"latest_finalized_epoch": {
"$ref": "#/definitions/Uint64"
}
},
"additionalProperties": false,
"definitions": {
"StoredData": {
"type": "object",
"required": [
"btc_height",
"btc_timestamp",
"data",
"saved_at_btc_epoch"
],
"properties": {
"btc_height": {
"$ref": "#/definitions/Uint64"
},
"btc_timestamp": {
"$ref": "#/definitions/Uint64"
},
"data": {
"type": "string"
},
"saved_at_btc_epoch": {
"$ref": "#/definitions/Uint64"
}
},
"additionalProperties": false
},
"Uint64": {
"description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```",
"type": "string"
}
}
}
131 changes: 131 additions & 0 deletions schema/storage-contract.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"contract_name": "storage-contract",
"contract_version": "0.2.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InstantiateMsg",
"type": "object",
"additionalProperties": false
},
"execute": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"oneOf": [
{
"type": "object",
"required": [
"save_data"
],
"properties": {
"save_data": {
"$ref": "#/definitions/SaveDataMsg"
}
},
"additionalProperties": false
}
],
"definitions": {
"SaveDataMsg": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"query": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"oneOf": [
{
"type": "object",
"required": [
"query_data"
],
"properties": {
"query_data": {
"$ref": "#/definitions/QueryDataMsg"
}
},
"additionalProperties": false
}
],
"definitions": {
"QueryDataMsg": {
"type": "object",
"required": [
"data_hash"
],
"properties": {
"data_hash": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"migrate": null,
"sudo": null,
"responses": {
"query_data": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DataResponse",
"type": "object",
"required": [
"data",
"finalized",
"latest_finalized_epoch"
],
"properties": {
"data": {
"$ref": "#/definitions/StoredData"
},
"finalized": {
"type": "boolean"
},
"latest_finalized_epoch": {
"$ref": "#/definitions/Uint64"
}
},
"additionalProperties": false,
"definitions": {
"StoredData": {
"type": "object",
"required": [
"btc_height",
"btc_timestamp",
"data",
"saved_at_btc_epoch"
],
"properties": {
"btc_height": {
"$ref": "#/definitions/Uint64"
},
"btc_timestamp": {
"$ref": "#/definitions/Uint64"
},
"data": {
"type": "string"
},
"saved_at_btc_epoch": {
"$ref": "#/definitions/Uint64"
}
},
"additionalProperties": false
},
"Uint64": {
"description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```",
"type": "string"
}
}
}
}
}

0 comments on commit 35bea9c

Please sign in to comment.