-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
254 additions
and
93 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
export const KUCOCOIN_ABI = [ | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "account", | ||
"type": "address" | ||
} | ||
], | ||
"name": "balanceOf", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "_receiver", | ||
"type": "address" | ||
} | ||
], | ||
"name": "claim", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "_receiver", | ||
"type": "address" | ||
} | ||
], | ||
"name": "getInvestedNatOf", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "getPoolReserves", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "reserveKuco", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "reserveNat", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "_receiver", | ||
"type": "address" | ||
} | ||
], | ||
"name": "invest", | ||
"outputs": [], | ||
"stateMutability": "payable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "_to", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "_amount", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "makeTransAction", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "nextPeriod", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint64", | ||
"name": "", | ||
"type": "uint64" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "reportPeriod", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "_receiver", | ||
"type": "address" | ||
} | ||
], | ||
"name": "retract", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { network } from "./network" | ||
import { avalancheforkMetamask, fujiMetamask, avalancheMetamask } from "./metamask" | ||
import { avalancheforkToken, fujiToken, avalancheToken } from "./token" | ||
|
||
let metamask = avalancheMetamask | ||
if (network === "fuji") { | ||
metamask = fujiMetamask | ||
} else if (network === "avalanchefork") { | ||
metamask = avalancheforkMetamask | ||
} | ||
|
||
let token = avalancheToken | ||
if (network === "fuji") { | ||
token = fujiToken | ||
} else if (network === "avalanchefork") { | ||
token = avalancheforkToken | ||
} | ||
|
||
export const config = { | ||
metamask: metamask, | ||
token: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
export const avalancheforkMetamask = { | ||
chainName: 'Avalanche Fork', | ||
chainId: '0x7a69', | ||
nativeCurrency: { | ||
name: 'AvalancheFork', | ||
decimals: 18, | ||
symbol: 'FAVAX' | ||
}, | ||
rpcUrls: ['http://127.0.0.1:8545/'] | ||
} | ||
|
||
export const fujiMetamask = { | ||
chainName: 'Fuji Network C-Chain', | ||
chainId: '0xa869', | ||
nativeCurrency: { | ||
name: 'FUJI', | ||
decimals: 18, | ||
symbol: 'FUJI' | ||
}, | ||
rpcUrls: ['https://api.avax-test.network/ext/bc/C/rpc'] | ||
} | ||
|
||
export const avalancheMetamask = { | ||
chainName: 'Avalanche Network C-Chain', | ||
chainId: '0xa86a', | ||
nativeCurrency: { | ||
name: 'AVAX', | ||
decimals: 18, | ||
symbol: 'AVAX' | ||
}, | ||
rpcUrls: ['https://api.avax.network/ext/bc/C/rpc'] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1 @@ | ||
const FUJI_KUCOCOIN_ADDRESS = "0x6424da4c62a3694CF8bE0Ec6cCd4144a9aBE6Ef4" | ||
const FUJI_UNISWAP_ROUTER_ADDRESS = "0xA9992b1Cc07C2338e325870ccFEE73127F3E2b71" | ||
|
||
const fuji = { | ||
metamask: { | ||
chainName: 'Fuji Network C-Chain', | ||
chainId: '0xa869', | ||
nativeCurrency: { | ||
name: 'FUJI', | ||
decimals: 18, | ||
symbol: 'FUJI' | ||
}, | ||
rpcUrls: ['https://api.avax-test.network/ext/bc/C/rpc'] | ||
}, | ||
kucocoin: FUJI_KUCOCOIN_ADDRESS, | ||
snowtrace: `https://testnet.snowtrace.io/address/${FUJI_KUCOCOIN_ADDRESS}/contract/43113/writeContract?chainId=43113`, | ||
uniswap: `https://testnet.snowtrace.io/address/${FUJI_UNISWAP_ROUTER_ADDRESS}/contract/43113/writeContract?chainId=43113#F10` | ||
} | ||
|
||
const avalanchefork = { | ||
metamask: { | ||
chainName: 'Avalanche Fork', | ||
chainId: '0x7a69', | ||
nativeCurrency: { | ||
name: 'AvalancheFork', | ||
decimals: 18, | ||
symbol: 'FAVAX' | ||
}, | ||
rpcUrls: ['http://127.0.0.1:8545/'] | ||
}, | ||
kucocoin: '0x1780bCf4103D3F501463AD3414c7f4b654bb7aFd', | ||
snowtrace: '', | ||
uniswap: '' | ||
} | ||
|
||
const avalanche = { | ||
metamask: { | ||
chainName: 'Avalanche Network C-Chain', | ||
chainId: '0xa86a', | ||
nativeCurrency: { | ||
name: 'AVAX', | ||
decimals: 18, | ||
symbol: 'AVAX' | ||
}, | ||
rpcUrls: ['https://avalanche-mainnet.infura.io'] | ||
} | ||
} | ||
|
||
export const NETWORK = fuji | ||
export const network: "avalanchefork" | "fuji" | "avalanche" = "avalanche" |
Oops, something went wrong.