Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Chang committed Oct 28, 2023
1 parent 125d4e0 commit 4e7ff9c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Binary file removed builds/smart-contract-hub-v1.tar.gz
Binary file not shown.
Binary file removed builds/smart-contract-hub-v2.tar.gz
Binary file not shown.
Binary file added builds/smart-contract-hub-v3.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion squid.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
manifestVersion: subsquid.io/v0.1
name: smart-contract-hub
version: 2
version: 3
description: "Smart contract hub for Aleph Zero."
build:
deploy:
Expand Down
30 changes: 15 additions & 15 deletions src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,21 @@ processor.run(new TypeormDatabase(), async (ctx) => {
}

// 3. Process group user events (needs to be done this way as group users can be destroyed)
const groupUserEvents = await extractGroupUserEvents(ctx);
for (const groupUserEvent of groupUserEvents) {
if (groupUserEvent.action == 'destroy') {
await ctx.store.remove(GroupUser, groupUserEvent.id);
} else {
await ctx.store.save(
new GroupUser({
id: groupUserEvent.id,
group: groupUserEvent.group,
accountId: groupUserEvent.accountId,
role: groupUserEvent.role,
}),
);
}
};
// const groupUserEvents = await extractGroupUserEvents(ctx);
// for (const groupUserEvent of groupUserEvents) {
// if (groupUserEvent.action == 'destroy') {
// await ctx.store.remove(GroupUser, groupUserEvent.id);
// } else {
// await ctx.store.save(
// new GroupUser({
// id: groupUserEvent.id,
// group: groupUserEvent.group,
// accountId: groupUserEvent.accountId,
// role: groupUserEvent.role,
// }),
// );
// }
// };

// 6. Create new smart contracts
const newSmartContracts = smartContracts.map((smartContract) => {
Expand Down

0 comments on commit 4e7ff9c

Please sign in to comment.