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.4.0; | |
import {Script, console} from "forge-std/Script.sol"; | |
import {UniswapV3Factory} from "../lib/v3-core/contracts/UniswapV3Factory.sol"; | |
import {UniswapV3Pool} from "../lib/v3-core/contracts/UniswapV3Pool.sol"; | |
import {WRWA} from "../src/WRWA.sol"; | |
import {NonfungiblePositionManager} from "../src/NonfungiblePositionManager.sol"; | |
import {NonfungibleTokenPositionDescriptor} from "../src/NonfungibleTokenPositionDescriptor.sol"; | |
import {SwapRouter} from "../lib/v3-periphery/contracts/SwapRouter.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
const sendSignedTransaction = async ( | |
privateKey: string, | |
provider: string, | |
tx: any, | |
contractAddress: string) => { | |
const web3 = new Web3(provider); | |
const client = privateKeyToAddress(provider, privateKey); | |
const networkId = await web3.eth.net.getId(); | |
const nonce = await web3.eth.getTransactionCount(client) |
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 CryptoJS = require('crypto-js') | |
const token = ""; // retrieve after login | |
const accessSecret = ""; // retrieve after login | |
const timestamp = Date.now() | |
let requestBody = {} | |
if(Object.keys(pm.request.body).length > 0){ | |
requestBody = JSON.parse(pm.request.body) |
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
export const setupWeb3 = (networkId: number) => { | |
let provider = ''; | |
if (networkId === 97) { | |
provider = 'https://data-seed-prebsc-1-s1.binance.org:8545/'; | |
} | |
if (networkId === 56) { | |
provider = 'https://bsc-dataseed1.ninicoin.io'; | |
} | |
if (networkId === 137) { |
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 baseuri = Axios.create({ | |
baseURL: `${chooseEnvironment().base}/api`, | |
headers: { | |
...getLocation(), | |
...getDeviceDetails(), | |
authorization: String(chooseEnvironment().auth), | |
authentication: `Basic ${retrieveToken().token}`, | |
}, | |
}); |
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
--- ----------------- ---- | |
Map Quick Explanation Link | |
--- ----------------- ---- | |
< <F1> Causes Netrw to issue help | |
<cr> Netrw will enter the directory or read the file |netrw-cr| | |
<del> Netrw will attempt to remove the file/directory |netrw-del| | |
<c-h> Edit file hiding list |netrw-ctrl-h| | |
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l| | |
<c-r> Browse using a gvim server |netrw-ctrl-r| | |
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab| |
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
export const sendSignedTransaction = async (tx, contractAddress) => { | |
const privatekey = ""; // your wallets secret key (very private, don't keep online) | |
const client = ""; | |
const networkId = await web3.eth.net.getId(); | |
const nonce = await web3.eth.getTransactionCount(client); | |
const gas = await tx.estimateGas({ from: client, nonce }); | |
const gasPrice = await web3.eth.getGasPrice(); | |
const data = tx.encodeABI(); |
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 createContract from "../create.contract"; | |
import EsusuService from '../abis/EsusuService.json'; | |
import DAITokenAbi from '../abis/DaiContract.json'; | |
import sendSignedTransaction from '../../utils/sendSignedTransaction'; | |
import esusuInfo from './info'; | |
export default async function ( | |
cycleId: number, | |
provider: string, |
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 createEsusuContract from "./contract-creator"; | |
import Groups from './abis/Groups.json'; | |
import ADDRESS from "./abis/addresses"; | |
async function getGroupsCount() { | |
const contract = await createEsusuContract(Groups.abi, ADDRESS.GROUPS); |
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
{ | |
"contractName": "Groups", | |
"abi": [ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "oracle", | |
"type": "address" | |
} |
NewerOlder