Skip to content

Instantly share code, notes, and snippets.

View otter2002's full-sized avatar

degenotter otter2002

View GitHub Profile
@otter2002
otter2002 / learn solidity...erc20...IERC20.sol
Created September 10, 2022 01:10
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
/**
* @dev ERC20 接口合约.
*/
interface IERC20 {
/**
* @dev 释放条件:当 `value` 单位的货币从账户 (`from`) 转账到另一账户 (`to`)时.
*/
@otter2002
otter2002 / learn solidity...1 hello.sol
Created September 10, 2022 00:55
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract Helloworld {
string public mystring = "hello world";
}
@otter2002
otter2002 / learn solidity...erc20...IERC20.sol
Created September 10, 2022 00:54
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
/**
* @dev ERC20 接口合约.
*/
interface IERC20 {
/**
* @dev 释放条件:当 `value` 单位的货币从账户 (`from`) 转账到另一账户 (`to`)时.
*/
@otter2002
otter2002 / 1 hello.sol
Created September 10, 2022 00:34
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract Helloworld {
string public mystring = "hello world";
}