diff --git a/.gitignore b/.gitignore index 3ced74e..36fb342 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,9 @@ yarn-debug.log* yarn-error.log* .idea +.vscode + +# AI configuration files +.omc +.sisyphus +.claude diff --git a/docs/build-for-karma/deploying-contracts/index.md b/docs/build-for-karma/deploying-contracts/index.md new file mode 100644 index 0000000..a7469ac --- /dev/null +++ b/docs/build-for-karma/deploying-contracts/index.md @@ -0,0 +1,72 @@ +--- +id: deploying-contracts-index +title: Deploy Your First Contract +description: Choose your preferred deployment tool to get a smart contract live on Status Network. Guides available for Hardhat, Foundry, Remix, and Scaffold-ETH 2. +keywords: [deploy smart contract, Status Network, Hardhat, Foundry, Remix, Scaffold-ETH 2, blockchain deployment, EVM] +slug: /build-for-karma/deploying-contracts +sidebar_position: 1 +--- + +Status Network is fully EVM-compatible, so you can deploy contracts using any standard Ethereum toolchain. Pick the tool that fits your workflow and follow the step-by-step guide to get your first contract live on the testnet. + +:::tip Before you start +Make sure you've [added Status Network to your wallet](/overview/general-info/add-status-network) and grabbed some [testnet ETH](/tools/core-infrastructure/testnet-faucets). +::: + +## Choose a Deployment Tool + +
The industry-standard development environment for compiling, testing, and deploying Solidity contracts. Includes Hardhat Ignition and TypeScript support.
+ TypeScript · Testing · Ignition +A blazing-fast, Rust-based toolkit for smart contract development. Write tests in Solidity and interact with contracts using Cast.
+ Solidity Tests · Cast · Fast Builds +A browser-based IDE with zero setup — perfect for quick prototyping, learning, and deploying simple contracts without any local tooling.
+ Browser-Based · No Setup · Beginner-Friendly +A full-stack starter kit with a pre-configured Status Network extension. Includes a NextJS frontend, contract hot-reload, and both Hardhat and Foundry support.
+ Full-Stack · NextJS · Hot Reload +linea_estimateGas with from parameter"]
+ B --> C{Fee outcome}
+ C -->|base+priority = 0| D[Show gasless UX]
+ C -->|Premium fees| F[Show premium fee UX]
+ D --> G[Send transaction]
+ F --> G
+```
+
+*Figure: Gas estimation flow using `linea_estimateGas`*
+
+This is why builders should use `linea_estimateGas` when estimating transaction costs or pre-filling EIP-1559 fee fields for users on Status Network.
+
+:::info for more
+For a detailed explanation of Karma and its impact on gas fees and transaction privileges, see the [Karmic Tokenomics](../../overview/tokenomics/karmic-tokenomics) page.
+
+For the technical details of how our gasless system is implemented and enforced, refer to the [Gasless Transactions](../../overview/general-info/gasless-transactions) documentation.
+:::
+
+## `linea_estimateGas` request/response shape
+
+### Request
+
+`linea_estimateGas` takes the **same transaction call object** as `eth_estimateGas`.
+It returns `gasLimit` (using the same EVM execution logic as `eth_estimateGas`) together with fee fields that reflect both Linea's L2-specific pricing and Status Network's Karma rules - all in a single response.
+
+:::important
+**Always include `from`.** Without it, the node can't apply Karma/quota/deny-list logic.
+:::
+
+### Response
+
+`linea_estimateGas` returns an object including:
+
+- `gasLimit`: hex quantity - estimated gas units for EVM execution (same calculation as `eth_estimateGas`)
+- `baseFeePerGas`: hex quantity - base fee for the next block, accounting for Karma rules on Status Network
+- `priorityFeePerGas`: hex quantity - suggested priority fee, accounting for Karma rules on Status Network
+
+These fee fields may differ significantly from the values returned by `eth_` namespace calls such as `eth_gasPrice`, `eth_maxPriorityFeePerGas`, or `eth_feeHistory`, which are not aware of Linea's L2-specific pricing or Status Network's Karma adjustments.
+
+
+Continuous revenue pool that scales with your app's traction
+One-time grants you re-apply for every few months
+Free with Karma — no paymaster, no relayer, no account abstraction setup
+Users pay gas, or devs run paymaster + relayer infrastructure
+Network-wide reputation system through Karma — spam resistance, trust signals, feature gating
+None — build your own or integrate third-party solutions
+Native ZK-based tooling — Rate Limiting Nullifiers and more
+Third-party integrations
+Solidityコントラクトのコンパイル、テスト、デプロイのための業界標準の開発環境。Hardhat IgnitionとTypeScriptサポート付き。
+ TypeScript · テスト · Ignition +Rustベースの高速スマートコントラクト開発ツールキット。Solidityでテストを書き、Castでコントラクトとやり取り。
+ Solidityテスト · Cast · 高速ビルド +ゼロセットアップのブラウザベースIDE。クイックプロトタイピング、学習、ローカルツールなしでのシンプルなコントラクトのデプロイに最適。
+ ブラウザベース · セットアップ不要 · 初心者向け +Status Network拡張がプリ設定されたフルスタックスターターキット。NextJSフロントエンド、コントラクトのホットリロード、HardhatとFoundryの両方に対応。
+ フルスタック · NextJS · ホットリロード +fromパラメータ付きでlinea_estimateGasを呼び出し"]
+ B --> C{手数料の結果}
+ C -->|base+priority = 0| D[ガスレスUXを表示]
+ C -->|プレミアム手数料| F[プレミアム手数料UXを表示]
+ D --> G[トランザクションを送信]
+ F --> G
+```
+
+*図: `linea_estimateGas`を使用したガス推定フロー*
+
+これが、ビルダーがStatus Networkでトランザクションコストの推定やユーザー向けEIP-1559手数料フィールドの事前入力に`linea_estimateGas`を使用すべき理由です。
+
+:::info 詳細
+Karmaとガス手数料およびトランザクション特権への影響に関する詳細な説明は、[カルミックトークノミクス](../../overview/tokenomics/karmic-tokenomics)ページを参照してください。
+
+ガスレスシステムの実装と適用方法の技術的な詳細は、[ガスレストランザクション](../../overview/general-info/gasless-transactions)ドキュメントを参照してください。
+:::
+
+## `linea_estimateGas`のリクエスト/レスポンス形式
+
+### リクエスト
+
+`linea_estimateGas`は`eth_estimateGas`と**同じトランザクション呼び出しオブジェクト**を受け取ります。
+`gasLimit`(`eth_estimateGas`と同じEVM実行ロジックを使用)と、LineaのL2固有の価格設定とStatus NetworkのKarmaルールの両方を反映した手数料フィールドを、単一のレスポンスで返します。
+
+:::important
+**必ず`from`を含めてください。** これがないと、ノードはKarma/クォータ/拒否リストのロジックを適用できません。
+:::
+
+### レスポンス
+
+`linea_estimateGas`は以下を含むオブジェクトを返します:
+
+- `gasLimit`: 16進数 - EVM実行のための推定ガスユニット(`eth_estimateGas`と同じ計算)
+- `baseFeePerGas`: 16進数 - Status NetworkのKarmaルールを反映した次のブロックの基本手数料
+- `priorityFeePerGas`: 16進数 - Status NetworkのKarmaルールを反映した推奨優先手数料
+
+これらの手数料フィールドは、`eth_gasPrice`、`eth_maxPriorityFeePerGas`、`eth_feeHistory`などの`eth_`名前空間の呼び出しが返す値とは大きく異なる場合があります。これらはLineaのL2固有の価格設定やStatus NetworkのKarma調整を認識していません。
+
+
+アプリのトラクションに応じてスケールする継続的な収益プール
+数ヶ月ごとに再申請する一度きりのグラント
+Karmaで無料 — ペイマスター、リレイヤー、アカウント抽象化のセットアップ不要
+ユーザーがガスを支払うか、開発者がペイマスター+リレイヤーインフラを運用
+Karmaによるネットワーク全体のレピュテーションシステム — スパム耐性、トラストシグナル、機能ゲーティング
+なし — 自前で構築するかサードパーティソリューションを統合
+ネイティブZKベースのツール — Rate Limiting Nullifiersなど
+サードパーティ統合
+Solidity 컨트랙트 컴파일, 테스트, 배포를 위한 업계 표준 개발 환경. Hardhat Ignition 및 TypeScript 지원 포함.
+ TypeScript · Testing · Ignition +스마트 컨트랙트 개발을 위한 Rust 기반 초고속 툴킷. Solidity로 테스트를 작성하고 Cast로 컨트랙트와 상호작용하세요.
+ Solidity Tests · Cast · Fast Builds +설치 없이 브라우저에서 사용하는 IDE — 빠른 프로토타이핑, 학습, 로컬 도구 설치 없이 간단한 컨트랙트 배포에 완벽합니다.
+ Browser-Based · No Setup · Beginner-Friendly +스테이터스 네트워크 확장이 사전 구성된 풀스택 스타터 키트. NextJS 프론트엔드, 컨트랙트 핫 리로드, Hardhat 및 Foundry 지원 포함.
+ Full-Stack · NextJS · Hot Reload +from 파라미터와 함께 linea_estimateGas 호출"]
+ B --> C{수수료 계산}
+ C -->|base+priority = 0| D[가스리스 UX 표시]
+ C -->|프리미엄 수수료| F[프리미엄 수수료 UX 표시]
+ D --> G[트랜잭션 전송]
+ F --> G
+```
+
+*그림: `linea_estimateGas`를 사용한 가스 추정 플로우*
+
+이것이 빌더가 Status Network에서 트랜잭션 비용을 추정하거나 사용자를 위한 EIP-1559 수수료 필드를 입력해줄 때 `linea_estimateGas`를 사용해야 하는 이유입니다.
+
+:::info 자세히 보기
+카르마와 가스비 및 트랜잭션 권한에 미치는 영향에 대한 자세한 설명은 [카르마 토크노믹스](../../overview/tokenomics/karmic-tokenomics) 페이지를 참조하세요.
+
+가스리스 시스템이 어떻게 구현되고 적용되는지에 대한 기술적 세부사항은 [가스리스 트랜잭션](../../overview/general-info/gasless-transactions) 문서를 참조하세요.
+:::
+
+## `linea_estimateGas` 요청/응답 형태
+
+### 요청
+
+`linea_estimateGas`는 `eth_estimateGas`와 **동일한 트랜잭션 호출 객체**를 받습니다.
+`gasLimit`(`eth_estimateGas`와 동일한 EVM 실행 로직 사용)과 함께 Linea의 L2 전용 가격 책정과 Status Network의 카르마 규칙을 모두 반영한 수수료 필드를 단일 응답으로 반환합니다.
+
+:::important
+**항상 `from`을 포함하세요.** 해당 값이 없으면 노드가 카르마/할당량/거부 목록 로직을 적용할 수 없습니다.
+:::
+
+### 응답
+
+`linea_estimateGas`는 다음을 포함하는 객체를 반환합니다:
+
+- `gasLimit`: 16진수 숫자값 - EVM 실행을 위한 추정 가스 단위(`eth_estimateGas`와 동일한 계산 결과)
+- `baseFeePerGas`: 16진수 숫자값 - Status Network의 카르마 규칙을 반영한 다음 블록의 기본 수수료
+- `priorityFeePerGas`: 16진수 숫자값 - Status Network의 카르마 규칙을 반영한 제안 우선순위 수수료
+
+이러한 수수료 필드는 `eth_gasPrice`, `eth_maxPriorityFeePerGas`, `eth_feeHistory`와 같은 `eth_` 네임스페이스 호출이 반환하는 값과 크게 다를 수 있습니다. `eth_` 네임스페이스들은 Linea의 L2 전용 가격 책정이나 Status Network의 카르마 조정을 인식하지 못합니다.
+
+
+앱의 성과에 따라 확장되는 지속적인 수익 풀
+몇 달마다 재신청해야하는 일회성 보조금
+카르마로 완전히 무료 — 페이마스터, 릴레이어, 계정 추상화 등 설정 불필요
+사용자가 가스를 지불하거나, 개발자가 페이마스터 + 릴레이어 인프라 운영
+카르마를 통한 네트워크 전역 평판 시스템 — 스팸 방지, 신뢰 신호, 기능 제한 등 활용 가능
+없음 — 직접 구축하거나 서드파티 솔루션 사용
+네이티브 ZK 기반 도구 — Rate Limiting Nullifiers 등
+서드파티
+行业标准的开发环境,用于编译、测试和部署 Solidity 合约。包含 Hardhat Ignition 和 TypeScript 支持。
+ TypeScript · Testing · Ignition +基于 Rust 的超快智能合约开发工具包。使用 Solidity 编写测试,使用 Cast 与合约交互。
+ Solidity Tests · Cast · Fast Builds +零配置的浏览器 IDE,适合快速原型开发、学习和部署简单合约,无需任何本地工具。
+ Browser-Based · No Setup · Beginner-Friendly +全栈入门套件,预配置 Status Network 扩展。包含 NextJS 前端、合约热重载,以及 Hardhat 和 Foundry 支持。
+ Full-Stack · NextJS · Hot Reload +from 参数调用 linea_estimateGas"]
+ B --> C{费用结果}
+ C -->|base+priority = 0| D[显示无 Gas UX]
+ C -->|溢价费用| F[显示溢价费用 UX]
+ D --> G[发送交易]
+ F --> G
+```
+
+*图示:使用 `linea_estimateGas` 的 Gas 估算流程*
+
+这就是为什么开发者在 Status Network 上估算交易成本或为用户预填 EIP-1559 费用字段时,应该使用 `linea_estimateGas`。
+
+:::info 更多信息
+关于 Karma 及其对 Gas 费用和交易特权影响的详细说明,请参阅 [Karmic 代币经济学](../../overview/tokenomics/karmic-tokenomics) 页面。
+
+关于我们无 Gas 系统如何实现和执行的技术细节,请参阅[无 Gas 交易](../../overview/general-info/gasless-transactions)文档。
+:::
+
+## `linea_estimateGas` 请求/响应结构
+
+### 请求
+
+`linea_estimateGas` 接受与 `eth_estimateGas` 相同的**交易调用对象**。
+它使用与 `eth_estimateGas` 相同的 EVM 执行逻辑返回 `gasLimit`,同时返回反映 Linea L2 专属定价和 Status Network Karma 规则的费用字段——全部在单次响应中完成。
+
+:::important
+**始终包含 `from`。** 没有它,节点无法应用 Karma/配额/拒绝名单逻辑。
+:::
+
+### 响应
+
+`linea_estimateGas` 返回的对象包含:
+
+- `gasLimit`:十六进制数量——EVM 执行的估算 Gas 单位(与 `eth_estimateGas` 计算方式相同)
+- `baseFeePerGas`:十六进制数量——下一个区块的基础费用,已考虑 Status Network 上的 Karma 规则
+- `priorityFeePerGas`:十六进制数量——建议的优先费用,已考虑 Status Network 上的 Karma 规则
+
+这些费用字段可能与 `eth_` 命名空间调用(如 `eth_gasPrice`、`eth_maxPriorityFeePerGas` 或 `eth_feeHistory`)返回的值有显著差异——后者不了解 Linea 的 L2 专属定价或 Status Network 的 Karma 调整。
+
+
+持续收入池,随应用增长而扩展
+一次性资助,每隔几个月需要重新申请
+通过 Karma 免费 —— 无需 paymaster、relayer 或账户抽象配置
+用户支付 Gas,或开发者运营 paymaster + relayer 基础设施
+通过 Karma 实现全网声誉系统 —— 防垃圾、信任信号、功能准入
+无 —— 需自行构建或集成第三方方案
+原生 ZK 工具 —— Rate Limiting Nullifiers 等
+第三方集成
+{idea.what}
+ + {/* Badges row */} +
+
+
+
+
+
+