generated from project-kardeshev/ao-lua-process-template
-
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.
Merge pull request #8 from ar-io/fix-evolve
Fix evolve
- Loading branch information
Showing
2 changed files
with
9 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
import { AOProcess, createAoSigner } from '@ar.io/sdk'; | ||
import { BUNDLED_AOS_LUA } from './constants'; | ||
import { AOProcess, createAoSigner, ArweaveSigner } from '@ar.io/sdk'; | ||
import { BUNDLED_AOS_LUA } from './constants.js'; | ||
import process from 'process'; | ||
|
||
const registryId = process.env.REGISTRY_ID; | ||
const wallet = JSON.parse(process.env.WALLET); | ||
const process = new AOProcess({ processId: registryId }); | ||
|
||
const registry = new AOProcess({ processId: registryId }); | ||
|
||
const signer = createAoSigner(new ArweaveSigner(wallet)); | ||
|
||
const evolveResult = await process.send({ | ||
const evolveResult = await registry.send({ | ||
tags: [{ name: 'Action', value: 'Eval' }], | ||
data: BUNDLED_AOS_LUA, | ||
signer, | ||
}); | ||
console.log(`Evolve result: ${evolveResult}`); | ||
console.log(`Evolve result: ${JSON.stringify(evolveResult)}`); |