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: UNLICENSED | |
pragma solidity ^0.8.13; | |
import "forge-std/Test.sol"; | |
import "../src/Counter.sol"; | |
contract CounterTest is Test { | |
Counter public counter; | |
function setUp() public { |
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: UNLICENSED | |
pragma solidity ^0.8.13; | |
contract Counter { | |
uint256 public number; | |
uint256 public myNumber = 42; | |
function setNumber(uint256 newNumber) public { | |
number = newNumber; | |
} |
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: UNLICENSED | |
pragma solidity ^0.8.13; | |
import "forge-std/Test.sol"; | |
import "../src/Counter.sol"; | |
contract CounterTest is Test { | |
Counter public counter; | |
function setUp() public { |
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: UNLICENSED | |
pragma solidity ^0.8.13; | |
contract Counter { | |
uint256 public number; | |
function setNumber(uint256 newNumber) public { | |
number = newNumber; | |
} |
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; | |
import "hardhat/console.sol"; | |
contract Batch { | |
function multiCall(address[] calldata targets, bytes[] calldata data) | |
public | |
returns (bytes[] memory) | |
{ |
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
const { assert } = require('chai') | |
describe('EternalNFT Contract', async () => { | |
let nft | |
let nftContractAddress | |
let tokenId | |
// Deploys the EternalNFT contract and the EternalMarket contract before each test | |
beforeEach('Setup Contract', async () => { | |
const EternalNFT = await ethers.getContractFactory('EternalNFT') |
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
import { useState, useEffect } from 'react' | |
import { nftContractAddress } from '../config.js' | |
import { ethers } from 'ethers' | |
import axios from 'axios' | |
import Loader from 'react-loader-spinner' | |
import NFT from '../utils/EternalNFT.json' | |
const mint = () => { |
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
/** | |
*Submitted for verification at Etherscan.io on 2021-09-05 | |
*/ | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
/// [MIT License] | |
/// @title Base64 |
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.3; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import { Base64 } from "./libraries/Base64.sol"; | |
contract EternalNFT is ERC721URIStorage { | |
using Counters for Counters.Counter; | |
Counters.Counter private _tokenId; |
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; | |
contract MyContract { | |
// state variable num | |
uint256 public num; | |
// function sets value of variable num equal to _num | |
function setNum(uint256 _num) public returns(uint256) { |