File tree Expand file tree Collapse file tree 5 files changed +17
-10
lines changed Expand file tree Collapse file tree 5 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ impl Binary {
76
76
}
77
77
78
78
pub fn to_hex ( & self ) -> String {
79
- hex:: encode ( self . 0 . clone ( ) )
79
+ hex:: encode ( & self . 0 )
80
80
}
81
81
}
82
82
Original file line number Diff line number Diff line change @@ -533,7 +533,10 @@ impl Envs {
533
533
} ,
534
534
transaction : Some ( TransactionInfo :: new (
535
535
3 ,
536
- Binary :: from_hex ( "0102030405060708" ) . unwrap ( ) ,
536
+ Binary :: from_hex (
537
+ "E5469DACEC17CEF8A260FD37675ED87E7FB6A2B5AD95193C51308006C7E494B3" ,
538
+ )
539
+ . unwrap ( ) ,
537
540
) ) ,
538
541
contract : ContractInfo {
539
542
address : self . contract_address . clone ( ) ,
@@ -1467,7 +1470,10 @@ mod tests {
1467
1470
} ,
1468
1471
transaction: Some ( TransactionInfo :: new(
1469
1472
3 ,
1470
- Binary :: from_hex( "E5469DACEC17CEF8A260FD37675ED87E7FB6A2B5AD95193C51308006C7E494B3" ) . unwrap( ) ,
1473
+ Binary :: from_hex(
1474
+ "E5469DACEC17CEF8A260FD37675ED87E7FB6A2B5AD95193C51308006C7E494B3"
1475
+ )
1476
+ . unwrap( ) ,
1471
1477
) ) ,
1472
1478
contract: ContractInfo {
1473
1479
address: Addr :: unchecked( MOCK_CONTRACT_ADDR )
Original file line number Diff line number Diff line change 1
1
/// Implements a hidden constructor for non-exhaustive structures that need
2
2
/// to be built in libraries like cw-multi-test.
3
3
macro_rules! impl_hidden_constructor {
4
- ( $response : ty, $( $field: ident : $t: ty) ,* ) => {
5
- impl $response {
4
+ ( $type : ty, $( $field: ident : $t: ty) ,* ) => {
5
+ impl $type {
6
6
/// Constructor for testing frameworks such as cw-multi-test.
7
7
/// This is required because the type is #[non_exhaustive].
8
8
/// As a contract developer you should not need this constructor since
Original file line number Diff line number Diff line change @@ -921,7 +921,7 @@ mod tests {
921
921
922
922
let report2 = instance. create_gas_report ( ) ;
923
923
assert_eq ! ( report2. used_externally, 251 ) ;
924
- assert_eq ! ( report2. used_internally, 17953755 ) ;
924
+ assert_eq ! ( report2. used_internally, 18034325 ) ;
925
925
assert_eq ! ( report2. limit, LIMIT ) ;
926
926
assert_eq ! (
927
927
report2. remaining,
@@ -1088,7 +1088,7 @@ mod tests {
1088
1088
. unwrap ( ) ;
1089
1089
1090
1090
let init_used = orig_gas - instance. get_gas_left ( ) ;
1091
- assert_eq ! ( init_used, 17954006 ) ;
1091
+ assert_eq ! ( init_used, 18034576 ) ;
1092
1092
}
1093
1093
1094
1094
#[ test]
@@ -1113,7 +1113,7 @@ mod tests {
1113
1113
. unwrap ( ) ;
1114
1114
1115
1115
let execute_used = gas_before_execute - instance. get_gas_left ( ) ;
1116
- assert_eq ! ( execute_used, 24613486 ) ;
1116
+ assert_eq ! ( execute_used, 24624251 ) ;
1117
1117
}
1118
1118
1119
1119
#[ test]
@@ -1156,6 +1156,6 @@ mod tests {
1156
1156
) ;
1157
1157
1158
1158
let query_used = gas_before_query - instance. get_gas_left ( ) ;
1159
- assert_eq ! ( query_used, 11119756 ) ;
1159
+ assert_eq ! ( query_used, 11105221 ) ;
1160
1160
}
1161
1161
}
Original file line number Diff line number Diff line change @@ -282,7 +282,8 @@ pub fn mock_env() -> Env {
282
282
} ,
283
283
transaction : Some ( TransactionInfo :: new (
284
284
3 ,
285
- Binary :: from_hex ( "E5469DACEC17CEF8A260FD37675ED87E7FB6A2B5AD95193C51308006C7E494B3" ) . unwrap ( ) ,
285
+ Binary :: from_hex ( "E5469DACEC17CEF8A260FD37675ED87E7FB6A2B5AD95193C51308006C7E494B3" )
286
+ . unwrap ( ) ,
286
287
) ) ,
287
288
contract : ContractInfo {
288
289
address : Addr :: unchecked ( contract_addr) ,
You can’t perform that action at this time.
0 commit comments