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