From 447a0ba09e04ec9cca812f0e1eee6d2cfe283e5a Mon Sep 17 00:00:00 2001 From: mmackz Date: Fri, 14 Mar 2025 12:01:02 -0700 Subject: [PATCH 1/4] chore: generate changeset --- .changeset/wet-windows-grab.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/wet-windows-grab.md diff --git a/.changeset/wet-windows-grab.md b/.changeset/wet-windows-grab.md new file mode 100644 index 000000000..b57fdeda6 --- /dev/null +++ b/.changeset/wet-windows-grab.md @@ -0,0 +1,8 @@ +--- +"@rabbitholegg/questdk-plugin-coop": patch +"@rabbitholegg/questdk-plugin-fabric": patch +"@rabbitholegg/questdk-plugin-okutrade": patch +"@rabbitholegg/questdk-plugin-registry": patch +--- + +re-release with fixed tests From 0ab6e8bdb98463da03fcc979d725718ed14f9eff Mon Sep 17 00:00:00 2001 From: mmackz Date: Fri, 14 Mar 2025 12:07:09 -0700 Subject: [PATCH 2/4] test(manifold): increase timeout for mint intent tests --- packages/manifold/src/Manifold.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/manifold/src/Manifold.test.ts b/packages/manifold/src/Manifold.test.ts index 22628feaf..e33829213 100644 --- a/packages/manifold/src/Manifold.test.ts +++ b/packages/manifold/src/Manifold.test.ts @@ -115,7 +115,7 @@ describe('Given the getMintIntent function', () => { to: mint.contractAddress, data: '0x26c858a40000000000000000000000006ecbe1db9ef729cbe972c83fb886247691fb6beb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', }) - }) + }, { timeout: 7000 }) test('returns a TransactionRequest when amount is 1 or undefined', async () => { const mint: MintIntentParams = { @@ -131,7 +131,7 @@ describe('Given the getMintIntent function', () => { to: mint.contractAddress, data: '0xfa2b068f0000000000000000000000006ecbe1db9ef729cbe972c83fb886247691fb6beb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000012345678901234567890123456789012345678900000000000000000000000000000000000000000000000000000000000000000', }) - }) + }, { timeout: 7000 }) }) describe('Given the getFee function', () => { @@ -252,5 +252,5 @@ describe('getExternalUrl function', () => { } const result = await getExternalUrl(mint) expect(result).toBe('https://app.manifold.xyz/') - }) + }, { timeout: 7000 }) }) From d07f69d93055029c85c81a0441644caea34e6fda Mon Sep 17 00:00:00 2001 From: mmackz <62824345+mmackz@users.noreply.github.com> Date: Fri, 14 Mar 2025 19:07:56 +0000 Subject: [PATCH 3/4] chore: format --- packages/manifold/src/Manifold.test.ts | 90 +++++++++++++++----------- 1 file changed, 52 insertions(+), 38 deletions(-) diff --git a/packages/manifold/src/Manifold.test.ts b/packages/manifold/src/Manifold.test.ts index e33829213..7b55faf0b 100644 --- a/packages/manifold/src/Manifold.test.ts +++ b/packages/manifold/src/Manifold.test.ts @@ -101,37 +101,45 @@ describe('Given the getMintIntent function', () => { const CONTRACT_ADDRESS = '0x6Ecbe1DB9EF729CBe972C83Fb886247691Fb6beb' const RECIPIENT_ADDRESS = '0x1234567890123456789012345678901234567890' - test('returns a TransactionRequest with correct properties when amount is set greater than 1', async () => { - const mint: MintIntentParams = { - chainId: 1, - tokenId: 1, - contractAddress: CONTRACT_ADDRESS, - amount: BigInt('2'), - recipient: RECIPIENT_ADDRESS, - } - const result = await getMintIntent(mint) - expect(result).toEqual({ - from: mint.recipient, - to: mint.contractAddress, - data: '0x26c858a40000000000000000000000006ecbe1db9ef729cbe972c83fb886247691fb6beb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', - }) - }, { timeout: 7000 }) + test( + 'returns a TransactionRequest with correct properties when amount is set greater than 1', + async () => { + const mint: MintIntentParams = { + chainId: 1, + tokenId: 1, + contractAddress: CONTRACT_ADDRESS, + amount: BigInt('2'), + recipient: RECIPIENT_ADDRESS, + } + const result = await getMintIntent(mint) + expect(result).toEqual({ + from: mint.recipient, + to: mint.contractAddress, + data: '0x26c858a40000000000000000000000006ecbe1db9ef729cbe972c83fb886247691fb6beb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + }) + }, + { timeout: 7000 }, + ) - test('returns a TransactionRequest when amount is 1 or undefined', async () => { - const mint: MintIntentParams = { - chainId: 1, - tokenId: 1, - amount: BigInt('1'), - contractAddress: CONTRACT_ADDRESS, - recipient: RECIPIENT_ADDRESS, - } - const result = await getMintIntent(mint) - expect(result).toEqual({ - from: mint.recipient, - to: mint.contractAddress, - data: '0xfa2b068f0000000000000000000000006ecbe1db9ef729cbe972c83fb886247691fb6beb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000012345678901234567890123456789012345678900000000000000000000000000000000000000000000000000000000000000000', - }) - }, { timeout: 7000 }) + test( + 'returns a TransactionRequest when amount is 1 or undefined', + async () => { + const mint: MintIntentParams = { + chainId: 1, + tokenId: 1, + amount: BigInt('1'), + contractAddress: CONTRACT_ADDRESS, + recipient: RECIPIENT_ADDRESS, + } + const result = await getMintIntent(mint) + expect(result).toEqual({ + from: mint.recipient, + to: mint.contractAddress, + data: '0xfa2b068f0000000000000000000000006ecbe1db9ef729cbe972c83fb886247691fb6beb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000012345678901234567890123456789012345678900000000000000000000000000000000000000000000000000000000000000000', + }) + }, + { timeout: 7000 }, + ) }) describe('Given the getFee function', () => { @@ -245,12 +253,18 @@ describe('getExternalUrl function', () => { expect(result).toBe('https://app.manifold.xyz/c/girls-man') }) - test('should return the fallback url for an unknown contract', async () => { - const mint = { - chainId: Chains.OPTIMISM, - contractAddress: getAddress('0x7935cd348193bab133f3081f53eb99ee6f0d685b'), - } - const result = await getExternalUrl(mint) - expect(result).toBe('https://app.manifold.xyz/') - }, { timeout: 7000 }) + test( + 'should return the fallback url for an unknown contract', + async () => { + const mint = { + chainId: Chains.OPTIMISM, + contractAddress: getAddress( + '0x7935cd348193bab133f3081f53eb99ee6f0d685b', + ), + } + const result = await getExternalUrl(mint) + expect(result).toBe('https://app.manifold.xyz/') + }, + { timeout: 7000 }, + ) }) From 1a4879b71601ddb9d6edca31b03bec1e619dd8c6 Mon Sep 17 00:00:00 2001 From: mmackz Date: Fri, 14 Mar 2025 12:08:42 -0700 Subject: [PATCH 4/4] chore: add questdk-plugin-manifold to changeset --- .changeset/wet-windows-grab.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/wet-windows-grab.md b/.changeset/wet-windows-grab.md index b57fdeda6..c7ba82bd6 100644 --- a/.changeset/wet-windows-grab.md +++ b/.changeset/wet-windows-grab.md @@ -1,6 +1,7 @@ --- "@rabbitholegg/questdk-plugin-coop": patch "@rabbitholegg/questdk-plugin-fabric": patch +"@rabbitholegg/questdk-plugin-manifold": patch "@rabbitholegg/questdk-plugin-okutrade": patch "@rabbitholegg/questdk-plugin-registry": patch ---