Skip to content

Instantly share code, notes, and snippets.

@dobestan
Created October 15, 2022 13:18
Show Gist options
  • Save dobestan/bb62ce4a123238a4560baa3d2af8c689 to your computer and use it in GitHub Desktop.
Save dobestan/bb62ce4a123238a4560baa3d2af8c689 to your computer and use it in GitHub Desktop.
Decipher Solidity #20221015
// SPDX-License-Identifier: MIT
pragma solidity >= 0.8.0;
import "./Token.sol"; // Token Contract
contract Factory {
function createTokenContract(
string memory _name,
string memory _symbol
) public returns (address) {
Token token = new Token(_name, _symbol);
return address(token); // 0xD3e2008b4Da2cD6DEAF73471590fF30C86778A48
}
}
// SPDX-License-Identifier: MIT
pragma solidity >= 0.8.0;
// import "./DAO.sol";
// import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract Token is ERC20 {
constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment