opcode | description | gas cost |
---|---|---|
LOG0 (0xa0) |
Append log record with no topics | 375 |
LOG1 (0xa1) |
Append log record with one topic | 750 |
LOG2 (0xa2) |
Append log record with two topics | 1125 |
LOG3 (0xa3) |
Append log record with three topics | 1500 |
LOG4 (0xa4) |
Append log record with four topics | 1875 |
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 | |
// 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/ERC20Burnable.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract EcoCoin is ERC20, ERC20Burnable, Ownable { | |
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
// SPDX-License-Identifier: MIT | |
// Compatible with OpenZeppelin Contracts ^5.0.0 | |
pragma solidity ^0.8.20; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract TimeCapsulez is ERC721, ERC721Burnable, Ownable { | |
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
// SPDX-License-Identifier: Apache 2.0 | |
pragma solidity ^0.8.17; | |
import {LSP7Mintable} from "./LSP7DigitalAsset/presets/LSP7Mintable.sol"; | |
import {LSP7Burnable} from "./LSP7DigitalAsset/extensions/LSP7Burnable.sol"; | |
// for overriding internal _mint function | |
import { | |
LSP7DigitalAsset, | |
LSP7DigitalAssetCore |
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-2.0-or-later | |
pragma solidity ^0.8.4; | |
// interfaces | |
import { | |
IERC725Y | |
} from "@erc725/smart-contracts/contracts/interfaces/IERC725Y.sol"; | |
import {ILSP1UniversalReceiver} from "../ILSP1UniversalReceiver.sol"; | |
import {ILSP7DigitalAsset} from "../../LSP7DigitalAsset/ILSP7DigitalAsset.sol"; |
Easy to understand. Folder inside the LSP repository to explain these different recipes and combination of standards = Standardised Recipes. Could also put them in the docs/, inside the Standards section.
Recipe 1: a 🆙 Universal Profile = LSP0 + LSP1 + LSP6
Recipe 2: Vault
Here are the stats of the deployment cost and runtime cost of a LSP6 Key Manager (= "LSP6TokenManager
") that is built with only the funtionalities
to manage a LSP7/8 Token (only the path for the setData selectors, no reentrancy checks as it is not applicable to a token and
no isValidSignature(...)
function with check on permission SIGN
, as a token does not have that).
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: Apache-2.0 | |
pragma solidity ^0.8.5; | |
// interfaces | |
import { | |
IERC725Y | |
} from "@erc725/smart-contracts/contracts/interfaces/IERC725Y.sol"; | |
import {ILSP6KeyManager} from "./ILSP6KeyManager.sol"; | |
// modules |
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
pragma solidity ^0.8.0; | |
contract SolidityErrors { | |
error InsufficientBalance( | |
uint256 amount, | |
uint256 balance | |
); | |
function testRevertErrorEmpty() |
NewerOlder