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.17; | |
import {MerkleProof} from "openzeppelin-contracts/utils/cryptography/MerkleProof.sol"; | |
// install murky with: `forge install dmfxyz/murky --no-commit ` | |
import {Strings2} from "murky/differential_testing/test/utils/Strings2.sol"; | |
import {Strings} from "openzeppelin-contracts/utils/Strings.sol"; | |
import "forge-std/Test.sol"; |
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 {ethers.Wallet} wallet | |
* @param {ethers.BigNumber} chainId | |
* @param {string} verifyingContract | |
* @returns {string} full signature | |
* | |
* rewards is an object: { | |
id: ethers.BigNumber, | |
amount: ethers.BigNumber, |
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
// consider our struct to be: | |
/** | |
struct TaskReward { | |
uint256 igoId; | |
Tier tier; | |
address rewardee; | |
uint256 taskId; | |
} | |
*/ |
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 { ethers } = require('ethers'); | |
/** | |
* @notice Path to where your .env file is. If the .env is at the root of your project, | |
* you can simply write `require('dotenv').config()` | |
*/ | |
require('dotenv').config({ path: '../../.env' }); | |
async function main() { | |
// instanciation can also be done using a private key | |
const wallet = new ethers.Wallet.fromMnemonic(process.env.SEED); |
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
require("dotenv").config(); | |
const { EthersEthereum } = require("@rarible/ethers-ethereum"); | |
const fetch = (...args) => | |
import("node-fetch").then(({ default: fetch }) => fetch(...args)); | |
global.FormData = require("form-data"); | |
global.window = { | |
fetch: fetch, | |
dispatchEvent: () => {}, | |
}; |
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
{"lastUpload":"2021-01-02T01:32:22.133Z","extensionVersion":"v3.4.3"} |