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.9; | |
import "./multisig.sol"; | |
contract MultiSigFactory { | |
//a factory contract that create multiple clones of multisig.sol | |
//a function that create a new multisig | |
//an array that holds contract addresses created | |
//a function that calls the approve function in multisig.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
require("dotenv").config({ path: ".env" }); | |
import { BytesLike } from "ethers"; | |
import { ethers } from "hardhat"; | |
// import * as dotenv from "dotenv"; | |
// import IMultiSig from "../typechain-types/Imultisig.sol" | |
async function main() { | |
let provider = { | |
PrivateKey: process.env.PRIVATE_KEY as BytesLike, |
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.8.17; | |
struct Data{ | |
string name; | |
uint Id; | |
uint age; | |
string gender; | |
bool status; | |
} |
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.9; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
//users stake usdt | |
//user get 20% APY CVIII as reward; | |
// tken ratio 1: 1 | |
contract stakERC20 is Ownable { |
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.9; | |
interface IUSDT { | |
function approve(address _spender, uint256 _value) external; | |
function balanceOf(address who) external view returns (uint256); | |
function allowance(address _owner, address _spender) | |
external |
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.9; | |
interface IToken { | |
function approve(address _spender, uint256 _value) external; | |
function balanceOf(address who) external view returns (uint256); | |
function allowance(address _owner, address _spender) | |
external |
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 {Test, console} from 'forge-std/Test.sol'; | |
import {DePayForwarderV2} from '../contracts/DePayForwarderV2.sol'; | |
import {DePayRouterV2} from '../contracts/DePayRouterV2.sol'; | |
import {TestReceiver} from '../contracts/TestReceiver.sol'; | |
import {IDePayRouterV2} from '../contracts/interfaces/IDePayRouterV2.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
import {Test, console} from 'forge-std/Test.sol'; | |
import {DePayForwarderV2} from '../contracts/DePayForwarderV2.sol'; | |
import {DePayRouterV2} from '../contracts/DePayRouterV2.sol'; | |
import {TestReceiver} from '../contracts/TestReceiver.sol'; | |
import {IDePayRouterV2} from '../contracts/interfaces/IDePayRouterV2.sol'; | |
contract DePayRouterV2Test is Test { | |
DePayForwarderV2 public forwarder; | |
DePayRouterV2 public router; |
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 {Test, console} from 'forge-std/Test.sol'; | |
import {DePayForwarderV2} from '../contracts/DePayForwarderV2.sol'; | |
import {DePayRouterV2} from '../contracts/DePayRouterV2.sol'; | |
import {IDePayRouterV2} from '../contracts/interfaces/IDePayRouterV2.sol'; | |
contract DePayRouterV2Test is Test { | |
DePayForwarderV2 public forwarder; |
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 { ethers } from 'hardhat' | |
async function main() { | |
const currentTimestampInSeconds = Math.round(Date.now() / 1000) | |
const unlockTime = currentTimestampInSeconds + 60 | |
const lockedAmount = ethers.parseEther('0.001') | |
const lock = await ethers.deployContract('Lock', [unlockTime], { | |
value: lockedAmount, |
OlderNewer