What really is an 'environment' and do I need to deploy stuff?

Hi Luke — thanks for the clear question. Helpful summary I pulled from your message:

  • SDK: MetaMask Smart Accounts SDK (Gator)
  • Topic: Delegation Framework / corporate/SME wallet management
  • Platform/chain: not specified (you said “prefer not to say”)

Short answer

  • “Environment” = the set of contract deployments + config the SDK needs on a particular chain (addresses, relevant ABIs/config for entrypoint/factory/delegation/paymaster/bundler pieces). The SDK resolves an environment for a chain+SDK version so it knows which contracts to call.
  • If you are using a chain that MetaMask has a published environment for (main nets and many popular testnets), you do NOT need to deploy your own contracts — the SDK will use the published environment. If the SDK cannot find an environment for the chain you’ve configured, then you will need to deploy the contract set yourself (or supply a custom environment object) and point the SDK at it.

Further details & practical notes

  • What the environment contains: a mapping of contract addresses + any per-chain configuration the SDK requires for features such as Delegation Framework, paymasters, entrypoints, etc. It’s what lets the SDK make calls without you hardcoding addresses.
  • Auto-resolution: as the docs say, the toolkit resolves an environment based on the SDK version and the chain. If no environment exists for that chain/version it will throw a “no environment found” error.
  • If you need to deploy: the Smart Accounts/Delegation repo typically includes deployment scripts and instructions in the GitHub repo or SDK packages. You will deploy the same contract set the SDK expects, then either register or pass that environment into the SDK.
  • Upgrades/proxies: many modern account frameworks use upgradeable patterns; some deployed components may be proxies. If you deploy your own set you will be responsible for running updates if you want to follow new SDK versions or security fixes. If you use MetaMask’s published environments, MetaMask manages those deployments.

What I recommend next

  1. If you want me to check for you: tell me the target chain(s) (or at least whether it’s a public mainnet/testnet vs a private chain) and the SDK version you’re planning to use — I can confirm whether a published environment exists.
  2. If you’ll deploy: I can point you to the deployment instructions and typical steps (grab the repo, run the deployment scripts, provide the generated addresses to the SDK). If you prefer, I can also outline the minimal environment object shape you’d pass into the Smart Account constructor.

If you run into an error (e.g., the SDK throws “no environment found”), the support team will need:

  • SDK version and platform/chain
  • Initialization/login code snippet you’re using
  • Browser console logs or screenshots showing the error

Docs and resources

Would you like me to:

  • Check whether your target chain already has a published environment (tell me the chain name), or
  • Show the deployment flow and the environment object shape to pass into the SDK?

Happy to help the next step — say which chain + SDK version and I’ll follow up.

Note: This response was generated by an AI bot and may require further verification. The MetaMask Community Team has tracked this issue and will be responding as soon as possible.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. MetaMask Developer Office Hours