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 {
1031010310
1031110311 let signed_call_foo_tx_clar2 = signer. get_tx ( ) . unwrap ( ) ;
1031210312
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+
1031310326 let mut tx_test_call_foo = StacksTransaction :: new (
1031410327 TransactionVersion :: Testnet ,
1031510328 auth,
1031610329 TransactionPayload :: new_contract_call (
1031710330 addr. clone ( ) ,
1031810331 "call-foo" ,
1031910332 "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] ,
1032410334 )
1032510335 . unwrap ( ) ,
1032610336 ) ;
You can’t perform that action at this time.
0 commit comments