Monad 백서

Monad

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 47쪽

to an existing project. [Hardhat 3](https://hardhat.org/docs) is a development environment for compiling, testing, deploying, and verifying smart contracts. You can start with the Monad template or add Monad to an existing Hardhat 3 project. <Note> Hardhat 3 requires Node.js v22.13.0 or later. </Note> Choose one setup path: * **New project:** Clone the Monad template and work inside the cloned repository. * **Existing project:** Do not clone the template into your project. Merge only the configuration shown below into your existing `hardhat.config.ts`. ## Start with the Monad template [The Monad Hardhat 3 template](https://github.com/monad-developers/hardhat3-monad) includes: * Monad Testnet and Mainnet network configuration * Foundry-compatible Solidity tests and TypeScript tests using `node:test` * [Viem](https://viem.sh/) for TypeScript interactions * [Hardhat Ignition](https://hardhat.org/ignition/docs/getting-started) deployment modules * Sourcify and MonadScan contract verification Clone and test the template: ```sh theme={null} git clone https://github.com/monad-developers/hardhat3-monad.git cd hardhat3-monad npm install npx hardhat test ``` See the template's [README](https://github.com/monad-developers/hardhat3-monad#readme) for local, Testnet, and Mainnet deployment commands. ## Configure an existing Hardhat 3 project Merge the following compiler and network settings into your `hardhat.config.ts`. Keep any plugins and other project-specific settings already in the file. ```ts theme={null} import { configVariable, defineConfig } from "hardhat/config"; export default defineConfig({ solidity: { version: "0.8.31", settings: { evmVersion: "osaka", }, }, networks: { monadTestnet: { type: "http", url: "https://testnet-rpc.monad.xyz", accounts: [configVariable("PRIVATE_KEY")], chainId: 10143, }, monadMainnet: { type: "http", url: "https://rpc.monad.xyz", accounts: [configVariable("PRIVATE_KEY")], chainId: 143, }, }, }); ``` <Warning> Never put a private key directly in `hardhat.config.ts` or commit it to version control. Provide `PRIVATE_KEY` through Hardhat's [configuration variable system](https://hardhat.org/docs/guides/configuration-variables), using the `PRIVATE_KEY` environment variable or the Hardhat keystore. </Warning> The `osaka` EVM target is required when compiling contracts for Monad, and Solidity 0.8.31 requires Hardhat 3.1.0 or later. For the canonical RPC URLs, chain IDs, and explorer URLs, see [Network Information](/developer-essentials/network-information) and [Network Information - Testnet](/developer-essentials/testnet). Confirm the updated project still compiles and passes its tests: ```sh theme={null} npx hardhat compile npx hardhat test ``` ## Deploy and verify * [Deploy a Contract with Hardhat](/guides/deploy-smart-contract/hardhat) * [Verify a Contract with Hardhat](/guides/verify-smart-contract/hardhat) # Toolkits Source: https://docs.monad.xyz/tooling-and-infra/toolkits/index Development toolkits for building on Monad. ## Summary | Toolkit | Description | | - | - | | [Foundry](/tooling-and-infra/toolkits/foundry) | Foundry v1.8+ with first-class Monad execution, hardfork selection, precompile support, and trace decoding. **Recommended for Solidity development.** | | [Hardhat](/tooling-and-infra/toolkits/hardhat) | JavaScript-based Solidity development framework with Monad compatibility. | | [Monad Solonet](/tooling-and-infra/toolkits/monad-solonet) | Run a local Monad network for development and testing. | # Monad Solonet Source: https://docs.monad.xyz/tooling-and-infra/toolkits/monad-solonet [Monad Solonet](https://github.com/monad-crypto/monad-solonet) is an official tool for running a local Monad network. Unlike `anvil --network monad`, which simulates Monad EVM behavior, Solonet runs actual Monad nodes — giving you a local environment that more closely matches testnet and mainnet. Use Solonet when you need full node behavior locally: consensus, staking, or accurate block production timing. ## Installation & usage See the [Monad Solonet README](https://github.com/monad-crypto/monad-solonet#readme) for setup instructions and configuration options. # Account Abstraction Providers Source: https://docs.monad.xyz/tooling-and-infra/wallet-infra/account-abstraction Account Abstraction Providers provide bundler and paymaster services, enabling features like sponsored transactions or payment via custom tokens. ## Definitions | Service | Description | | - | - | | Bundler | Operates a custom mempool for UserOperations; simulates and assembles bundles of UserOperations | | Paymaster | Enables sponsored transactions; enables users to pay for gas with a custom token | ## Provider Summary <Tabs> <Tab title="Mainnet"> <div> <table> <thead> <tr> <th>Provider</th> <th>Status</th> <th>Docs</th> <th>Supported services</th> <th>How to get started</th> </tr> </thead> <tbody> <tr> <td>[Alchemy](https://www.alchemy.com/smart-wallets)</td> <td>✅</td> <td>[Docs](https://accountkit.alchemy.com/)</td> <td>[Gas Manager](https://docs.alchemy.com/docs/gas-manager-services) (aka Paymaster)<br /> [Bundler](https://www.alchemy.com/docs/wallets/transactions/low-level-infra/bundler/overview)</td> <td>[Dashboard](https://dashboard.alchemy.com/accounts?a=smart-wallets\&utm_source=chain_partner\&utm_medium=referral\&utm_campaign=monad)</td> </tr> <tr> <td>[Biconomy](https://biconomy.io)</td> <td>✅</td> <td>[Docs](https://docs.biconomy.io)</td> <td>[Orchestration Infrastructure](https://docs.biconomy.io/new/learn-about-biconomy/what-is-mee)</td> <td>[Getting started](https://docs.biconomy.io/supertransaction-api/getting-started)</td> </tr> <tr> <td>[FastLane](https://www.fastlane.xyz/)</td> <td>❓</td> <td>[Docs](https://docs.shmonad.xyz/)</td> <td>[Paymaster and Bundler](https://github.com/FastLane-Labs/4337-bundler-paymaster-script/tree/main)</td> <td>[Dashboard](https://shmonad.xyz/)</td> </tr> <tr> <td>[Pimlico](https://pimlico.io/)</td> <td>✅</td> <td>[Docs](https://docs.pimlico.io/)</td> <td>[Paymaster](https://docs.pimlico.io/infra/paymaster)<br /> [Bundler](https://docs.pimlico.io/infra/bundler)</td> <td>[Tutorial](https://docs.pimlico.io/permissionless/tutorial/tutorial-1)</td> </tr> <tr> <td>[Sequence](https://sequence.xyz/)</td> <td>✅</td> <td>[Docs](https://docs.sequence.xyz/solutions/infrastructure/transaction-api)</td> <td>Relayer: gasless, batched, parallelized transactions</td> <td>[Quickstart](https://docs.sequence.xyz/solutions/builder/gas-sponsorship)</td> </tr> <tr> <td>[thirdweb](https://thirdweb.com/)</td> <td>✅</td> <td>[Docs](https://portal.thirdweb.com/)</td> <td>[Paymaster and Bundler](https://portal.thirdweb.com/connect/account-abstraction/infrastructure)</td> <td>[Quickstart](https://portal.thirdweb.com/typescript/v5/account-abstraction/get-started)</td> </tr> <tr> <td>[ZeroDev](https://zerodev.app/)</td> <td>✅</td> <td>[Docs](https://docs.zerodev.app/)</td> <td>[Meta AA infrastructure](https://docs.zerodev.app/meta-infra/intro) for bundlers and paymasters</td> <td>[Dashboard](https://dashboard.zerodev.app/)</td> </tr> </tbody> </table> </div> *✅ = supported, ⌛️ = in progress, ❓ = unknown, ❌ = won't support* </Tab> <Tab title="Testnet"> <div> <table> <thead> <tr> <th>Provider</th> <th>Status</th> <th>Docs</th> <th>Supported services</th> <th>How to get started</th> </tr> </thead> <tbody> <tr> <td>[Alchemy](https://www.alchemy.com/smart-wallets)</td> <td>✅</td> <td>[Docs](https://accountkit.alchemy.com/)</td> <td>[Gas Manager](https://docs.alchemy.com/docs/gas-manager-services) (aka Paymaster)<br /> [Bundler](https://www.alchemy.com/docs/wallets/transactions/low-level-infra/bundler/overview)</td> <td>[Dashboard](https://dashboard.alchemy.com/accounts?a=smart-wallets\&utm_source=chain_partner\&utm_medium=referral\&utm_campaign=monad)</td> </tr> <tr> <td>[Biconomy](https://biconomy.io)</td> <td>✅</td> <td>[Docs](https://docs.biconomy.io)</td> <td>[Orchestration Infrastructure](https://docs.biconomy.io/new/learn-about-biconomy/what-is-mee)</td> <td>[Getting started](https://docs.biconomy.io/supertransaction-api/getting-started)</td> </tr> <tr> <td>[FastLane](https://www.fastlane.xyz/)</td> <td>✅</td> <td>[Docs](https://docs.shmonad.xyz/)</td> <td>[Paymaster and Bundler](https://github.com/FastLane-Labs/4337-bundler-paymaster-script/tree/main)</td> <td>[Dashboard](https://shmonad.xyz/)</td> </tr> <tr> <td>[Gelato](https://gelato.cloud/paymaster-bundler)</td> <td>✅</td> <td>[SDK docs](https://github.com/gelatodigital/gasless)</td> <td>[Paymaster and Bundler](https://gelato.cloud/paymaster-bundler)</td> <td>[Quickstart](https://github.com/gelatodigital/gasless#bundler-erc-4337)</td> </tr> <tr> <td>[Openfort](https://openfort.io/)</td> <td>✅</td> <td>[Docs](https://www.openfort.io/docs)</td> <td>[Paymaster and Bundler](https://www.openfort.io/docs/overview)</td> <td>[Quickstart](https://www.openfort.io/docs/overview/start)</td> </tr> <tr> <td>[Pimlico](https://pimlico.io/)</td> <td>✅</td> <td>[Docs](https://docs.pimlico.io/)</td> <td>[Paymaster](https://docs.pimlico.io/infra/paymaster)<br /> [Bundler](https://docs.pimlico.io/infra/bundler)</td> <td>[Tutorial](https://docs.pimlico.io/permissionless/tutorial/tutorial-1)</td> </tr> <tr> <td>[Sequence](https://sequence.xyz/)</td> <td>✅</td> <td>[Docs](https://docs.sequence.xyz/solutions/infrastructure/transaction-api)</td> <td>Relayer: gasless, batched, parallelized transactions</td> <td>[Quickstart](https://docs.sequence.xyz/solutions/builder/gas-sponsorship)</td> </tr> <tr> <td>[thirdweb](https://thirdweb.com/)</td> <td>✅</td> <td>[Docs](https://portal.thirdweb.com/)</td> <td>[Paymaster and Bundler](https://portal.thirdweb.com/connect/account-abstraction/infrastructure)</td> <td>[Quickstart](https://portal.thirdweb.com/typescript/v5/account-abstraction/get-started)</td> </tr> <tr> <td>[ZeroDev](https://zerodev.app/)</td> <td>✅</td> <td>[Docs](https://docs.zerodev.app/)</td> <td>[Meta AA infrastructure](https://docs.zerodev.app/meta-infra/intro) for bundlers and paymasters</td> <td>[Dashboard](https://dashboard.zerodev.app/)</td> </tr> </tbody> </table> </div> *✅ = supported, ⌛️ = in progress, ❓ = unknown, ❌ = won't support* </Tab> </Tabs> ## Provider Details ### Alchemy Alchemy powers the [#1 most used](https://www.bundlebear.com/erc4337-overview/all) smart accounts today with account abstraction that eliminates gas fees and signing for users. Their accounts support ERC-4337, EIP-7702, and ERC-6900, a modular account standard co-authored with the Ethereum Foundation, Circle, and Trust Wallet. To get started, sign up for an [Alchemy account](https://dashboard.alchemy.com/accounts?utm_source=chain_partner\&utm_medium=referral\&utm_campaign=monad), visit the [documentation](https://accountkit.alchemy.com/), follow the [quickstart](https://accountkit.alchemy.com/react/quickstart) guide. To learn more, check out their [smart wallets](https://www.alchemy.com/smart-wallets) and demo [here](https://demo.alchemy.com/). ### Biconomy [Biconomy](https://biconomy.io) is the most comprehensive smart account and execution infrastructure platform that enables seamless, user-friendly experiences across single or multiple chains. With Biconomy, developers can build superior onchain UX through gas abstraction, sessions, batching, and one-click signatures for complex actions on any number of networks. To get started, visit the [documentation](https://docs.biconomy.io/). ### FastLane [FastLane](https://www.fastlane.xyz/) is an MEV protocol for validators + apps with an integrated 4337 bundler, an on-chain task scheduler, and the first holistic LST. To get started, vist the [shMonad](https://docs.shmonad.xyz/) Documentation or try the shMonad bundler using the following example [project](https://github.com/FastLane-Labs/4337-bundler-paymaster-script/tree/main). ### Gelato [Gelato](https://gelato.cloud/paymaster-bundler) provides Paymaster and Bundler services that enable sponsored transactions and Account Abstraction, allowing you to cover gas costs on behalf of users and enable seamless onchain experiences. To get started, visit the [SDK documentation](https://github.com/gelatodigital/gasless) or follow the [quickstart](https://github.com/gelatodigital/gasless#bundler-erc-4337) guide. ### Openfort [Openfort](https://openfort.io) is a developer platform that helps projects onboard and and activates wallets. It does so by creating wallets with it’s SSS and passkeys,sending transactions via sponsored paymasters and session keys or directly using backend wallets for automated onchain actions. To get started, visit the [documentation](https://www.openfort.io/docs/overview/start) or follow the [quickstart](https://www.openfort.io/docs/guides/react) guide. ### Pimlico [Pimlico](https://pimlico.io/) is the world's most advanced ERC-4337 account abstraction infrastructure platform. Pimlico provides a suite of tools and services to help you build, deploy, and manage smart accounts on Ethereum and other EVM-compatible chains. To get started, visit the [documentation](https://docs.pimlico.io/) or follow the [quickstart](https://docs.pimlico.io/permissionless/tutorial/tutorial-1) guide. ### Sequence The [Sequence](https://sequence.xyz) [Transaction API](https://docs.sequence.xyz/solutions/infrastructure/transaction-api) is a unified relayer that dispatches transactions on EVM chains with: * Gas sponsorship * Fee abstraction * Batching * Parallel processing It manages nonces, estimates optimal gas, and resubmits transactions when needed, so you can focus on your business logic. [Sequence Builder](https://sequence.build/) offers a Gas Sponsorship feature that allows project owners to easily sponsor gas for their users in web3 apps. By covering transaction fees, users can enjoy a seamless experience without worrying about obtaining crypto for fees which is seamlessly integrated with our suite of smart contract wallets. To get started, visit the gas sponsorship [docs](https://docs.sequence.xyz/solutions/builder/gas-sponsorship). ### thirdweb [thirdweb](https://portal.thirdweb.com/connect/account-abstraction/overview) offers a complete platform to leverage account abstraction. Remove the clunky user experience of requiring gas & signatures for every onchain action: * Abstract away gas * Pre-audited account factory contracts * Built-in infra: * Sponsorship policies To get started: 1. Sign up for a [free thirdweb account](https://thirdweb.com/team) 2. Visit [Account Abstraction Documentation](https://portal.thirdweb.com/connect/account-abstraction/how-it-works) and [Account Abstraction Playground](https://playground.thirdweb.com/account-abstraction) ### Zerodev [ZeroDev](https://zerodev.app) is the most powerful smart account development platform. With ZeroDev, you can build Web3 experiences without gas, confirmations, seed phrases, and bridging. To get started, visit the [documentation](https://docs.zerodev.app/) or follow the [quickstart](https://docs.zerodev.app/sdk/getting-started/quickstart) guide. # Embedded Wallets Source: https://docs.monad.xyz/tooling-and-infra/wallet-infra/embedded-wallets ## Background Some developers want to "embed" a wallet into their application. Here are a few possible reasons they might want to do this: * to allow users to sign in with email or another social sign-in method * to allow users to take actions within the app without signing a new transaction each time. Generally speaking, embedded wallet services provide this by utilizing advanced cryptographic techniques to shard keys. Some keys are stored user-side while others are stored on the application developer's server or the embedded wallet provider's server. This page attempts a toplogy of authentication and key management features over the set of providers supporting Monad. ### Authentication Features | Features | Description | | - | - | | Passkey sign-in | Authentication with [WebAuthn](https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API) (passkey) | | Social sign-in | Authentication with social accounts (google, X, etc) | | Email sign-in | Authentication with OTP via email | | SMS sign-in | Authentication with OTP via SMS | ### Key Management Features | Features | Description | | - | - | | MPC | Multi-party computation | | SSS | Shamir's Secret Sharing | | TEE | Storage of private keys in a cloud-based Trusted Execution Environment, like AWS Nitro Enclaves | | TSS | Threshold Signature Scheme | | Embedded wallet | A wallet interface local to a website or mobile app, utilizing browser session keys for signing | | Server-delegated actions | Allow app to request permission to sign on the user's behalf | | Session keys | Scoped keys that grant access only for specific apps, useful for bots/AI agents | ## Provider Summary <Tabs> <Tab title="Mainnet"> <div> <table> <thead> <tr> <th>Provider</th> <th>Docs</th> <th>Supported services</th> <th>Security Method</th> <th>How to get started</th> </tr> </thead> <tbody> <tr> <td>[Alchemy](https://www.alchemy.com/smart-wallets)</td> <td>[Docs](https://accountkit.alchemy.com/)</td> <td>[Embedded wallets](https://accountkit.alchemy.com/react/quickstart)<br /> Auth: [passkey](https://accountkit.alchemy.com/signer/authentication/passkey-signup), [social](https://accountkit.alchemy.com/signer/authentication/social-login), [email](https://accountkit.alchemy.com/signer/authentication/email-otp) sign-in</td> <td /> <td>[Quickstart](https://accountkit.alchemy.com/react/quickstart)</td> </tr> <tr> <td>[Coinbase Developer Platform (CDP)](https://www.coinbase.com/developer-platform/products/embeddedwallets)</td> <td>[Docs](https://docs.cdp.coinbase.com/embedded-wallets/welcome)</td> <td>[Embedded wallets](https://docs.cdp.coinbase.com/embedded-wallets/welcome)<br /> Auth: [email/social/SMS](https://docs.cdp.coinbase.com/embedded-wallets/authentication-methods)</td> <td>Device-based secure enclaves</td> <td>[Quickstart](https://docs.cdp.coinbase.com/embedded-wallets/quickstart)</td> </tr> <tr> <td>[Crossmint](https://www.crossmint.com/)</td> <td>[Docs](https://docs.crossmint.com/)</td> <td>[Embedded wallets](https://docs.crossmint.com/wallets/overview) (smart contract wallets with modular signers)<br /> Auth: [device](https://docs.crossmint.com/wallets/concepts/signers#device-signer), [passkey](https://docs.crossmint.com/wallets/concepts/signers#passkey-signer), [server](https://docs.crossmint.com/wallets/concepts/signers#server-signer), [email](https://docs.crossmint.com/wallets/concepts/signers#email-otp-signer), [SMS](https://docs.crossmint.com/wallets/concepts/signers#sms--phone-otp-signer) sign-in</td> <td>Smart wallets; device secure enclave</td> <td>[Quickstart](https://docs.crossmint.com/wallets/quickstarts/react)</td> </tr> <tr> <td>[Cubist](https://cubist.dev/)</td> <td /> <td>[Embedded wallets](https://cubist.dev/products/cubesigner-end-user-custody) (CubeSigner); non-custodial signing & key management<br /> Auth: social (Google, Apple, X, Telegram) sign-in; MFA: passkeys, YubiKeys, authenticator apps</td> <td>HSM + TEE (Nitro Enclaves)</td> <td>[Quickstart](https://github.com/cubist-labs/CubeSigner-TypeScript-SDK)</td> </tr> <tr> <td>[Dynamic](https://dynamic.xyz/)</td> <td>[Docs](https://docs.dynamic.xyz/)</td> <td>[Embedded wallets](https://www.dynamic.xyz/docs/overview/wallets/embedded-wallets)<br /> Auth: [passkey](https://www.dynamic.xyz/docs/react/authentication-methods/passkey#passkeys), [email/social/SMS](https://www.dynamic.xyz/docs/react/authentication-methods/email) sign-in</td> <td>TEE; TSS-MPC (just added)</td> <td>[Get started](https://www.dynamic.xyz/get-started)</td> </tr> <tr> <td>[Fordefi](https://fo
프로젝트로 돌아가기