Proxy support, use IVault instead of Vault
This commit is contained in:
9
abi.js
9
abi.js
@@ -41,7 +41,14 @@ export async function getAbi(className) {
|
|||||||
let found = abi[className]
|
let found = abi[className]
|
||||||
if (found === undefined) {
|
if (found === undefined) {
|
||||||
console.log('warning: loading ABI from filesystem for '+className)
|
console.log('warning: loading ABI from filesystem for '+className)
|
||||||
const data = await readFile(ABI_BASE_PATH + `/${className}.sol/${className}.json`)
|
// const data = await readFile(ABI_BASE_PATH + `/${className}.sol/${className}.json`)
|
||||||
|
let data
|
||||||
|
try {
|
||||||
|
data = await readFile(ABI_BASE_PATH + `/I${className}.sol/I${className}.json`)
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
data = await readFile(ABI_BASE_PATH + `/${className}.sol/${className}.json`)
|
||||||
|
}
|
||||||
found = JSON.parse(data.toString())['abi']
|
found = JSON.parse(data.toString())['abi']
|
||||||
abi[className] = found
|
abi[className] = found
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user