This file contains 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
/** | |
* @param {string} apikey - etherscan api key | |
* @param {string} contractAddress - Address of the contract to verify | |
* @param {string} contractArguments - Parameters used in the contract constructor during the initial deployment. It should be the hex encoded value | |
* @param {string} contractName - Name of the contract | |
* @param {string} contractFile - File where the contract is located | |
* @param {number | string} chainRef - Network chain id or API URL (optional) | |
* @param {boolean} isProxyContract - true, if contract is a proxy contract (optional) | |
* @param {string} expectedImplAddress - Implementation contract address, in case of proxy contract verification (optional) | |
* @returns {{ guid, status, message, succeed }} verification result |
This file contains 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 v4.4.0 (access/Ownable.sol) | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to |
This file contains 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.4; | |
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; | |
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; | |
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | |
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; | |
contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable { | |
/// @custom:oz-upgrades-unsafe-allow constructor |
This file contains 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
REMIX DEFAULT WORKSPACE | |
Remix default workspace is present when: | |
i. Remix loads for the very first time | |
ii. A new workspace is created | |
iii. There are no files existing in the File Explorer | |
This workspace contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. |
This file contains 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
REMIX DEFAULT WORKSPACE | |
Remix default workspace is present when: | |
i. Remix loads for the very first time | |
ii. A new workspace is created | |
iii. There are no files existing in the File Explorer | |
This workspace contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. |
This file contains 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: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @title Storage | |
* @dev Store & retrieve value in a variable | |
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts | |
*/ | |
contract Storage { |
This file contains 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.4; | |
import "@openzeppelin/contracts@4.5.0/token/ERC20/ERC20.sol"; | |
contract MyToken is ERC20 { | |
constructor() ERC20("Nightwatch", "MTK") {} | |
} |
This file contains 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: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
import "hardhat/console.sol"; | |
/** | |
* @title Owner | |
* @dev Set & change owner | |
*/ |
This file contains 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.10; | |
// gas golf | |
contract MusketeerGas { | |
// The munitions manager of the Musketeer corps of Bannon Cocq has a limited amount of gunpowder (GAS) for their murder | |
// They need to use what that have wisely. | |
// In preparing the murder of X, they plan how much gunpowder to use. Their stock is limited and their | |
// boss Bannon Cocq will be upset with them if they use too much. |
This file contains 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: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @title Storage | |
* @dev Store & retrieve value in a variable | |
*/ | |
contract Storage { |
NewerOlder