First edits made like in the video.
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import erc20Abi from "./abis/erc20.json";
|
||||
import ownableAbi from "./abis/ownable.json";
|
||||
import erc20 from "./abis/erc20.json";
|
||||
import factory from "./abis/factory.json";
|
||||
import pair from "./abis/pair.json";
|
||||
import router01 from "./abis/router01.json";
|
||||
import router02 from "./abis/router02.json";
|
||||
|
||||
const abis = {
|
||||
erc20: erc20Abi,
|
||||
ownable: ownableAbi,
|
||||
export default {
|
||||
erc20,
|
||||
factory,
|
||||
pair,
|
||||
router01,
|
||||
router02,
|
||||
};
|
||||
|
||||
export default abis;
|
||||
|
||||
@@ -1,222 +1,693 @@
|
||||
[
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "name",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
{
|
||||
"abi": [
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Approval",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Transfer",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "DOMAIN_SEPARATOR",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "PERMIT_TYPEHASH",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "allowance",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "approve",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "balanceOf",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "decimals",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint8",
|
||||
"name": "",
|
||||
"type": "uint8"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "name",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "nonces",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "deadline",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint8",
|
||||
"name": "v",
|
||||
"type": "uint8"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "r",
|
||||
"type": "bytes32"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "s",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"name": "permit",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "symbol",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "totalSupply",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "transfer",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "transferFrom",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"evm": {
|
||||
"bytecode": {
|
||||
"linkReferences": {},
|
||||
"object": "",
|
||||
"opcodes": "",
|
||||
"sourceMap": ""
|
||||
},
|
||||
"deployedBytecode": {
|
||||
"linkReferences": {},
|
||||
"object": "",
|
||||
"opcodes": "",
|
||||
"sourceMap": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "approve",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "totalSupply",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "transferFrom",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "decimals",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "",
|
||||
"type": "uint8"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "balanceOf",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "balance",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "symbol",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "transfer",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "allowance",
|
||||
"outputs": [
|
||||
{
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"payable": true,
|
||||
"stateMutability": "payable",
|
||||
"type": "fallback"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Approval",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Transfer",
|
||||
"type": "event"
|
||||
}
|
||||
]
|
||||
"interface": [
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Approval",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Transfer",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "DOMAIN_SEPARATOR",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "PERMIT_TYPEHASH",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "allowance",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "approve",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "balanceOf",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "decimals",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint8",
|
||||
"name": "",
|
||||
"type": "uint8"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "name",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "nonces",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "owner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "spender",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "deadline",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint8",
|
||||
"name": "v",
|
||||
"type": "uint8"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "r",
|
||||
"type": "bytes32"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "s",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"name": "permit",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "symbol",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "totalSupply",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "transfer",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "transferFrom",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"bytecode": ""
|
||||
}
|
||||
97
packages/contracts/src/abis/factory.json
Normal file
97
packages/contracts/src/abis/factory.json
Normal file
@@ -0,0 +1,97 @@
|
||||
[
|
||||
{
|
||||
"inputs": [{ "internalType": "address", "name": "_feeToSetter", "type": "address" }],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": true, "internalType": "address", "name": "token0", "type": "address" },
|
||||
{ "indexed": true, "internalType": "address", "name": "token1", "type": "address" },
|
||||
{ "indexed": false, "internalType": "address", "name": "pair", "type": "address" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }
|
||||
],
|
||||
"name": "PairCreated",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
||||
"name": "allPairs",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "allPairsLength",
|
||||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
||||
{ "internalType": "address", "name": "tokenB", "type": "address" }
|
||||
],
|
||||
"name": "createPair",
|
||||
"outputs": [{ "internalType": "address", "name": "pair", "type": "address" }],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "feeTo",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "feeToSetter",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "", "type": "address" },
|
||||
{ "internalType": "address", "name": "", "type": "address" }
|
||||
],
|
||||
"name": "getPair",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [{ "internalType": "address", "name": "_feeTo", "type": "address" }],
|
||||
"name": "setFeeTo",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [{ "internalType": "address", "name": "_feeToSetter", "type": "address" }],
|
||||
"name": "setFeeToSetter",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
]
|
||||
@@ -1,81 +0,0 @@
|
||||
[
|
||||
{
|
||||
"inputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "previousOwner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "OwnershipTransferred",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "owner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "isOwner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [],
|
||||
"name": "renounceOwnership",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "transferOwnership",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
]
|
||||
345
packages/contracts/src/abis/pair.json
Normal file
345
packages/contracts/src/abis/pair.json
Normal file
@@ -0,0 +1,345 @@
|
||||
[
|
||||
{ "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" },
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" },
|
||||
{ "indexed": true, "internalType": "address", "name": "spender", "type": "address" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }
|
||||
],
|
||||
"name": "Approval",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": true, "internalType": "address", "name": "sender", "type": "address" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "amount0", "type": "uint256" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "amount1", "type": "uint256" },
|
||||
{ "indexed": true, "internalType": "address", "name": "to", "type": "address" }
|
||||
],
|
||||
"name": "Burn",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": true, "internalType": "address", "name": "sender", "type": "address" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "amount0", "type": "uint256" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "amount1", "type": "uint256" }
|
||||
],
|
||||
"name": "Mint",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": true, "internalType": "address", "name": "sender", "type": "address" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "amount0In", "type": "uint256" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "amount1In", "type": "uint256" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "amount0Out", "type": "uint256" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "amount1Out", "type": "uint256" },
|
||||
{ "indexed": true, "internalType": "address", "name": "to", "type": "address" }
|
||||
],
|
||||
"name": "Swap",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": false, "internalType": "uint112", "name": "reserve0", "type": "uint112" },
|
||||
{ "indexed": false, "internalType": "uint112", "name": "reserve1", "type": "uint112" }
|
||||
],
|
||||
"name": "Sync",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{ "indexed": true, "internalType": "address", "name": "from", "type": "address" },
|
||||
{ "indexed": true, "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }
|
||||
],
|
||||
"name": "Transfer",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "DOMAIN_SEPARATOR",
|
||||
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "MINIMUM_LIQUIDITY",
|
||||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "PERMIT_TYPEHASH",
|
||||
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "", "type": "address" },
|
||||
{ "internalType": "address", "name": "", "type": "address" }
|
||||
],
|
||||
"name": "allowance",
|
||||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "spender", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
||||
],
|
||||
"name": "approve",
|
||||
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"name": "balanceOf",
|
||||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [{ "internalType": "address", "name": "to", "type": "address" }],
|
||||
"name": "burn",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amount0", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amount1", "type": "uint256" }
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "decimals",
|
||||
"outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "factory",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "getReserves",
|
||||
"outputs": [
|
||||
{ "internalType": "uint112", "name": "_reserve0", "type": "uint112" },
|
||||
{ "internalType": "uint112", "name": "_reserve1", "type": "uint112" },
|
||||
{ "internalType": "uint32", "name": "_blockTimestampLast", "type": "uint32" }
|
||||
],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "_token0", "type": "address" },
|
||||
{ "internalType": "address", "name": "_token1", "type": "address" }
|
||||
],
|
||||
"name": "initialize",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "kLast",
|
||||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [{ "internalType": "address", "name": "to", "type": "address" }],
|
||||
"name": "mint",
|
||||
"outputs": [{ "internalType": "uint256", "name": "liquidity", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "name",
|
||||
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"name": "nonces",
|
||||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "owner", "type": "address" },
|
||||
{ "internalType": "address", "name": "spender", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "value", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
||||
{ "internalType": "uint8", "name": "v", "type": "uint8" },
|
||||
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
|
||||
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
|
||||
],
|
||||
"name": "permit",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "price0CumulativeLast",
|
||||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "price1CumulativeLast",
|
||||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [{ "internalType": "address", "name": "to", "type": "address" }],
|
||||
"name": "skim",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amount0Out", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amount1Out", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "bytes", "name": "data", "type": "bytes" }
|
||||
],
|
||||
"name": "swap",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "symbol",
|
||||
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [],
|
||||
"name": "sync",
|
||||
"outputs": [],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "token0",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "token1",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": true,
|
||||
"inputs": [],
|
||||
"name": "totalSupply",
|
||||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
||||
"payable": false,
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
||||
],
|
||||
"name": "transfer",
|
||||
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"constant": false,
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "from", "type": "address" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
||||
],
|
||||
"name": "transferFrom",
|
||||
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
||||
"payable": false,
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
]
|
||||
270
packages/contracts/src/abis/router01.json
Normal file
270
packages/contracts/src/abis/router01.json
Normal file
@@ -0,0 +1,270 @@
|
||||
[
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "_factory", "type": "address" },
|
||||
{ "internalType": "address", "name": "_WETH", "type": "address" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "WETH",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
||||
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "amountADesired", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountBDesired", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountAMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountBMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "addLiquidity",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountB", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "token", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "amountTokenDesired", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountTokenMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "addLiquidityETH",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountToken", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETH", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "factory",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOut", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveOut", "type": "uint256" }
|
||||
],
|
||||
"name": "getAmountIn",
|
||||
"outputs": [{ "internalType": "uint256", "name": "amountIn", "type": "uint256" }],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveOut", "type": "uint256" }
|
||||
],
|
||||
"name": "getAmountOut",
|
||||
"outputs": [{ "internalType": "uint256", "name": "amountOut", "type": "uint256" }],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOut", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" }
|
||||
],
|
||||
"name": "getAmountsIn",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" }
|
||||
],
|
||||
"name": "getAmountsOut",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveA", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveB", "type": "uint256" }
|
||||
],
|
||||
"name": "quote",
|
||||
"outputs": [{ "internalType": "uint256", "name": "amountB", "type": "uint256" }],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
||||
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountAMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountBMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "removeLiquidity",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountB", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "token", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountTokenMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "removeLiquidityETH",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountToken", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETH", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "token", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountTokenMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
||||
{ "internalType": "bool", "name": "approveMax", "type": "bool" },
|
||||
{ "internalType": "uint8", "name": "v", "type": "uint8" },
|
||||
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
|
||||
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
|
||||
],
|
||||
"name": "removeLiquidityETHWithPermit",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountToken", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETH", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
||||
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountAMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountBMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
||||
{ "internalType": "bool", "name": "approveMax", "type": "bool" },
|
||||
{ "internalType": "uint8", "name": "v", "type": "uint8" },
|
||||
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
|
||||
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
|
||||
],
|
||||
"name": "removeLiquidityWithPermit",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountB", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOut", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapETHForExactTokens",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapExactETHForTokens",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapExactTokensForETH",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapExactTokensForTokens",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOut", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountInMax", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapTokensForExactETH",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOut", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountInMax", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapTokensForExactTokens",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{ "stateMutability": "payable", "type": "receive" }
|
||||
]
|
||||
340
packages/contracts/src/abis/router02.json
Normal file
340
packages/contracts/src/abis/router02.json
Normal file
@@ -0,0 +1,340 @@
|
||||
[
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "_factory", "type": "address" },
|
||||
{ "internalType": "address", "name": "_WETH", "type": "address" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "WETH",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
||||
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "amountADesired", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountBDesired", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountAMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountBMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "addLiquidity",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountB", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "token", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "amountTokenDesired", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountTokenMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "addLiquidityETH",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountToken", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETH", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "factory",
|
||||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOut", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveOut", "type": "uint256" }
|
||||
],
|
||||
"name": "getAmountIn",
|
||||
"outputs": [{ "internalType": "uint256", "name": "amountIn", "type": "uint256" }],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveOut", "type": "uint256" }
|
||||
],
|
||||
"name": "getAmountOut",
|
||||
"outputs": [{ "internalType": "uint256", "name": "amountOut", "type": "uint256" }],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOut", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" }
|
||||
],
|
||||
"name": "getAmountsIn",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" }
|
||||
],
|
||||
"name": "getAmountsOut",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveA", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "reserveB", "type": "uint256" }
|
||||
],
|
||||
"name": "quote",
|
||||
"outputs": [{ "internalType": "uint256", "name": "amountB", "type": "uint256" }],
|
||||
"stateMutability": "pure",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
||||
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountAMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountBMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "removeLiquidity",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountB", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "token", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountTokenMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "removeLiquidityETH",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountToken", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETH", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "token", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountTokenMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "removeLiquidityETHSupportingFeeOnTransferTokens",
|
||||
"outputs": [{ "internalType": "uint256", "name": "amountETH", "type": "uint256" }],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "token", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountTokenMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
||||
{ "internalType": "bool", "name": "approveMax", "type": "bool" },
|
||||
{ "internalType": "uint8", "name": "v", "type": "uint8" },
|
||||
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
|
||||
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
|
||||
],
|
||||
"name": "removeLiquidityETHWithPermit",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountToken", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETH", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "token", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountTokenMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
||||
{ "internalType": "bool", "name": "approveMax", "type": "bool" },
|
||||
{ "internalType": "uint8", "name": "v", "type": "uint8" },
|
||||
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
|
||||
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
|
||||
],
|
||||
"name": "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",
|
||||
"outputs": [{ "internalType": "uint256", "name": "amountETH", "type": "uint256" }],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
||||
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountAMin", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountBMin", "type": "uint256" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
||||
{ "internalType": "bool", "name": "approveMax", "type": "bool" },
|
||||
{ "internalType": "uint8", "name": "v", "type": "uint8" },
|
||||
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
|
||||
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
|
||||
],
|
||||
"name": "removeLiquidityWithPermit",
|
||||
"outputs": [
|
||||
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountB", "type": "uint256" }
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOut", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapETHForExactTokens",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapExactETHForTokens",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapExactETHForTokensSupportingFeeOnTransferTokens",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapExactTokensForETH",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapExactTokensForETHSupportingFeeOnTransferTokens",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapExactTokensForTokens",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapExactTokensForTokensSupportingFeeOnTransferTokens",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOut", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountInMax", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapTokensForExactETH",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{ "internalType": "uint256", "name": "amountOut", "type": "uint256" },
|
||||
{ "internalType": "uint256", "name": "amountInMax", "type": "uint256" },
|
||||
{ "internalType": "address[]", "name": "path", "type": "address[]" },
|
||||
{ "internalType": "address", "name": "to", "type": "address" },
|
||||
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
||||
],
|
||||
"name": "swapTokensForExactTokens",
|
||||
"outputs": [{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{ "stateMutability": "payable", "type": "receive" }
|
||||
]
|
||||
@@ -1,5 +1,86 @@
|
||||
// This address points to a dummy ERC-20 contract. Replace it with your own smart contracts.
|
||||
const addresses = {
|
||||
ceaErc20: "0xa6dF0C88916f3e2831A329CE46566dDfBe9E74b7",
|
||||
/**
|
||||
* See all ids below
|
||||
* https://ethereum.stackexchange.com/questions/17051/how-to-select-a-network-id-or-is-there-a-list-of-network-ids
|
||||
*/
|
||||
export const GOERLI_ID = 5;
|
||||
export const KOVAN_ID = 42;
|
||||
export const MAINNET_ID = 1;
|
||||
export const RINKEBY_ID = 4;
|
||||
export const ROPSTEN_ID = 3;
|
||||
|
||||
const commonContracts = {
|
||||
factory: "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
|
||||
router01: "0xf164fC0Ec4E93095b804a4795bBe1e041497b92a",
|
||||
router02: "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
|
||||
};
|
||||
|
||||
export default {
|
||||
[GOERLI_ID]: {
|
||||
pairs: {
|
||||
"DAI-WETH": "0x8F609d85ebC64316B0B2f9E53c11b4e48B7A06d2",
|
||||
},
|
||||
tokens: {
|
||||
DAI: "0x697Ed3E98aaeCFa3121F536251F9D500de159dBa",
|
||||
WETH: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
|
||||
},
|
||||
...commonContracts,
|
||||
},
|
||||
[KOVAN_ID]: {
|
||||
pairs: {
|
||||
"DAI-WETH": "0xB10cf58E08b94480fCb81d341A63295eBb2062C2",
|
||||
},
|
||||
tokens: {
|
||||
DAI: "0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa",
|
||||
WETH: "0xd0A1E359811322d97991E03f863a0C30C2cF029C",
|
||||
},
|
||||
...commonContracts,
|
||||
},
|
||||
[MAINNET_ID]: {
|
||||
pairs: {
|
||||
"BAT-WETH": "0xB6909B960DbbE7392D405429eB2b3649752b4838",
|
||||
"COMP-WETH": "0xCFfDdeD873554F362Ac02f8Fb1f02E5ada10516f",
|
||||
"DAI-WETH": "0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11",
|
||||
"LEND-WETH": "0xaB3F9bF1D81ddb224a2014e98B238638824bCf20",
|
||||
"LINK-WETH": "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974",
|
||||
"MKR-WETH": "0xC2aDdA861F89bBB333c90c492cB837741916A225",
|
||||
"USDC-WETH": "0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc",
|
||||
"USDC-USDT": "0x3041CbD36888bECc7bbCBc0045E3B1f144466f5f",
|
||||
"WBTC-WETH": "0xBb2b8038a1640196FbE3e38816F3e67Cba72D940",
|
||||
"WETH-AMPL": "0xc5be99A02C6857f9Eac67BbCE58DF5572498F40c",
|
||||
},
|
||||
tokens: {
|
||||
AMPL: "0xD46bA6D942050d489DBd938a2C909A5d5039A161",
|
||||
BAT: "0x0D8775F648430679A709E98d2b0Cb6250d2887EF",
|
||||
COMP: "0xc00e94Cb662C3520282E6f5717214004A7f26888",
|
||||
DAI: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
|
||||
LEND: "0x80fB784B7eD66730e8b1DBd9820aFD29931aab03",
|
||||
LINK: "0x514910771AF9Ca656af840dff83E8264EcF986CA",
|
||||
MKR: "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2",
|
||||
USDC: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
||||
USDT: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
||||
wBTC: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
|
||||
WETH: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
||||
},
|
||||
...commonContracts,
|
||||
},
|
||||
[RINKEBY_ID]: {
|
||||
pairs: {
|
||||
"DAI-WETH": "0x8B22F85d0c844Cf793690F6D9DFE9F11Ddb35449",
|
||||
},
|
||||
tokens: {
|
||||
DAI: "0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735",
|
||||
WETH: "0xc778417E063141139Fce010982780140Aa0cD5Ab",
|
||||
},
|
||||
...commonContracts,
|
||||
},
|
||||
[ROPSTEN_ID]: {
|
||||
pairs: {
|
||||
"DAI-WETH": "0x1c5DEe94a34D795f9EEeF830B68B80e44868d316",
|
||||
},
|
||||
tokens: {
|
||||
DAI: "0xaD6D458402F60fD3Bd25163575031ACDce07538D",
|
||||
WETH: "0xc778417E063141139Fce010982780140Aa0cD5Ab",
|
||||
},
|
||||
...commonContracts,
|
||||
},
|
||||
};
|
||||
export default addresses;
|
||||
|
||||
Reference in New Issue
Block a user