This file contains hidden or 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, providers, Wallet, utils, Transaction } from "ethers"; | |
| import { | |
| FlashbotsBundleProvider, | |
| FlashbotsBundleResolution, | |
| } from "@flashbots/ethers-provider-bundle"; | |
| import { exit } from "process"; | |
| const FLASHBOTS_URL = "https://relay-goerli.flashbots.net"; | |
| const TOKEN_ADDRESS = "0x4E5d67a73bdb6BF68fADa7BDD7F455A7aA02C8ab"; |
This file contains hidden or 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
| src/Interfaces/ICBridge.sol | |
| src/Interfaces/IERC173.sol | |
| src/Interfaces/ILiFi.sol | |
| src/Interfaces/ITransactionManager.sol | |
| src/Interfaces/IERC165.sol | |
| src/Interfaces/IAnyswapRouter.sol | |
| src/Interfaces/IDiamondLoupe.sol | |
| src/Interfaces/IHopBridge.sol | |
| src/Interfaces/IDiamondCut.sol | |
| src/Interfaces/IAnyswapToken.sol |
This file contains hidden or 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
| <script> | |
| import { onMount } from 'svelte' | |
| import { defaultChainStore, web3 } from 'svelte-web3' | |
| let Web3Modal | |
| let WalletConnectProvider | |
| onMount(() => { | |
| Web3Modal = window.Web3Modal.default |
This file contains hidden or 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
| #!/bin/sh | |
| FACTORY_ADDRESS="0x4e59b44847b379578588920ca78fbf26c0b4956c" | |
| SALT=$(seth --to-bytes32 $(seth --to-hex 2121)) | |
| BYTECODE=$(jq -r ".contracts[\"src/Nftrade.sol\"].Nftrade.evm.bytecode.object" out/dapp.sol.json) | |
| ARGS=$(seth abi-encode "constructor(address)" $ETH_FROM | cut -c 3-) | |
| CONTRACT_ADDRESS=$(seth call $FACTORY_ADDRESS "$SALT$BYTECODE$ARGS") | |
| seth send $FACTORY_ADDRESS $SALT$BYTECODE$ARGS --gas 1100000 | |
| echo "Deployed to address: $CONTRACT_ADDRESS" |
This file contains hidden or 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"); | |
| async function main() { | |
| if (!process.argv[2] || !process.argv[3]) { | |
| console.log("\nUsage: node generateCalldata.js <function signature> <args>"); | |
| console.log('e.g node generateCalldata.js "myFunction((uint8,bool)[],uint256)" "[[1,true],[2,false]],12345678"'); | |
| console.log("\n") | |
| throw Error | |
| } |
This file contains hidden or 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 'dotenv/config' | |
| import { node_url } from '../utils/network' | |
| import { providers, Wallet, utils } from 'ethers' | |
| import { NxtpSdk, NxtpSdkEvents } from '@connext/nxtp-sdk' | |
| import { NXTPFacet__factory, ERC20__factory } from '../typechain' | |
| const tidy = (str: string): string => | |
| `${str.replace(/\n/g, '').replace(/ +/g, ' ')}` | |
| async function main() { |
This file contains hidden or 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.4; | |
| import "./interfaces/ITransactionManager.sol"; | |
| contract CrossChain { | |
| private immutable ITransactionManager transactionManager; | |
| enum SwapType { ONE_INCH, PARASWAP, SUSHI } |
This file contains hidden or 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
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDG2rplA3T9TVHpHzjfEGSwHLrpPS6qNPBXQGKgDKabIBcW7TLkRddTY3gKKt73YCwd5/MYPL/9k6XoB9XdSAYrWtQaAtNZVGg3xZ52/FGqVELjrktnPHxfuqE9eAGGcsmOtI8MVG0xoAlznObJZFKkBEsP5KOY+56nIYvaV9Oaiq1gqiVLthMvboZf7+KY+N0Blrc7Lr6Yjq8prwCSYZGt2tHp8QSe3TM21t3cMlmIIiDCBorFPwO0Vo3fUjntcn43i+XiSjuGuoRK+RnIw36mA+eq7/le+UHSduXl2pZJyMIkiA0ShBHm6l9lwYop4CJ8EVpx5P7KSMQ+wMBbo9Qj |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "github.com/ethereum/go-ethereum/common" | |
| "github.com/ethereum/go-ethereum/ethclient" | |
| ) |
This file contains hidden or 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
| pragma solidity ^0.4.11; | |
| /** | |
| * @title SafeMath | |
| * @dev Math operations with safety checks that throw on error | |
| */ | |
| library SafeMath { | |
| function mul(uint256 a, uint256 b) internal constant returns (uint256) { | |
| uint256 c = a * b; |