@@ -235,6 +235,35 @@ func TestTransactionEventsController_ExtractEvents(t *testing.T) {
235235 require .Equal (t , "100" , events [0 ].value )
236236 })
237237
238+ t .Run ("transferValueOnly, after Sirius, effective (intra-shard TransferAndExecute)" , func (t * testing.T ) {
239+ topic0 := big .NewInt (100 ).Bytes ()
240+ topic1 := testscommon .TestContractBarShard0 .PubKey
241+
242+ tx := & transaction.ApiTransactionResult {
243+ Epoch : 43 ,
244+ Logs : & transaction.ApiLogs {
245+ Events : []* transaction.Events {
246+ {
247+ Identifier : "transferValueOnly" ,
248+ Address : testscommon .TestContractFooShard0 .Address ,
249+ Topics : [][]byte {
250+ topic0 ,
251+ topic1 ,
252+ },
253+ Data : []byte ("TransferAndExecute" ),
254+ },
255+ },
256+ },
257+ }
258+
259+ events , err := controller .extractEventTransferValueOnly (tx )
260+ require .NoError (t , err )
261+ require .Len (t , events , 1 )
262+ require .Equal (t , testscommon .TestContractFooShard0 .Address , events [0 ].sender )
263+ require .Equal (t , testscommon .TestContractBarShard0 .Address , events [0 ].receiver )
264+ require .Equal (t , "100" , events [0 ].value )
265+ })
266+
238267 t .Run ("transferValueOnly, after Sirius, ineffective (cross-shard AsyncCall)" , func (t * testing.T ) {
239268 topic0 := big .NewInt (100 ).Bytes ()
240269 topic1 := testscommon .TestContractBarShard1 .PubKey
0 commit comments