@@ -89,6 +89,10 @@ func (ct *EVMChainType) ResolveClients(v *viper.Viper) (chain.ResolvedChains, er
8989 }
9090
9191 for _ , ec := range expChains {
92+ // Empty chain-type falls back to this chain type
93+ if ec .ChainType != "" && ! strings .EqualFold (ec .ChainType , ct .Name ()) {
94+ continue
95+ }
9296 if ec .ChainSelector == 0 {
9397 return chain.ResolvedChains {}, fmt .Errorf ("experimental chain missing chain-selector" )
9498 }
@@ -156,13 +160,9 @@ func (ct *EVMChainType) RegisterCapabilities(ctx context.Context, cfg chain.Capa
156160 // cfg.Limits is the generic chain.Limits contract. The EVM chain type
157161 // needs the wider EVMChainLimits contract (adds ChainWriteGasLimit). A
158162 // nil cfg.Limits disables enforcement entirely.
159- var evmLimits EVMChainLimits
163+ var evmLimits chain. Limits
160164 if cfg .Limits != nil {
161- el , ok := cfg .Limits .(EVMChainLimits )
162- if ! ok {
163- return nil , fmt .Errorf ("EVM chain type: limits value does not implement evm.EVMChainLimits (got %T)" , cfg .Limits )
164- }
165- evmLimits = el
165+ evmLimits = ExtractLimits (cfg .Limits )
166166 }
167167
168168 evmCaps , err := NewEVMChainCapabilities (
@@ -247,12 +247,13 @@ func (ct *EVMChainType) RunHealthCheck(resolved chain.ResolvedChains) error {
247247// is true, an invalid or default-sentinel key is a hard error. Otherwise a
248248// sentinel key is used with a warning so non-broadcast simulations can run.
249249func (ct * EVMChainType ) ResolveKey (creSettings * settings.Settings , broadcast bool ) (interface {}, error ) {
250- pk , err := crypto .HexToECDSA (creSettings .User .EthPrivateKey . Hex ( ))
250+ pk , err := crypto .HexToECDSA (creSettings .User .PrivateKey ( settings . EVM ))
251251 if err != nil {
252252 // If the user explicitly set a key that looks like a hex string but is
253253 // malformed (wrong length, invalid chars), always error with guidance.
254254 // Skip placeholder values like DefaultEthPrivateKeyEnvPlaceholder from the default .env template.
255- if creSettings .User .EthPrivateKey .IsSet () && isHexString (creSettings .User .EthPrivateKey .Hex ()) {
255+ evmKey := creSettings .User .PrivateKey (settings .EVM )
256+ if evmKey != "" && isHexString (evmKey ) {
256257 return nil , fmt .Errorf (
257258 "invalid private key: expected 64 hex characters (256 bits), got %d characters.\n \n " +
258259 "The CLI reads CRE_ETH_PRIVATE_KEY from your .env file or system environment.\n " +
@@ -261,7 +262,7 @@ func (ct *EVMChainType) ResolveKey(creSettings *settings.Settings, broadcast boo
261262 " • Pasted an Ethereum address (40 chars) instead of a private key (64 chars)\n " +
262263 " • Value has extra quotes — use CRE_ETH_PRIVATE_KEY=abc123... without wrapping quotes\n " +
263264 " • Key was truncated during copy-paste" ,
264- len (creSettings .User .EthPrivateKey . Hex ( )))
265+ len (creSettings .User .PrivateKey ( settings . EVM )))
265266 }
266267 if broadcast {
267268 return nil , fmt .Errorf (
0 commit comments