separb beta
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {ethers} from "ethers";
|
||||
import {AbiURLCache} from "../common.js";
|
||||
import {provider as walletProvider} from "@/blockchain/wallet.js";
|
||||
|
||||
export const abiCache = new AbiURLCache('/contract/out/')
|
||||
|
||||
@@ -39,6 +40,8 @@ export async function erc20Contract(addr, provider) {
|
||||
}
|
||||
|
||||
|
||||
export async function vaultContract(addr, provider) {
|
||||
export async function vaultContract(addr, provider=null) {
|
||||
if (provider===null)
|
||||
provider = walletProvider
|
||||
return await newContract(addr, 'IVault', provider)
|
||||
}
|
||||
|
||||
@@ -167,24 +167,6 @@ export async function switchChain(chainId) {
|
||||
}
|
||||
|
||||
|
||||
export async function addTestnet() {
|
||||
const info = {
|
||||
"chainId": "0x539",
|
||||
"chainName": "Dexorder Alpha Testnet",
|
||||
"rpcUrls": ["https://rpc.alpha.dexorder.trade"],
|
||||
"nativeCurrency": {
|
||||
"name": "Test Ethereum",
|
||||
"symbol": "TETH",
|
||||
"decimals": 18
|
||||
}
|
||||
};
|
||||
await window.ethereum.request({
|
||||
"method": "wallet_addEthereumChain",
|
||||
"params": [info]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function discoverVaults(owner) {
|
||||
const s = useStore()
|
||||
console.log('discoverVaults', owner)
|
||||
|
||||
Reference in New Issue
Block a user