This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract Counter { | |
function | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { deploy } from './ethers-lib' | |
(async () => { | |
try { | |
const result = await deploy('MyToken', []) | |
console.log(`address: ${result.address}`) | |
} catch (e) { | |
console.log(e.message) | |
} | |
})() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.20; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; | |
contract MyToken is ERC20, ERC20Permit { | |
constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") { | |
_mint(_msgSender(), 1000000); // Initial supply of 1 million tokens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.20; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; | |
contract MyToken is ERC20, ERC20Permit { | |
constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") { | |
_mint(_msgSender(), 1000000); // Initial supply of 1 million tokens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol) | |
pragma solidity ^0.8.20; | |
interface IERC5267 { | |
/** | |
* @dev MAY be emitted to signal that the domain could have changed. | |
*/ | |
event EIP712DomainChanged(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.20; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; | |
contract MyToken is ERC20, ERC20Permit { | |
constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") { | |
_mint(_msgSender(), 1000000); // Initial supply of 1 million tokens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
// Compatible with OpenZeppelin Contracts ^5.0.0 | |
pragma solidity ^0.8.20; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; | |
contract SHIB is ERC20, ERC20Permit { | |
constructor() ERC20("SHIB", "SHIB") ERC20Permit("SHIB") { | |
_mint(msg.sender, 1000000 * 10 ** decimals()); |