@@ -5,19 +5,14 @@ use crate::vm::contract::utils::{
5
5
call_contract_once, call_contract_repeat, script_data, setup_instructions, u256_iterator_loop,
6
6
u256_iterator_loop_with_step,
7
7
} ;
8
- use fuel_core:: chain_config:: Randomize ;
9
8
use fuel_core_types:: fuel_asm:: { op, GTFArgs , Instruction , RegId } ;
10
- use fuel_core_types:: fuel_crypto:: rand;
11
- use fuel_core_types:: fuel_tx;
12
9
use fuel_core_types:: fuel_tx:: Address ;
13
10
use fuel_core_types:: fuel_types:: bytes:: WORD_SIZE ;
14
11
use fuel_core_types:: fuel_types:: Bytes32 ;
15
12
use fuels:: prelude:: AssetId ;
16
13
use fuels:: prelude:: ContractId ;
17
- use fuels:: tx:: UtxoId ;
18
14
use fuels:: types:: input:: Input as TxInput ;
19
15
use fuels:: types:: output:: Output as TxOutput ;
20
- use fuels_core:: types:: { bech32:: Bech32Address , coin:: Coin , coin_type:: CoinType , input:: Input } ;
21
16
use std:: str:: FromStr ;
22
17
use std:: sync:: OnceLock ;
23
18
@@ -57,7 +52,6 @@ impl ContractInstructionMetadata {
57
52
contract_id,
58
53
contract_bytecode : contract_bytecode. into_iter ( ) . collect ( ) ,
59
54
state_size : 1_000 ,
60
- predicate_metadata : None ,
61
55
} ;
62
56
63
57
ContractInstructionMetadata {
@@ -260,31 +254,6 @@ fn smo_metadata() -> &'static ContractInstructionMetadata {
260
254
. chain ( vec ! [ 2u8 ; 100 ] ) ,
261
255
) ;
262
256
263
- let predicate_code = op:: ret ( RegId :: ONE ) . to_bytes ( ) . to_vec ( ) ;
264
- let predicate_owner =
265
- Bech32Address :: from ( fuel_tx:: input:: Input :: predicate_owner ( & predicate_code) ) ;
266
- let predicate_utxo_id = UtxoId :: randomize ( & mut rand:: thread_rng ( ) ) ;
267
- let coin_amount = 1_000_000 ;
268
- let predicate_input = Input :: resource_predicate (
269
- CoinType :: Coin ( Coin {
270
- amount : coin_amount,
271
- asset_id : metadata. asset_id ,
272
- owner : predicate_owner. clone ( ) ,
273
- utxo_id : predicate_utxo_id,
274
- ..Default :: default ( )
275
- } ) ,
276
- predicate_code,
277
- vec ! [ ] ,
278
- ) ;
279
-
280
- metadata. contract_metadata . predicate_metadata = Some ( PredicateMetadata {
281
- predicate_utxo_id,
282
- predicate_owner,
283
- coin_amount : 1_000_000 ,
284
- } ) ;
285
-
286
- metadata. inputs . push ( predicate_input) ;
287
-
288
257
metadata
289
258
} )
290
259
}
@@ -453,19 +422,11 @@ impl AsRepr for ContractInstruction {
453
422
}
454
423
}
455
424
456
- #[ derive( Clone ) ]
457
- pub struct PredicateMetadata {
458
- pub predicate_utxo_id : UtxoId ,
459
- pub predicate_owner : Bech32Address ,
460
- pub coin_amount : u64 ,
461
- }
462
-
463
425
#[ derive( Clone ) ]
464
426
pub struct ContractMetadata {
465
427
pub contract_id : ContractId ,
466
428
pub contract_bytecode : Vec < u8 > ,
467
429
pub state_size : usize ,
468
- pub predicate_metadata : Option < PredicateMetadata > ,
469
430
}
470
431
471
432
impl ContractInstruction {
0 commit comments