英文:
What happens if there is not enough crypto money to fulfill a smart contract?
问题
如果在第D天,X没有足够的加密货币来履行合同,会发生什么?
英文:
Let's say a smart contract says: "In 365 days, X should send 0.005 Crypto to Y".
If the D-day X doesn't own enough Crypto to fulfill the contract, what will happen?
答案1
得分: 1
你的智能合约无法强制执行此操作
> "在365天内,X应向Y发送0.005加密货币"
但X可以允许智能合约代表X执行转账。因此,在365天后,智能合约将从X转账"0.005加密货币给Y"。如果两种代币都是erc20代币。
如果X没有足够的代币,该转账将失败,您应相应处理这种情况
英文:
your smart contract cannot force this
> "In 365 days, X should send 0.005 Crypto to Y"
but X could allow the smart contract to do the transfer on behalf of X. so after 365 days, the smart contract will transfer "0.005 Crypto to Y" from X. if both tokens are erc20
tokens.
If X does not have enough coins, that transfer will fail and you should handle the case accordingly
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论