File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
stackslib/src/chainstate/stacks/db Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -10307,17 +10307,28 @@ pub mod test {
10307
10307
10308
10308
let signed_call_foo_tx_clar2 = signer. get_tx ( ) . unwrap ( ) ;
10309
10309
10310
+ // Build callable argument typed to the trait <foo>
10311
+ let foo_impl_qci =
10312
+ QualifiedContractIdentifier :: parse ( & format ! ( "{}.foo-impl" , & addr) ) . unwrap ( ) ;
10313
+ let trait_id = TraitIdentifier :: new (
10314
+ StandardPrincipalData :: from ( addr. clone ( ) ) ,
10315
+ ContractName :: from ( "foo" ) ,
10316
+ ClarityName :: from ( "foo" ) ,
10317
+ ) ;
10318
+ let callable_arg = Value :: some ( Value :: CallableContract ( CallableData {
10319
+ contract_identifier : foo_impl_qci,
10320
+ trait_identifier : Some ( trait_id) ,
10321
+ } ) )
10322
+ . unwrap ( ) ;
10323
+
10310
10324
let mut tx_test_call_foo = StacksTransaction :: new (
10311
10325
TransactionVersion :: Testnet ,
10312
10326
auth,
10313
10327
TransactionPayload :: new_contract_call (
10314
10328
addr. clone ( ) ,
10315
10329
"call-foo" ,
10316
10330
"call-do-it" ,
10317
- vec ! [ Value :: some( Value :: Principal ( PrincipalData :: Contract (
10318
- QualifiedContractIdentifier :: parse( & format!( "{}.foo-impl" , & addr) ) . unwrap( ) ,
10319
- ) ) )
10320
- . unwrap( ) ] ,
10331
+ vec ! [ callable_arg] ,
10321
10332
)
10322
10333
. unwrap ( ) ,
10323
10334
) ;
You can’t perform that action at this time.
0 commit comments