How does an ERC-20 allowance limit delegated spending?

ERC-20 uses approve to set a spender's allowance and transferFrom for delegated transfers.

EIP-20 in practice

After an allowance of 50 base units and a delegated spend of 20, the remaining allowance is normally 30. A new approve sets an allowance. Display the spender, network and units clearly.

中文

ERC-20 的 allowance 如何限制代扣额度?

ERC-20 通过 approve 指定某个地址可代持有人支配的额度,通过 transferFrom 执行经授权的转账。

EIP-20 应用实例

授予 50 个最小单位的额度后,代扣 20 个通常剩余 30 个。再次 approve 通常覆盖现有额度。界面应标明授权对象、链和计量单位。

References / 参考来源

Keep reading / 继续阅读