Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,32 @@ npm run dev
### Frontend Configuration (`frontend/.env`)
```.env
#Ethereum Sepolia (11155111)
VITE_CONTRACT_ADDRESS_11155111=0x54a542dCDC306eE281b5De4613EcEfe6e6ABc562
#Ethereum Classic (61)
VITE_CONTRACT_ADDRESS_61=0xD044A85a5daC307217B9bF313A90E8a60AF7DdCe
#Polygon Mainnet (137)
VITE_CONTRACT_ADDRESS_137=0xD044A85a5daC307217B9bF313A90E8a60AF7DdCe
VITE_CONTRACT_ADDRESS_11155111=0x7bC4C5abb5b1B8355Aa65307C1cFDbe6254505d2
#Ethereum Classic (61) — blank until redeployed, see note below
VITE_CONTRACT_ADDRESS_61=
#Polygon Mainnet (137) — blank until redeployed, see note below
VITE_CONTRACT_ADDRESS_137=
#Project ID
VITE_WALLETCONNECT_PROJECT_ID=Your Project ID can be obtained from https://dashboard.reown.com/
```

> ⚠️ Ethereum Classic and Polygon are left blank on purpose. Both still run the
> v1 contract, which stores invoice payloads on-chain as strings and has no
> public key registry, so it does not match the current ABI. The app treats any
> non-empty address as supported, so filling these in would send calls those
> contracts cannot decode. Populate them only after redeploying.
> ⚠️ **Security Note:** Never commit `.env` files to version control. Keep your private keys secure.

## Deployed Contracts

### Current (hash-based invoice storage)
Stores only `keccak256` of the invoice data on-chain and exposes the public key
registry. This is the deployment the frontend is configured against.
- Ethereum Sepolia (11155111)
```0x7bC4C5abb5b1B8355Aa65307C1cFDbe6254505d2```

### v1 (Mainnet Deployment — Jan 1)
Stores the invoice payload on-chain as strings. Superseded, kept for reference.
- Ethereum Sepolia (11155111)
```0x54a542dCDC306eE281b5De4613EcEfe6e6ABc562```
- Ethereum Classic (61)
Expand Down
11 changes: 8 additions & 3 deletions frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# env-copy

#Ethereum Sepolia (11155111)
VITE_CONTRACT_ADDRESS_11155111=0x54a542dCDC306eE281b5De4613EcEfe6e6ABc562
VITE_CONTRACT_ADDRESS_11155111=0x7bC4C5abb5b1B8355Aa65307C1cFDbe6254505d2

# Left blank deliberately. Both chains still run the v1 contract, which stores
# invoice payloads on-chain as strings and has no public key registry, so it
# does not match this ABI. The app treats any non-empty address as a supported
# network, so filling these in would send bytes32-encoded calls to a contract
# that cannot decode them. Populate them only after redeploying.
# Ethereum Classic (61)
VITE_CONTRACT_ADDRESS_61=0xD044A85a5daC307217B9bF313A90E8a60AF7DdCe
VITE_CONTRACT_ADDRESS_61=

# Polygon Mainnet (137)
VITE_CONTRACT_ADDRESS_137=0xD044A85a5daC307217B9bF313A90E8a60AF7DdCe
VITE_CONTRACT_ADDRESS_137=

VITE_WALLETCONNECT_PROJECT_ID=
11 changes: 8 additions & 3 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,17 @@ The frontend reads Vite environment variables from `.env`.
The provided `.env.example` includes deployed contract addresses for supported networks and the WalletConnect project ID placeholder:

```env
VITE_CONTRACT_ADDRESS_11155111=0x54a542dCDC306eE281b5De4613EcEfe6e6ABc562
VITE_CONTRACT_ADDRESS_61=0xD044A85a5daC307217B9bF313A90E8a60AF7DdCe
VITE_CONTRACT_ADDRESS_137=0xD044A85a5daC307217B9bF313A90E8a60AF7DdCe
VITE_CONTRACT_ADDRESS_11155111=0x7bC4C5abb5b1B8355Aa65307C1cFDbe6254505d2
VITE_CONTRACT_ADDRESS_61=
VITE_CONTRACT_ADDRESS_137=
VITE_WALLETCONNECT_PROJECT_ID=
```

> ⚠️ Ethereum Classic and Polygon are left blank on purpose. Both still run the
> v1 contract, which does not match the current ABI. The app treats any
> non-empty address as supported, so filling these in would send calls those
> contracts cannot decode. Populate them only after redeploying.

To enable Web3 wallet functionality, create a free WalletConnect Project ID from the Reown dashboard:

```text
Expand Down
85 changes: 18 additions & 67 deletions frontend/src/contractsABI/ChainvoiceABI.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,9 @@ export const ChainvoiceABI = [
"internalType": "address"
},
{
"name": "encryptedInvoiceData",
"type": "string",
"internalType": "string"
},
{
"name": "encryptedHash",
"type": "string",
"internalType": "string"
"name": "invoiceDataHash",
"type": "bytes32",
"internalType": "bytes32"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
],
"outputs": [],
Expand All @@ -110,14 +105,9 @@ export const ChainvoiceABI = [
"internalType": "address"
},
{
"name": "encryptedPayloads",
"type": "string[]",
"internalType": "string[]"
},
{
"name": "encryptedHashes",
"type": "string[]",
"internalType": "string[]"
"name": "invoiceDataHashes",
"type": "bytes32[]",
"internalType": "bytes32[]"
}
],
"outputs": [],
Expand Down Expand Up @@ -188,14 +178,9 @@ export const ChainvoiceABI = [
"internalType": "bool"
},
{
"name": "encryptedInvoiceData",
"type": "string",
"internalType": "string"
},
{
"name": "encryptedHash",
"type": "string",
"internalType": "string"
"name": "invoiceDataHash",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
Expand Down Expand Up @@ -288,14 +273,9 @@ export const ChainvoiceABI = [
"internalType": "bool"
},
{
"name": "encryptedInvoiceData",
"type": "string",
"internalType": "string"
},
{
"name": "encryptedHash",
"type": "string",
"internalType": "string"
"name": "invoiceDataHash",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
Expand Down Expand Up @@ -354,14 +334,9 @@ export const ChainvoiceABI = [
"internalType": "bool"
},
{
"name": "encryptedInvoiceData",
"type": "string",
"internalType": "string"
},
{
"name": "encryptedHash",
"type": "string",
"internalType": "string"
"name": "invoiceDataHash",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
Expand Down Expand Up @@ -447,14 +422,9 @@ export const ChainvoiceABI = [
"internalType": "bool"
},
{
"name": "encryptedInvoiceData",
"type": "string",
"internalType": "string"
},
{
"name": "encryptedHash",
"type": "string",
"internalType": "string"
"name": "invoiceDataHash",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
Expand Down Expand Up @@ -611,25 +581,6 @@ export const ChainvoiceABI = [
],
"stateMutability": "view"
},
{
"type": "function",
"name": "wakuPublicKeys",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bytes",
"internalType": "bytes"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "withdrawFees",
Expand Down
Loading