Backport fix for access scripts to experimental-cadence-v1.8.7#8296
Backport fix for access scripts to experimental-cadence-v1.8.7#8296peterargue wants to merge 3 commits intomasterfrom
Conversation
…ns when the system contracts imports evm
📝 WalkthroughWalkthroughWhen EVM is enabled, InternalEVM is initialized in both ScriptRuntimeEnv and TxRuntimeEnv. The executeScript flow now calls SetupEnvironment for ScriptRuntimeEnv and again for TxRuntimeEnv, propagating any error from either setup to ensure InternalEVM is available for system-contract invocations. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller as executeScript
participant ScriptEnv as ScriptRuntimeEnv
participant TxEnv as TxRuntimeEnv
participant EVM as InternalEVM
participant SysContract as SystemContract
Caller->>ScriptEnv: SetupEnvironment(ScriptRuntimeEnv)
alt setup success
ScriptEnv->>EVM: initialize InternalEVM
Caller->>TxEnv: SetupEnvironment(TxRuntimeEnv)
alt setup success
TxEnv->>EVM: ensure InternalEVM available
Caller->>SysContract: invoke dependency checks (may call system contracts)
SysContract->>EVM: use InternalEVM for checks
Caller->>Caller: proceed to execute script
else setup error
TxEnv-->>Caller: return error (propagated)
end
else setup error
ScriptEnv-->>Caller: return error (propagated)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (37)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
janezpodhostnik
left a comment
There was a problem hiding this comment.
I'm ok with merging this for now, before we do the proper fix with #8295.
Backports ee6c8e9 to
[v0.45.0-experimental-cadence-v1.8.7](https://github.com/onflow/flow-go/releases/tag/v0.45.0-experimental-cadence-v1.8.7)for use by the emulatorSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.