Developers · Base
USDCtoFiat deposits के लिए Builder Code attribution तैयार करें।
यह setup guidance है, यह दावा नहीं कि USDCtoFiat के पास issued Builder Code है। इसे तब इस्तेमाल करें जब आपका Base app @usdctofiat/offramp से बनी onchain deposit transactions को attribute करने के लिए तैयार हो।
01
Attribution sequence
- 1Base Mini App को stable HTTPS origin पर deploy करें।
- 2App को Base.dev पर register और verify करें।
- 3Base.dev settings से real Builder Code copy करें।
- 4उस code से ox/erc8021 के साथ ERC-8021 dataSuffix generate करें।
- 5Deposit transaction भेजने वाले Viem या Wagmi client में dataSuffix attach करें।
- 6Campaign launch करने से पहले छोटा USDCtoFiat deposit बनाकर attribution verify करें।
02
यह कहाँ लगता है
| Surface | Attribution path |
|---|---|
| Base App | Base docs कहते हैं कि registered apps को Base App के अंदर activity के लिए automatic attribution मिल सकता है। |
| Web app | Base App के बाहर browser usage attribute करने के लिए transaction client में dataSuffix जोड़ें। |
| USDCtoFiat SDK | SDK आपके दिए wallet client से sign करता है, इसलिए suffix उसी wallet-client path पर लगता है। |
| Contracts | Contract change की जरूरत नहीं; ERC-8021 suffix data calldata में append होकर offchain indexed होता है। |
03
Implementation notes
- Base docs path के लिए viem 2.45.0 या newer इस्तेमाल करें; यह app पहले से newer viem version चलाता है।
- Placeholder Builder Codes production में न रखें। Base.dev issue करने के बाद ही real value wire करें।
- Viem के लिए wallet client बनाते समय dataSuffix जोड़ें।
- Wagmi के लिए client level पर dataSuffix configure करें ताकि sends और batched calls उसे inherit करें।
- Privy या smart-wallet flows के लिए उस wallet/provider path का इस्तेमाल करें जो सच में user operation या transaction submit करता है।
04
Verification
| Check | Pass condition |
|---|---|
| Base.dev | App के Builder Code के लिए onchain transaction counts बढ़ते हैं। |
| Block explorer | Transaction input ERC-8021 suffix marker पर खत्म होकर expected code में decode होता है। |
| USDCtoFiat result | Created deposit depositId और txHash लौटाता है, फिर deposits(address) में दिखता है। |
| Peerlytics | Indexing catch up होने के बाद deposit और intent lifecycle inspect किया जा सकता है। |
Keep exploring
Common questions
क्या मैं अभी placeholder Builder Code जोड़ सकता हूँ?
नहीं। Integration ready रखें, लेकिन placeholder attribution ship न करें। Base.dev पर register करें, real code लें, फिर उसे wallet-client path में जोड़ें।
क्या @usdctofiat/offramp को अलग Builder Code option चाहिए?
Normal app path के लिए नहीं। SDK आपके दिए Viem WalletClient का उपयोग करता है, इसलिए attribution उसी client या transaction भेजने वाली wallet/provider layer से attach होना चाहिए।
क्या ERC-8021 ZKP2P contracts बदलता है?
नहीं। Base docs Builder Codes को calldata suffix attribution बताते हैं। Contracts सामान्य रूप से execute होते हैं; attribution transaction land होने के बाद offchain indexers पढ़ते हैं।