Skip to content

Instantly share code, notes, and snippets.

// 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 {
// 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;
}
// 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 {
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
contract Counter {
uint256 public number;
function setNumber(uint256 newNumber) public {
number = newNumber;
}
//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)
{
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')
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 = () => {
/**
*Submitted for verification at Etherscan.io on 2021-09-05
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// [MIT License]
/// @title Base64
//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;
// 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) {