Skip to content

Instantly share code, notes, and snippets.

View cygaar's full-sized avatar

cygaar cygaar

View GitHub Profile
@cygaar
cygaar / gas-diff.txt
Created June 26, 2022 00:04
ERC2981Optimized.sol
Can be found at: https://www.diffchecker.com/lPIpRFNs
@cygaar
cygaar / GasUsage.test.js
Last active August 3, 2022 12:40
ERC721A Optimized Mints
const { deployContract } = require('./helpers.js');
describe.only('ERC721A Gas Usage', function () {
beforeEach(async function () {
const [owner] = await ethers.getSigners();
this.owner = owner;
});
it('deployNormal', async function () {
for (let i = 0; i < 10; i++) {
@cygaar
cygaar / gist:75a17875f0253981607082d6267cb12d
Created May 1, 2022 06:18
Otherside Contract Rewritten with Optimizations
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "erc721a/contracts/ERC721A.sol";