Skip to content
Open
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
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ npm run dev

Client: http://localhost:5173
Server API: http://localhost:4000/api

## Frontend quickstart (CashflowVaults dashboard)

This repo includes a Next.js App Router dashboard at `/cashflow` for the Avalanche Fuji CashflowVaults deployment.

```bash
# install frontend dependencies if needed
npm install

# run next dev server (if your setup uses a dedicated Next command)
npm run next:dev
```

Then open: `http://localhost:3000/cashflow`.

> Note: if your local scripts currently run the Vite + Express demo, add/use a Next.js dev script that starts this app directory.
5 changes: 5 additions & 0 deletions app/cashflow/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import CashflowDashboard from "@/components/CashflowDashboard";

export default function CashflowPage() {
return <CashflowDashboard />;
}
190 changes: 190 additions & 0 deletions app/lib/abi/CashflowSchedule.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
[
{
"type": "constructor",
"inputs": [
{
"name": "creator_",
"type": "address",
"internalType": "address"
},
{
"name": "vault_",
"type": "address",
"internalType": "address"
},
{
"name": "cadence_",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "paymentAmount_",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "startTime_",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "cadence",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "creator",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "end",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "lastPaymentTime",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "pause",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "pay",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "paymentAmount",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "resume",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "startTime",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "state",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint8",
"internalType": "enum CashflowSchedule.State"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "vault",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract CashflowVault"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "PaymentExecuted",
"inputs": [
{
"name": "creator",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "paymentTime",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "StateChanged",
"inputs": [
{
"name": "newState",
"type": "uint8",
"indexed": true,
"internalType": "enum CashflowSchedule.State"
}
],
"anonymous": false
}
]
Loading