This commit is contained in:
vahoo5 2023-05-24 22:39:45 +02:00
parent e4417770f3
commit 26aab79e71

View file

@ -1322,7 +1322,7 @@ func (s *BlockChainAPI) BatchCall(ctx context.Context, args TransactionArgs2, bl
return result.Return(), result.Err
}
func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[string]interface{}, error) {
func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs, overrides *StateOverride) (map[string]interface{}, error) {
if len(args.Transactions) == 0 {
return nil, errors.New("bundle missing txs")
}
@ -1339,6 +1339,10 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[st
return nil, err
}
if err := overrides.Apply(state); err != nil {
return nil, err
}
timestamp := parent.Time + 1
if args.Timestamp != nil {
timestamp = *args.Timestamp