有人说为什么不直接向智能合约打款mint,而要通过x402协议来通过服务端绕一下,我来解释下: 1. 智能合约无法进行身份验证等需要链下完成的操作,譬如前段时间$YB的募资,通过legionCC等平台进行了身份验证,通过后给额度和转币,但需要提前转U,如果用x402,只要给需要支付的U签个名就行,$PONG合约就把对mint数量的检查放到了链下 2. 在将智能合约的设计简化,复杂规则在链下完成后,对web2企业将x402协议使用起来也是利好 3. 如果是agent在对支付做审核,就只能采取这样的设计流程,所以这是一个极简的demo,演示了如何用任一一种支持EIP-3009代币进行支付的合理流程
基于x402协议,支付 $PING, Mint $PONG, 这样的$PONG才是跟$PING配对的 👩‍❤️‍👨👩‍❤️‍👨 一个小知识: $PING合约自带receiveWithAuthorization接口,此接口只能被收款方调用,如果收款方是智能合约,便可在合约中同时完成支付和Mint,就不用担心付了钱收不到货的情况了。
7.23K
1
The content on this page is provided by third parties. Unless otherwise stated, OKX is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.