...为数不多的「链下状态」储存在 headless CMS 当中,例如 Vercel 或者 Netlify。
[
Develop. Preview. Ship. For the best fronten...
...模拟用户,让我们看看是怎么做到的吧!
假设我们有一个ERC721合同,我们希望确保只有代币的所有者才能转移或销毁该代币。我们的测试可能如下:
```solidity
// only the owner can transfer
function testTransferToken() public {
// mint the tok...
...`totalSupply(LP) * (x1 / xReserves)` LP代币;
- 只支持精度为18 ERC20代币
功能只有这些,甚至连LP代币分发都没有,代码如下:
```js
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.7;
/// @dev bare minimum of IERC20 and IERC20Metadata that we'll use
in...