zerodevapp / sdk

MIT License
34 stars 32 forks source link

Do not fetch chain ID until it's actually needed #165

Closed jp-dakota closed 2 months ago

jp-dakota commented 2 months ago

The chainId is not really needed unless we want to call signMessage.

In a multi chain weighted validator scenario, signedMessage is only called by the last signer.

Without this change, for each chain we want to sign for, we have to make an unnecessary call to the bundler to get a chain ID we will never use.