@@ -94,6 +94,10 @@ func (ct *EVMChainType) ResolveClients(v *viper.Viper) (chain.ResolvedChains, er
9494 }
9595
9696 for _ , ec := range expChains {
97+ // Empty chain-type falls back to this chain type
98+ if ec .ChainType != "" && ! strings .EqualFold (ec .ChainType , ct .Name ()) {
99+ continue
100+ }
97101 if ec .ChainSelector == 0 {
98102 return chain.ResolvedChains {}, fmt .Errorf ("experimental chain missing chain-selector" )
99103 }
@@ -161,13 +165,9 @@ func (ct *EVMChainType) RegisterCapabilities(ctx context.Context, cfg chain.Capa
161165 // cfg.Limits is the generic chain.Limits contract. The EVM chain type
162166 // needs the wider EVMChainLimits contract (adds ChainWriteGasLimit). A
163167 // nil cfg.Limits disables enforcement entirely.
164- var evmLimits EVMChainLimits
168+ var evmLimits chain. Limits
165169 if cfg .Limits != nil {
166- el , ok := cfg .Limits .(EVMChainLimits )
167- if ! ok {
168- return nil , fmt .Errorf ("EVM chain type: limits value does not implement evm.EVMChainLimits (got %T)" , cfg .Limits )
169- }
170- evmLimits = el
170+ evmLimits = ExtractLimits (cfg .Limits )
171171 }
172172
173173 evmCaps , err := NewEVMChainCapabilities (
@@ -254,12 +254,13 @@ func (ct *EVMChainType) RunHealthCheck(resolved chain.ResolvedChains) error {
254254// is true, an invalid or default-sentinel key is a hard error. Otherwise a
255255// sentinel key is used with a warning so non-broadcast simulations can run.
256256func (ct * EVMChainType ) ResolveKey (creSettings * settings.Settings , broadcast bool ) (interface {}, error ) {
257- pk , err := crypto .HexToECDSA (creSettings .User .EthPrivateKey . Hex ( ))
257+ pk , err := crypto .HexToECDSA (creSettings .User .PrivateKey ( settings . EVM ))
258258 if err != nil {
259259 // If the user explicitly set a key that looks like a hex string but is
260260 // malformed (wrong length, invalid chars), always error with guidance.
261261 // Skip placeholder values like DefaultEthPrivateKeyEnvPlaceholder from the default .env template.
262- if creSettings .User .EthPrivateKey .IsSet () && isHexString (creSettings .User .EthPrivateKey .Hex ()) {
262+ evmKey := creSettings .User .PrivateKey (settings .EVM )
263+ if evmKey != "" && isHexString (evmKey ) {
263264 return nil , fmt .Errorf (
264265 "invalid private key: expected 64 hex characters (256 bits), got %d characters.\n \n " +
265266 "The CLI reads CRE_ETH_PRIVATE_KEY from your .env file or system environment.\n " +
@@ -268,7 +269,7 @@ func (ct *EVMChainType) ResolveKey(creSettings *settings.Settings, broadcast boo
268269 " • Pasted an Ethereum address (40 chars) instead of a private key (64 chars)\n " +
269270 " • Value has extra quotes — use CRE_ETH_PRIVATE_KEY=abc123... without wrapping quotes\n " +
270271 " • Key was truncated during copy-paste" ,
271- len (creSettings .User .EthPrivateKey . Hex ( )))
272+ len (creSettings .User .PrivateKey ( settings . EVM )))
272273 }
273274 if broadcast {
274275 return nil , fmt .Errorf (
0 commit comments