7
7
//! and `do_sudo` should be wrapped with a extern "C" entry point including
8
8
//! the contract-specific function pointer. This is done via the `#[entry_point]`
9
9
//! macro attribute from cosmwasm-derive.
10
+ #![ cfg( feature = "std" ) ]
11
+
10
12
use alloc:: string:: ToString ;
11
13
use alloc:: vec:: Vec ;
12
14
use core:: marker:: PhantomData ;
@@ -22,7 +24,7 @@ use crate::ibc::{
22
24
} ;
23
25
use crate :: imports:: { ExternalApi , ExternalQuerier , ExternalStorage } ;
24
26
use crate :: memory:: { alloc, consume_region, release_buffer, Region } ;
25
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
27
+ #[ cfg( feature = "abort" ) ]
26
28
use crate :: panic:: install_panic_handler;
27
29
use crate :: query:: CustomQuery ;
28
30
use crate :: results:: { ContractResult , QueryResponse , Reply , Response } ;
@@ -101,7 +103,7 @@ where
101
103
C : CustomMsg ,
102
104
E : ToString ,
103
105
{
104
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
106
+ #[ cfg( feature = "abort" ) ]
105
107
install_panic_handler ( ) ;
106
108
let res = _do_instantiate (
107
109
instantiate_fn,
@@ -131,7 +133,7 @@ where
131
133
C : CustomMsg ,
132
134
E : ToString ,
133
135
{
134
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
136
+ #[ cfg( feature = "abort" ) ]
135
137
install_panic_handler ( ) ;
136
138
let res = _do_execute (
137
139
execute_fn,
@@ -160,7 +162,7 @@ where
160
162
C : CustomMsg ,
161
163
E : ToString ,
162
164
{
163
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
165
+ #[ cfg( feature = "abort" ) ]
164
166
install_panic_handler ( ) ;
165
167
let res = _do_migrate ( migrate_fn, env_ptr as * mut Region , msg_ptr as * mut Region ) ;
166
168
let v = to_vec ( & res) . unwrap ( ) ;
@@ -184,7 +186,7 @@ where
184
186
C : CustomMsg ,
185
187
E : ToString ,
186
188
{
187
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
189
+ #[ cfg( feature = "abort" ) ]
188
190
install_panic_handler ( ) ;
189
191
let res = _do_sudo ( sudo_fn, env_ptr as * mut Region , msg_ptr as * mut Region ) ;
190
192
let v = to_vec ( & res) . unwrap ( ) ;
@@ -207,7 +209,7 @@ where
207
209
C : CustomMsg ,
208
210
E : ToString ,
209
211
{
210
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
212
+ #[ cfg( feature = "abort" ) ]
211
213
install_panic_handler ( ) ;
212
214
let res = _do_reply ( reply_fn, env_ptr as * mut Region , msg_ptr as * mut Region ) ;
213
215
let v = to_vec ( & res) . unwrap ( ) ;
@@ -229,7 +231,7 @@ where
229
231
M : DeserializeOwned ,
230
232
E : ToString ,
231
233
{
232
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
234
+ #[ cfg( feature = "abort" ) ]
233
235
install_panic_handler ( ) ;
234
236
let res = _do_query ( query_fn, env_ptr as * mut Region , msg_ptr as * mut Region ) ;
235
237
let v = to_vec ( & res) . unwrap ( ) ;
@@ -252,7 +254,7 @@ where
252
254
Q : CustomQuery ,
253
255
E : ToString ,
254
256
{
255
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
257
+ #[ cfg( feature = "abort" ) ]
256
258
install_panic_handler ( ) ;
257
259
let res = _do_ibc_channel_open ( contract_fn, env_ptr as * mut Region , msg_ptr as * mut Region ) ;
258
260
let v = to_vec ( & res) . unwrap ( ) ;
@@ -277,7 +279,7 @@ where
277
279
C : CustomMsg ,
278
280
E : ToString ,
279
281
{
280
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
282
+ #[ cfg( feature = "abort" ) ]
281
283
install_panic_handler ( ) ;
282
284
let res = _do_ibc_channel_connect ( contract_fn, env_ptr as * mut Region , msg_ptr as * mut Region ) ;
283
285
let v = to_vec ( & res) . unwrap ( ) ;
@@ -302,7 +304,7 @@ where
302
304
C : CustomMsg ,
303
305
E : ToString ,
304
306
{
305
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
307
+ #[ cfg( feature = "abort" ) ]
306
308
install_panic_handler ( ) ;
307
309
let res = _do_ibc_channel_close ( contract_fn, env_ptr as * mut Region , msg_ptr as * mut Region ) ;
308
310
let v = to_vec ( & res) . unwrap ( ) ;
@@ -328,7 +330,7 @@ where
328
330
C : CustomMsg ,
329
331
E : ToString ,
330
332
{
331
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
333
+ #[ cfg( feature = "abort" ) ]
332
334
install_panic_handler ( ) ;
333
335
let res = _do_ibc_packet_receive ( contract_fn, env_ptr as * mut Region , msg_ptr as * mut Region ) ;
334
336
let v = to_vec ( & res) . unwrap ( ) ;
@@ -354,7 +356,7 @@ where
354
356
C : CustomMsg ,
355
357
E : ToString ,
356
358
{
357
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
359
+ #[ cfg( feature = "abort" ) ]
358
360
install_panic_handler ( ) ;
359
361
let res = _do_ibc_packet_ack ( contract_fn, env_ptr as * mut Region , msg_ptr as * mut Region ) ;
360
362
let v = to_vec ( & res) . unwrap ( ) ;
@@ -381,7 +383,7 @@ where
381
383
C : CustomMsg ,
382
384
E : ToString ,
383
385
{
384
- #[ cfg( all ( feature = "abort" , feature = "std" ) ) ]
386
+ #[ cfg( feature = "abort" ) ]
385
387
install_panic_handler ( ) ;
386
388
let res = _do_ibc_packet_timeout ( contract_fn, env_ptr as * mut Region , msg_ptr as * mut Region ) ;
387
389
let v = to_vec ( & res) . unwrap ( ) ;
0 commit comments