Skip to content

Commit

Permalink
⬆️ Update ponder to 0.6.17
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Oct 22, 2024
1 parent b997b43 commit 92c70e1
Show file tree
Hide file tree
Showing 8 changed files with 587 additions and 566 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"typecheck": "tsc"
},
"devDependencies": {
"@biomejs/biome": "1.9.3",
"@biomejs/biome": "1.9.4",
"@types/aws-lambda": "8.10.138",
"@types/node": "^22.5.4",
"aws-cdk-lib": "2.142.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/erpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"typecheck": "tsc"
},
"devDependencies": {
"@biomejs/biome": "1.9.3",
"@biomejs/biome": "1.9.4",
"@konfeature/erpc-config-generator": "0.0.12",
"@types/aws-lambda": "8.10.138",
"@types/node": "^22.4.0",
"aws-cdk-lib": "2.142.1",
"sst": "2.43.6",
"typescript": "^5.6.3",
"viem": "^2.21.25"
"viem": "^2.21.32"
},
"engines": {
"node": ">=18.14"
Expand Down
6 changes: 3 additions & 3 deletions packages/ponder/config/config-local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { createEnvConfig } from "./configBuilder";
*/
export default createEnvConfig({
network: {
chainId: 421614,
deploymentBlock: 86607902,
chainId: 42161,
deploymentBlock: 261367992,
},
networkKey: "arbitrumSepolia",
networkKey: "arbitrum",
});
8 changes: 4 additions & 4 deletions packages/ponder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"typecheck": "tsc"
},
"dependencies": {
"@ponder/core": "0.6.11",
"@ponder/core": "0.6.17",
"drizzle-orm": "^0.31.4",
"hono": "^4.6.4",
"viem": "^2.21.25"
"hono": "^4.6.6",
"viem": "^2.21.32"
},
"devDependencies": {
"@biomejs/biome": "1.9.3",
"@biomejs/biome": "1.9.4",
"@types/aws-lambda": "8.10.138",
"@types/node": "^22.4.0",
"aws-cdk-lib": "2.142.1",
Expand Down
1 change: 1 addition & 0 deletions packages/ponder/src/api/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ ponder.get("/admin/:wallet/campaigns", async (ctx) => {
isOwner: ProductAdministrator.isOwner,
roles: ProductAdministrator.roles,
id: Campaign.id,
type: Campaign.type,
name: Campaign.name,
version: Campaign.version,
attached: Campaign.attached,
Expand Down
6 changes: 4 additions & 2 deletions packages/ponder/src/campaign/campaignCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ ponder.on("CampaignsFactory:CampaignCreated", async ({ event, context }) => {
linkResult.status !== "success"
) {
console.error(
`Failed to get metadata/linkResult for campaign ${event.args.campaign}`
`Failed to get metadata/linkResult for campaign ${event.args.campaign}`,
{ event }
);
return;
}
const [type, version, name] = metadataResult.result;
const [productId, interactionContract] = linkResult.result;
const formattedName = bytesToString(name);

// Create the campaign
await Campaign.create({
id: event.args.campaign,
data: {
type,
name: bytesToString(name),
name: formattedName,
version,
productId,
interactionContractId: interactionContract,
Expand Down
5 changes: 3 additions & 2 deletions packages/ponder/src/campaign/campaignInteractionLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as console from "node:console";
import { ponder } from "@/generated";
import { interactionCampaignAbi } from "../../abis/campaignAbis";
import { emptyCampaignStats } from "../interactions/stats";
import { bytesToString } from "../utils/format";

ponder.on("ProductInteraction:CampaignAttached", async ({ event, context }) => {
const { Campaign, ProductInteractionContract, ReferralCampaignStats } =
Expand All @@ -17,7 +18,7 @@ ponder.on("ProductInteraction:CampaignAttached", async ({ event, context }) => {
}

// Get the metadata and create it
const [name, version] = await context.client.readContract({
const [, version, name] = await context.client.readContract({
abi: interactionCampaignAbi,
address: event.args.campaign,
functionName: "getMetadata",
Expand All @@ -32,7 +33,7 @@ ponder.on("ProductInteraction:CampaignAttached", async ({ event, context }) => {
await Campaign.update({
id: event.args.campaign,
data: {
name,
name: bytesToString(name),
version,
attached: true,
attachTimestamp: event.block.timestamp,
Expand Down
Loading

0 comments on commit 92c70e1

Please sign in to comment.