diff --git a/.gitignore b/.gitignore index 1174f22..9ec70ab 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,4 @@ vendor/ .env # Codegen output (regenerated by `bun run wagmi:gen`, runs on prestart) -src/generated.ts \ No newline at end of file +src/blockchain/abi.ts \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 79ae7f7..d9c565e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,4 +5,4 @@ [submodule "zkPix"] path = zkPix url = https://git.p2pix.co/doiim/zkPix.git - branch = feat/fake-bb-sandbox + branch = dev diff --git a/package.json b/package.json index dae8e5a..6d980ea 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "lint:fix": "eslint . --fix", "format": "prettier --write \"src/**/*.{ts,vue,json}\"", "format:check": "prettier --check \"src/**/*.{ts,vue,json}\"", - "contracts:compile": "cd p2pix-smart-contracts && bun install && ALCHEMY_API_KEY=placeholder MNEMONIC='test test test test test test test test test test test junk' bunx hardhat compile", + "contracts:compile": "pushd p2pix-smart-contracts && bun install && ALCHEMY_API_KEY=placeholder MNEMONIC='test test test test test test test test test test test junk' bunx hardhat compile && popd", "prewagmi:gen": "bun run contracts:compile", "wagmi:gen": "bun ./node_modules/@wagmi/cli/dist/esm/cli.js generate" }, diff --git a/src/blockchain/events.ts b/src/blockchain/events.ts index 82f688f..9b8d19a 100644 --- a/src/blockchain/events.ts +++ b/src/blockchain/events.ts @@ -3,7 +3,7 @@ import { formatEther, toHex, stringToHex } from 'viem'; import type { PublicClient, Address } from 'viem'; import { Networks } from '@/config/networks'; import { getContract } from './provider'; -import { p2PixAbi } from '@/generated'; +import { p2PixAbi } from './abi'; import type { ValidDeposit } from '@/model/ValidDeposit'; import type { NetworkConfig } from '@/model/NetworkEnum'; import type { UnreleasedLock } from '@/model/UnreleasedLock'; diff --git a/src/blockchain/provider.ts b/src/blockchain/provider.ts index 01d4caa..56a41a4 100644 --- a/src/blockchain/provider.ts +++ b/src/blockchain/provider.ts @@ -1,4 +1,4 @@ -import { p2PixAbi } from '@/generated'; +import { p2PixAbi } from './abi'; import { updateWalletStatus } from './wallet'; import { createPublicClient, diff --git a/src/blockchain/sellerMethods.ts b/src/blockchain/sellerMethods.ts index c4c5c39..8253a59 100644 --- a/src/blockchain/sellerMethods.ts +++ b/src/blockchain/sellerMethods.ts @@ -1,6 +1,6 @@ import { getContract, getPublicClient, getWalletClient } from './provider'; import { parseEther, toHex, ChainContract } from 'viem'; -import { mockTokenAbi } from '@/generated'; +import { mockTokenAbi } from './abi'; import { useUser } from '@/composables/useUser'; import { createParticipant } from '@/utils/bbPay'; import type { Participant } from '@/utils/bbPay'; diff --git a/src/components/BuyerSteps/BuyerSearchComponent.vue b/src/components/BuyerSteps/BuyerSearchComponent.vue index 5404a28..a1d4680 100644 --- a/src/components/BuyerSteps/BuyerSearchComponent.vue +++ b/src/components/BuyerSteps/BuyerSearchComponent.vue @@ -12,7 +12,7 @@ import { onClickOutside } from '@vueuse/core'; import { Networks } from '@/config/networks'; import { TokenEnum } from '@/model/NetworkEnum'; import { getContract } from '@/blockchain/provider'; -import { reputationAbi } from '@/generated'; +import { reputationAbi } from '@/blockchain/abi'; import { type Address } from 'viem'; // Store reference diff --git a/wagmi.config.ts b/wagmi.config.ts index 4afd535..b3e620c 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -16,7 +16,7 @@ const loadAbi = (relPath: string) => { }; export default defineConfig({ - out: 'src/generated.ts', + out: 'src/blockchain/abi.ts', contracts: [ { name: 'P2Pix', abi: loadAbi('p2pix.sol/P2PIX.json') as never }, {