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

Add cw721-receiver contract #144

Merged
merged 13 commits into from
Feb 7, 2024
Prev Previous commit
Next Next commit
Add schema
chipshort committed Nov 21, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d748ff5448683bad9851184418891ec792e40226
65 changes: 65 additions & 0 deletions contracts/cw721-receiver/schema/cw721-receiver.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"contract_name": "cw721-receiver",
"contract_version": "0.18.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": [
"receive_nft"
],
"properties": {
"receive_nft": {
"$ref": "#/definitions/Cw721ReceiveMsg"
}
},
"additionalProperties": false
}
],
"definitions": {
"Binary": {
"description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>. See also <https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md>.",
"type": "string"
},
"Cw721ReceiveMsg": {
"description": "Cw721ReceiveMsg should be de/serialized under `Receive()` variant in a ExecuteMsg",
"type": "object",
"required": [
"msg",
"sender",
"token_id"
],
"properties": {
"msg": {
"$ref": "#/definitions/Binary"
},
"sender": {
"type": "string"
},
"token_id": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"query": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"type": "string",
"enum": []
},
"migrate": null,
"sudo": null,
"responses": {}
}
45 changes: 45 additions & 0 deletions contracts/cw721-receiver/schema/raw/execute.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"oneOf": [
{
"type": "object",
"required": [
"receive_nft"
],
"properties": {
"receive_nft": {
"$ref": "#/definitions/Cw721ReceiveMsg"
}
},
"additionalProperties": false
}
],
"definitions": {
"Binary": {
"description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>. See also <https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md>.",
"type": "string"
},
"Cw721ReceiveMsg": {
"description": "Cw721ReceiveMsg should be de/serialized under `Receive()` variant in a ExecuteMsg",
"type": "object",
"required": [
"msg",
"sender",
"token_id"
],
"properties": {
"msg": {
"$ref": "#/definitions/Binary"
},
"sender": {
"type": "string"
},
"token_id": {
"type": "string"
}
},
"additionalProperties": false
}
}
}
6 changes: 6 additions & 0 deletions contracts/cw721-receiver/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
}
6 changes: 6 additions & 0 deletions contracts/cw721-receiver/schema/raw/query.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"type": "string",
"enum": []
}