Skip to content

Commit

Permalink
(feat): update autotask scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jipperism committed Mar 26, 2024
1 parent 6be33d7 commit 7317623
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion defender/src/auto-tasks/batch-mint-claims-from-allowlists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ export async function handler(event: AutotaskEvent) {
console.log("ClaimIDs: ", claimIds.toString());

const formattedClaimIds = claimIds.map(
(claimId) => `${contractAddress}-${claimId.toString().toLowerCase()}`,
(claimId) =>
`${network.chainId}-${contractAddress}-${claimId
.toString()
.toLowerCase()}`,
);
console.log("Formatted claim ids", formattedClaimIds);

Expand Down
2 changes: 1 addition & 1 deletion defender/src/auto-tasks/mint-claim-from-allowlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export async function handler(event: AutotaskEvent) {
batchTransferEvents[0].args["claimIDs"][0].toString(),
);

const formattedClaimId = `${contractAddress}-${claimId
const formattedClaimId = `${network.chainId}-${contractAddress}-${claimId
.toString()
.toLowerCase()}`;
console.log("Formatted claim id", formattedClaimId);
Expand Down
2 changes: 1 addition & 1 deletion defender/src/auto-tasks/on-allowlist-created.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export async function handler(event: AutotaskEvent) {
console.log("addresses", addresses);
const data = addresses.map((address, index) => ({
address: address.toLowerCase(),
claimId: `${contractAddress}-${tokenId}`,
claimId: `${network.chainId}-${contractAddress}-${tokenId}`,
fractionCounter: index,
chainId: network.chainId,
}));
Expand Down

0 comments on commit 7317623

Please sign in to comment.