Eden subgraph artifacts, host API stub (#15)

* Skip AssemblyScript during TS transpilation

* Eden subgraph build files

* Eden subgraph host API stubs
This commit is contained in:
Ashwin Phatak
2021-12-28 16:08:04 +05:30
committed by nabarun
parent 9e6f6b4519
commit f078db688a
11 changed files with 2661 additions and 20 deletions
+24
View File
@@ -0,0 +1,24 @@
//
// Copyright 2021 Vulcanize, Inc.
//
import path from 'path';
import { instantiate } from './index';
describe('eden wasm loader tests', () => {
it('should load the subgraph network wasm', async () => {
const filePath = path.resolve(__dirname, '../test/subgraph/eden/EdenNetwork/EdenNetwork.wasm');
await instantiate(filePath);
});
it('should load the subgraph network distribution wasm', async () => {
const filePath = path.resolve(__dirname, '../test/subgraph/eden/EdenNetworkDistribution/EdenNetworkDistribution.wasm');
await instantiate(filePath);
});
it('should load the subgraph network governance wasm', async () => {
const filePath = path.resolve(__dirname, '../test/subgraph/eden/EdenNetworkGovernance/EdenNetworkGovernance.wasm');
await instantiate(filePath);
});
});
+25 -19
View File
@@ -20,28 +20,28 @@ const imports = {
'typeConversion.bytesToHex': () => {
console.log('typeConversion.bytesToHex');
},
'typeConversion.bytesToString': () => {
console.log('typeConversion.bytesToString');
},
// 'typeConversion.bytesToString': () => {
// console.log('typeConversion.bytesToString');
// },
'typeConversion.bigIntToString': () => {
console.log('typeConversion.bigIntToString');
},
'bigDecimal.fromString': () => {
console.log('bigDecimal.fromString');
},
'bigDecimal.times': () => {
console.log('bigDecimal.times');
},
// 'bigDecimal.fromString': () => {
// console.log('bigDecimal.fromString');
// },
// 'bigDecimal.times': () => {
// console.log('bigDecimal.times');
// },
'bigDecimal.dividedBy': () => {
console.log('bigDecimal.dividedBy');
},
'bigDecimal.plus': () => {
console.log('bigDecimal.plus');
},
'bigDecimal.minus': () => {
console.log('bigDecimal.minus');
},
// 'bigDecimal.plus': () => {
// console.log('bigDecimal.plus');
// },
// 'bigDecimal.minus': () => {
// console.log('bigDecimal.minus');
// },
'bigInt.plus': () => {
console.log('bigInt.plus');
@@ -55,16 +55,22 @@ const imports = {
'bigInt.dividedBy': () => {
console.log('bigInt.dividedBy');
},
'bigInt.mod': () => {
console.log('bigInt.mod');
// 'bigInt.mod': () => {
// console.log('bigInt.mod');
// },
'bigInt.fromString': () => {
console.log('bigInt.fromString');
},
'log.log': () => {
console.log('log.log');
},
'dataSource.create': () => {
console.log('dataSource.create');
// 'dataSource.create': () => {
// console.log('dataSource.create');
// },
'dataSource.address': () => {
console.log('dataSource.address');
}
},
ethereum: {