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 {
1030710307
1030810308 let signed_call_foo_tx_clar2 = signer. get_tx ( ) . unwrap ( ) ;
1030910309
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+
1031010324 let mut tx_test_call_foo = StacksTransaction :: new (
1031110325 TransactionVersion :: Testnet ,
1031210326 auth,
1031310327 TransactionPayload :: new_contract_call (
1031410328 addr. clone ( ) ,
1031510329 "call-foo" ,
1031610330 "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] ,
1032110332 )
1032210333 . unwrap ( ) ,
1032310334 ) ;
You can’t perform that action at this time.
0 commit comments