Skip to content

Commit

Permalink
fix(spawn): update spawn to use ant registry id in the tags
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Aug 1, 2024
1 parent 1c12188 commit 28dae7f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/utils/ao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { defaultArweave } from '../common/arweave.js';
import { AOProcess } from '../common/index.js';
import {
ANT_LUA_ID,
ANT_REGISTRY_ID,
AOS_MODULE_ID,
DEFAULT_SCHEDULER_ID,
} from '../constants.js';
Expand All @@ -35,6 +36,7 @@ export async function spawnANT({
scheduler = DEFAULT_SCHEDULER_ID,
state,
stateContractTxId,
antRegistryId = ANT_REGISTRY_ID,
}: {
signer: AoSigner;
module?: string;
Expand All @@ -43,6 +45,7 @@ export async function spawnANT({
scheduler?: string;
state?: ANTState;
stateContractTxId?: string;
antRegistryId?: string;
}): Promise<string> {
//TODO: cache locally and only fetch if not cached
const luaString = (await defaultArweave.transactions.getData(luaCodeTxId, {
Expand All @@ -54,6 +57,12 @@ export async function spawnANT({
module,
scheduler,
signer,
tags: [
{
name: 'ANT-Registry-Id',
value: antRegistryId,
},
],
});

const aosClient = new AOProcess({
Expand Down

0 comments on commit 28dae7f

Please sign in to comment.