Skip to content

Commit 43d6af2

Browse files
committed
Make the floaty contract smaller
1 parent 59c4d86 commit 43d6af2

File tree

9 files changed

+30
-739
lines changed

9 files changed

+30
-739
lines changed

contracts/floaty/examples/schema.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use std::fs::create_dir_all;
44
use cosmwasm_schema::{export_schema, remove_schemas, schema_for};
55
use cosmwasm_std::BalanceResponse;
66

7-
use hackatom::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg, SudoMsg, VerifierResponse};
8-
use hackatom::state::State;
7+
use floaty::msg::{ExecuteMsg, InstantiateMsg, QueryMsg, VerifierResponse};
8+
use floaty::state::State;
99

1010
fn main() {
1111
let mut out_dir = current_dir().unwrap();
@@ -16,8 +16,6 @@ fn main() {
1616
// messages
1717
export_schema(&schema_for!(InstantiateMsg), &out_dir);
1818
export_schema(&schema_for!(ExecuteMsg), &out_dir);
19-
export_schema(&schema_for!(MigrateMsg), &out_dir);
20-
export_schema(&schema_for!(SudoMsg), &out_dir);
2119
export_schema(&schema_for!(QueryMsg), &out_dir);
2220
export_schema(&schema_for!(VerifierResponse), &out_dir);
2321
export_schema(&schema_for!(BalanceResponse), &out_dir);

contracts/floaty/schema/execute_msg.json

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -14,94 +14,6 @@
1414
}
1515
},
1616
"additionalProperties": false
17-
},
18-
{
19-
"description": "Infinite loop to burn cpu cycles (only run when metering is enabled)",
20-
"type": "object",
21-
"required": [
22-
"cpu_loop"
23-
],
24-
"properties": {
25-
"cpu_loop": {
26-
"type": "object"
27-
}
28-
},
29-
"additionalProperties": false
30-
},
31-
{
32-
"description": "Infinite loop making storage calls (to test when their limit hits)",
33-
"type": "object",
34-
"required": [
35-
"storage_loop"
36-
],
37-
"properties": {
38-
"storage_loop": {
39-
"type": "object"
40-
}
41-
},
42-
"additionalProperties": false
43-
},
44-
{
45-
"description": "Infinite loop reading and writing memory",
46-
"type": "object",
47-
"required": [
48-
"memory_loop"
49-
],
50-
"properties": {
51-
"memory_loop": {
52-
"type": "object"
53-
}
54-
},
55-
"additionalProperties": false
56-
},
57-
{
58-
"description": "Allocate large amounts of memory without consuming much gas",
59-
"type": "object",
60-
"required": [
61-
"allocate_large_memory"
62-
],
63-
"properties": {
64-
"allocate_large_memory": {
65-
"type": "object",
66-
"required": [
67-
"pages"
68-
],
69-
"properties": {
70-
"pages": {
71-
"type": "integer",
72-
"format": "uint32",
73-
"minimum": 0.0
74-
}
75-
}
76-
}
77-
},
78-
"additionalProperties": false
79-
},
80-
{
81-
"description": "Trigger a panic to ensure framework handles gracefully",
82-
"type": "object",
83-
"required": [
84-
"panic"
85-
],
86-
"properties": {
87-
"panic": {
88-
"type": "object"
89-
}
90-
},
91-
"additionalProperties": false
92-
},
93-
{
94-
"description": "Starting with CosmWasm 0.10, some API calls return user errors back to the contract. This triggers such user errors, ensuring the transaction does not fail in the backend.",
95-
"type": "object",
96-
"required": [
97-
"user_errors_in_api_calls"
98-
],
99-
"properties": {
100-
"user_errors_in_api_calls": {
101-
"type": "object"
102-
}
103-
},
104-
"additionalProperties": false
10517
}
10618
]
10719
}

contracts/floaty/schema/migrate_msg.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

contracts/floaty/schema/sudo_msg.json

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)