renaming in tools directory
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable */
|
||||
import Arweave from 'arweave';
|
||||
import {LoggerFactory, SmartWeaveNodeFactory} from '../src';
|
||||
import {LoggerFactory, WarpNodeFactory} from '../src';
|
||||
import {TsLogFactory} from '../src/logging/node/TsLogFactory';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
@@ -18,28 +18,28 @@ async function main() {
|
||||
});
|
||||
|
||||
try {
|
||||
const smartweave = SmartWeaveNodeFactory.memCached(arweave);
|
||||
const warp = WarpNodeFactory.memCached(arweave);
|
||||
|
||||
const jsContractSrc = fs.readFileSync(path.join(__dirname, 'data/js/token-pst.js'), 'utf8');
|
||||
const wasmContractSrc = fs.readFileSync(path.join(__dirname, 'data/rust/rust-pst_bg.wasm'));
|
||||
const initialState = fs.readFileSync(path.join(__dirname, 'data/js/token-pst.json'), 'utf8');
|
||||
|
||||
// case 1 - full deploy, js contract
|
||||
const contractTxId = await smartweave.createContract.deploy({
|
||||
const contractTxId = await warp.createContract.deploy({
|
||||
wallet,
|
||||
initState: initialState,
|
||||
src: jsContractSrc,
|
||||
}, true);
|
||||
|
||||
// case 2 - deploy from source, js contract
|
||||
/*const contractTxId = await smartweave.createContract.deployFromSourceTx({
|
||||
/*const contractTxId = await warp.createContract.deployFromSourceTx({
|
||||
wallet,
|
||||
initState: initialState,
|
||||
srcTxId: "Hj0S0iK5rG8yVf_5u-usb9vRZg1ZFkylQLXu6rcDt-0",
|
||||
}, true);*/
|
||||
|
||||
// case 3 - full deploy, wasm contract
|
||||
/*const contractTxId = await smartweave.createContract.deploy({
|
||||
/*const contractTxId = await warp.createContract.deploy({
|
||||
wallet,
|
||||
initState: initialState,
|
||||
src: wasmContractSrc,
|
||||
@@ -48,13 +48,13 @@ async function main() {
|
||||
}, true);*/
|
||||
|
||||
// case 4 - deploy from source, wasm contract
|
||||
/*const contractTxId = await smartweave.createContract.deployFromSourceTx({
|
||||
/*const contractTxId = await warp.createContract.deployFromSourceTx({
|
||||
wallet,
|
||||
initState: initialState,
|
||||
srcTxId: "5wXT-A0iugP9pWEyw-iTbB0plZ_AbmvlNKyBfGS3AUY",
|
||||
}, true);*/
|
||||
|
||||
const contract = smartweave.contract(contractTxId).connect(wallet);
|
||||
const contract = warp.contract(contractTxId).connect(wallet);
|
||||
|
||||
await contract.bundleInteraction<any>({
|
||||
function: "storeBalance",
|
||||
|
||||
Reference in New Issue
Block a user