@@ -87,6 +87,7 @@ type BootstrapParams struct {
87
87
storagePerFlow cadence.UFix64
88
88
restrictedAccountCreationEnabled cadence.Bool
89
89
setupEVMEnabled cadence.Bool
90
+ setupVMBridgeEnabled cadence.Bool
90
91
91
92
// versionFreezePeriod is the number of blocks in the future where the version
92
93
// changes are frozen. The Node version beacon manages the freeze period,
@@ -229,6 +230,13 @@ func WithSetupEVMEnabled(enabled cadence.Bool) BootstrapProcedureOption {
229
230
}
230
231
}
231
232
233
+ func WithSetupVMBridgeEnabled (enabled cadence.Bool ) BootstrapProcedureOption {
234
+ return func (bp * BootstrapProcedure ) * BootstrapProcedure {
235
+ bp .setupVMBridgeEnabled = enabled
236
+ return bp
237
+ }
238
+ }
239
+
232
240
func WithRestrictedContractDeployment (restricted * bool ) BootstrapProcedureOption {
233
241
return func (bp * BootstrapProcedure ) * BootstrapProcedure {
234
242
bp .restrictedContractDeployment = restricted
@@ -583,7 +591,7 @@ func (b *bootstrapExecutor) deployMetadataViews(fungibleToken, nonFungibleToken
583
591
}
584
592
585
593
func (b * bootstrapExecutor ) deployCrossVMMetadataViews (nonFungibleToken flow.Address , env * templates.Environment ) {
586
- if bool (b .setupEVMEnabled ) && b .ctx .Chain .ChainID ().Transient () {
594
+ if bool (b .setupEVMEnabled ) && bool ( b . setupVMBridgeEnabled ) && b .ctx .Chain .ChainID ().Transient () {
587
595
crossVMMVContract := contracts .CrossVMMetadataViews (* env )
588
596
589
597
txError , err := b .invokeMetaTransaction (
@@ -1009,7 +1017,7 @@ func (stubEntropyProvider) RandomSource() ([]byte, error) {
1009
1017
func (b * bootstrapExecutor ) setupVMBridge (serviceAddress flow.Address , env * templates.Environment ) {
1010
1018
// only setup VM bridge for transient networks
1011
1019
// this is because the evm storage account for testnet and mainnet do not exist yet after boostrapping
1012
- if bool (b .setupEVMEnabled ) && b .ctx .Chain .ChainID ().Transient () {
1020
+ if bool (b .setupEVMEnabled ) && bool ( b . setupVMBridgeEnabled ) && b .ctx .Chain .ChainID ().Transient () {
1013
1021
1014
1022
bridgeEnv := bridge.Environment {
1015
1023
CrossVMNFTAddress : env .ServiceAccountAddress ,
0 commit comments