Skip to content

Commit 8573074

Browse files
committed
feat: neutron-voting-registry new schema
1 parent ec4bc75 commit 8573074

14 files changed

+686
-21
lines changed

contracts/dao/voting/neutron-vault/examples/schema.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,14 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
use std::env::current_dir;
16-
use std::fs::create_dir_all;
17-
18-
use cosmwasm_schema::{export_schema, remove_schemas, schema_for};
15+
use cosmwasm_schema::write_api;
1916

2017
use neutron_vault::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
2118

2219
fn main() {
23-
let mut out_dir = current_dir().unwrap();
24-
out_dir.push("schema");
25-
create_dir_all(&out_dir).unwrap();
26-
remove_schemas(&out_dir).unwrap();
27-
28-
export_schema(&schema_for!(InstantiateMsg), &out_dir);
29-
export_schema(&schema_for!(ExecuteMsg), &out_dir);
30-
export_schema(&schema_for!(QueryMsg), &out_dir);
20+
write_api! {
21+
instantiate: InstantiateMsg,
22+
query: QueryMsg,
23+
execute: ExecuteMsg,
24+
}
3125
}

0 commit comments

Comments
 (0)