diff --git a/src/app/page.tsx b/src/app/page.tsx index 1e2fa78..cab923f 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -42,7 +42,7 @@ export default function Page() { ) : ( )} diff --git a/src/components/TransactionWrapper.test.tsx b/src/components/TransactionWrapper.test.tsx index 18e1399..14f3b3a 100644 --- a/src/components/TransactionWrapper.test.tsx +++ b/src/components/TransactionWrapper.test.tsx @@ -36,7 +36,7 @@ const renderWithProviders = (component: JSX.Element) => { describe('TransactionWrapper', () => { it('should renders', () => { renderWithProviders(); - const transaction = screen.getByText('Collect'); + const transaction = screen.getByText('Transact'); expect(transaction).toBeInTheDocument(); }); }); diff --git a/src/components/TransactionWrapper.tsx b/src/components/TransactionWrapper.tsx index a83e848..286a06f 100644 --- a/src/components/TransactionWrapper.tsx +++ b/src/components/TransactionWrapper.tsx @@ -11,16 +11,10 @@ import type { TransactionResponse, } from '@coinbase/onchainkit/transaction'; import type { Address, ContractFunctionParameters } from 'viem'; -import { parseEther } from 'viem'; import { BASE_SEPOLIA_CHAIN_ID, - collectionAddress, - comment, - mintABI, - mintContractAddress, - mintReferral, - quantity, - tokenId, + clickContractABI, + clickContractAddress, } from '../constants'; type TransactionWrapperParams = { @@ -30,22 +24,12 @@ type TransactionWrapperParams = { export default function TransactionWrapper({ address, }: TransactionWrapperParams) { - const mintTo = address; - const contracts = [ { - address: mintContractAddress, - abi: mintABI, - functionName: 'mint', - args: [ - mintTo, - BigInt(quantity), - collectionAddress, - BigInt(tokenId), - mintReferral, - comment, - ], - value: parseEther('0.000111'), + address: clickContractAddress, + abi: clickContractABI, + functionName: 'click', + args: [], }, ] as unknown as ContractFunctionParameters[]; @@ -67,10 +51,7 @@ export default function TransactionWrapper({ onError={handleError} onSuccess={handleSuccess} > - + diff --git a/src/constants.ts b/src/constants.ts index 361c053..f902513 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,5 +1,18 @@ export const BASE_SEPOLIA_CHAIN_ID = 84532; +export const clickContractAddress = + '0x67c97D1FB8184F038592b2109F854dfb09C77C75'; + +export const clickContractABI = [ + { + type: 'function', + name: 'click', + inputs: [], + outputs: [], + stateMutability: 'nonpayable', + }, +] as const; + export const collectionAddress = '0xd6915560d3bb24aec04dc42ef409921ed1931510'; export const comment = 'testing'; export const mintContractAddress = '0x777777722D078c97c6ad07d9f36801e653E356Ae';