@@ -1379,11 +1379,12 @@ func Test_ScheduledCallback(t *testing.T) {
13791379
13801380 eventType := cadence .NewEventType (
13811381 location ,
1382- "CallbackProcessed " ,
1382+ "PendingExecution " ,
13831383 []cadence.Field {
13841384 {Identifier : "id" , Type : cadence .UInt64Type },
13851385 {Identifier : "priority" , Type : cadence .UInt8Type },
13861386 {Identifier : "executionEffort" , Type : cadence .UInt64Type },
1387+ {Identifier : "fees" , Type : cadence .UFix64Type },
13871388 {Identifier : "callbackOwner" , Type : cadence .AddressType },
13881389 },
13891390 nil ,
@@ -1392,11 +1393,15 @@ func Test_ScheduledCallback(t *testing.T) {
13921393 callbackID1 := uint64 (1 )
13931394 callbackID2 := uint64 (2 )
13941395
1396+ fees , err := cadence .NewUFix64 ("0.0" )
1397+ require .NoError (t , err )
1398+
13951399 callbackEvent1 := cadence .NewEvent (
13961400 []cadence.Value {
13971401 cadence .NewUInt64 (callbackID1 ),
13981402 cadence .NewUInt8 (1 ),
13991403 cadence .NewUInt64 (1000 ), // execution effort
1404+ fees ,
14001405 cadence .NewAddress (env .FlowServiceAccount .Address ),
14011406 },
14021407 ).WithType (eventType )
@@ -1406,6 +1411,7 @@ func Test_ScheduledCallback(t *testing.T) {
14061411 cadence .NewUInt64 (callbackID2 ),
14071412 cadence .NewUInt8 (1 ),
14081413 cadence .NewUInt64 (2000 ), // execution effort
1414+ fees ,
14091415 cadence .NewAddress (env .FlowServiceAccount .Address ),
14101416 },
14111417 ).WithType (eventType )
@@ -1659,7 +1665,7 @@ func (c *callbackTestExecutor) Execute() error {
16591665 txProc , ok := c .proc .(* fvm.TransactionProcedure )
16601666 if ok {
16611667 script := string (txProc .Transaction .Script )
1662- if strings .Contains (script , "FlowCallbackScheduler .process" ) {
1668+ if strings .Contains (script , "scheduler .process" ) {
16631669 return c .vm .err
16641670 }
16651671 }
@@ -1676,7 +1682,7 @@ func (c *callbackTestExecutor) Output() fvm.ProcedureOutput {
16761682 txProc , ok := c .proc .(* fvm.TransactionProcedure )
16771683 if ok {
16781684 script := string (txProc .Transaction .Script )
1679- if strings .Contains (script , "FlowCallbackScheduler .process" ) {
1685+ if strings .Contains (script , "scheduler .process" ) {
16801686 return fvm.ProcedureOutput {
16811687 Err : c .vm .err ,
16821688 }
@@ -1699,8 +1705,8 @@ func (c *callbackTestExecutor) Output() fvm.ProcedureOutput {
16991705 // scheduled callbacks process transaction
17001706 case strings .Contains (string (txBody .Script ), "scheduler.process" ):
17011707 c .vm .executedTransactions [txID ] = "process_callback"
1702- env := systemcontracts .SystemContractsForChain (flow . Mainnet .Chain () .ChainID ()).AsTemplateEnv ()
1703- eventTypeString := fmt .Sprintf ("A.%v.CallbackScheduler.CallbackProcessed " , env .FlowCallbackSchedulerAddress )
1708+ env := systemcontracts .SystemContractsForChain (c . ctx .Chain .ChainID ()).AsTemplateEnv ()
1709+ eventTypeString := fmt .Sprintf ("A.%v.FlowCallbackScheduler.PendingExecution " , env .FlowCallbackSchedulerAddress )
17041710
17051711 // return events for each scheduled callback
17061712 events := make ([]flow.Event , len (c .vm .eventPayloads ))
0 commit comments