diff --git a/.github/workflows/ci_prod.yml b/.github/workflows/ci_prod.yml
index ea1ddf1..18c09e3 100755
--- a/.github/workflows/ci_prod.yml
+++ b/.github/workflows/ci_prod.yml
@@ -54,14 +54,16 @@ jobs:
- name: Install Vercel CLI
run: npm install -g vercel@latest
- - name: Pull Vercel Environment Information
- run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- working-directory: packages/fronts/solidr-front-next
+ # Disable deployment from ci because of issue
+ # https://github.com/vercel/vercel/issues/11097
+ # - name: Pull Vercel Environment Information
+ # run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
+ # working-directory: packages/fronts/solidr-front-next
- - name: Build Project Artifacts
- run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- working-directory: packages/fronts/solidr-front-next
+ # - name: Build Project Artifacts
+ # run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
+ # working-directory: packages/fronts/solidr-front-next
- - name: Deploy Project Artifacts Production to Vercel
- run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
- working-directory: packages/fronts/solidr-front-next
+ # - name: Deploy Project Artifacts Production to Vercel
+ # run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
+ # working-directory: packages/fronts/solidr-front-next
diff --git a/packages/fronts/solidr-front-next/src/app/layout.tsx b/packages/fronts/solidr-front-next/src/app/layout.tsx
index 75a2926..17a01da 100644
--- a/packages/fronts/solidr-front-next/src/app/layout.tsx
+++ b/packages/fronts/solidr-front-next/src/app/layout.tsx
@@ -1,4 +1,4 @@
-import type { Metadata } from "next";
+import type { Metadata, Viewport } from "next";
import { NextIntlClientProvider } from 'next-intl';
import { getLocale, getMessages } from 'next-intl/server';
import { Inter } from "next/font/google";
@@ -11,6 +11,7 @@ import RecoilContextProvider from '@/providers/recoil/RecoilProvider';
import { MyThemeProvider } from '@/providers/theme/ThemeProvider';
import Content from './layout/Content';
import { getFormats } from '@/services/i18n/locale';
+import { Author, IconDescriptor, ThemeColorDescriptor } from 'next/dist/lib/metadata/types/metadata-types';
// import { Author, IconDescriptor, ThemeColorDescriptor } from 'next/dist/lib/metadata/types/metadata-types';
const inter = Inter({ subsets: ["latin"] });
@@ -21,21 +22,26 @@ export const metadata: Metadata = {
generator: "Next.js",
manifest: "/manifest.json",
keywords: ["solidr", "sharing expenses", "solana"],
- themeColor: [{ media: "(prefers-color-scheme: dark)", color: "#1e1e1e" }],
authors: [
{
name: "Teddy Chambard",
url: "https://www.linkedin.com/in/teddy-chambard/",
},
],
- viewport:
- "minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, viewport-fit=cover",
icons: [
- // { rel: "apple-touch-icon", url: "icons/icon-128x128.png" },
- // { rel: "icon", url: "icons/icon-128x128.png" },
+ { rel: "apple-touch-icon", url: "/favicon.svg" },
+ { rel: "icon", url: "/favicon.svg" },
],
};
+export const viewport: Viewport = {
+ minimumScale: 1,
+ initialScale: 1,
+ width: 'device-width',
+ viewportFit: 'cover',
+ themeColor: [{ media: "(prefers-color-scheme: dark)", color: "#1e1e1e" }],
+}
+
export default async function RootLayout({
children,
}: Readonly<{
@@ -47,15 +53,12 @@ export default async function RootLayout({
return (
- {/*
+
{metadata.title?.toString()}
- {(metadata.themeColor as ThemeColorDescriptor[])?.map(({ media, color }, index) => (
-
- ))}
{(metadata.authors as Author[])?.map(({ name, url }, index) => (
))}
@@ -63,7 +66,12 @@ export default async function RootLayout({
{(metadata.icons as IconDescriptor[])?.map(({ rel, url }, index) => (
))}
- */}
+
+
+
+
+
+
diff --git a/packages/programs/solidr-program/.gitignore b/packages/programs/solidr-program/.gitignore
index 8e5f987..859c173 100644
--- a/packages/programs/solidr-program/.gitignore
+++ b/packages/programs/solidr-program/.gitignore
@@ -1,5 +1,8 @@
.anchor
-target
+target/
+!target/idl
+!target/types/**/*
+
**/*.rs.bk
test-ledger
.nyc_output
\ No newline at end of file
diff --git a/packages/programs/solidr-program/client/SolidrClient.ts b/packages/programs/solidr-program/client/SolidrClient.ts
index a5fb467..2356b1c 100644
--- a/packages/programs/solidr-program/client/SolidrClient.ts
+++ b/packages/programs/solidr-program/client/SolidrClient.ts
@@ -5,7 +5,7 @@ import { bs58 } from '@coral-xyz/anchor/dist/cjs/utils/bytes';
import * as _ from 'lodash';
import { AbstractSolanaClient, ITransactionResult, ProgramInstructionWrapper } from './AbstractSolanaClient';
-import { Solidr } from './types/solidr';
+import { Solidr } from '../target/types/solidr';
import { generateSessionLinkTokenData } from './TokenHelpers';
import { HermesClient } from '@pythnetwork/hermes-client';
diff --git a/packages/programs/solidr-program/client/index.ts b/packages/programs/solidr-program/client/index.ts
index a16611e..db2d8c1 100644
--- a/packages/programs/solidr-program/client/index.ts
+++ b/packages/programs/solidr-program/client/index.ts
@@ -1,2 +1,2 @@
export * from './SolidrClient';
-export * from './types/solidr';
+export * from '../target/types/solidr';
diff --git a/packages/programs/solidr-program/target/idl/solidr.json b/packages/programs/solidr-program/target/idl/solidr.json
new file mode 100644
index 0000000..993d89a
--- /dev/null
+++ b/packages/programs/solidr-program/target/idl/solidr.json
@@ -0,0 +1,1610 @@
+{
+ "address": "7kUL66rcAhxgisSeBtXoH7Pn9C5hWZa4m2Bp9mRcwtmv",
+ "metadata": {
+ "name": "solidr",
+ "version": "0.1.0",
+ "spec": "0.1.0",
+ "description": "The decentralized application for simple sharing expenses"
+ },
+ "instructions": [
+ {
+ "name": "add_expense",
+ "docs": [
+ "* Adds a new expense to the session.\n *\n * @param name The name of the expense\n * @param amount The amount of the expense"
+ ],
+ "discriminator": [
+ 171,
+ 23,
+ 8,
+ 240,
+ 62,
+ 31,
+ 254,
+ 144
+ ],
+ "accounts": [
+ {
+ "name": "owner",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "member",
+ "writable": true
+ },
+ {
+ "name": "expense",
+ "writable": true,
+ "pda": {
+ "seeds": [
+ {
+ "kind": "const",
+ "value": [
+ 101,
+ 120,
+ 112,
+ 101,
+ 110,
+ 115,
+ 101
+ ]
+ },
+ {
+ "kind": "account",
+ "path": "session.session_id",
+ "account": "SessionAccount"
+ },
+ {
+ "kind": "account",
+ "path": "session.expenses_count",
+ "account": "SessionAccount"
+ }
+ ]
+ }
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": [
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "amount",
+ "type": "f32"
+ },
+ {
+ "name": "participants",
+ "type": {
+ "vec": "pubkey"
+ }
+ }
+ ]
+ },
+ {
+ "name": "add_expense_participants",
+ "docs": [
+ "* Adds participants to expense.\n *\n * @param participants The public keys of the participants"
+ ],
+ "discriminator": [
+ 4,
+ 224,
+ 182,
+ 171,
+ 3,
+ 134,
+ 164,
+ 27
+ ],
+ "accounts": [
+ {
+ "name": "owner",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "expense",
+ "writable": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": [
+ {
+ "name": "participants",
+ "type": {
+ "vec": "pubkey"
+ }
+ }
+ ]
+ },
+ {
+ "name": "add_refund",
+ "docs": [
+ "* Adds a new refund to the session. lamports corresponding to given amount will be transfered to mentionned \"to\" account\n *\n * @param amount The amount of the refund corresponding to session currency\n * @param amount_in_lamports The amount in lamports of the refund. It must be calculated offchain."
+ ],
+ "discriminator": [
+ 174,
+ 141,
+ 186,
+ 43,
+ 213,
+ 19,
+ 84,
+ 140
+ ],
+ "accounts": [
+ {
+ "name": "from_addr",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "sender",
+ "writable": true
+ },
+ {
+ "name": "to_addr",
+ "writable": true
+ },
+ {
+ "name": "receiver",
+ "writable": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "refund",
+ "writable": true,
+ "pda": {
+ "seeds": [
+ {
+ "kind": "const",
+ "value": [
+ 114,
+ 101,
+ 102,
+ 117,
+ 110,
+ 100
+ ]
+ },
+ {
+ "kind": "account",
+ "path": "session.session_id",
+ "account": "SessionAccount"
+ },
+ {
+ "kind": "account",
+ "path": "session.refunds_count",
+ "account": "SessionAccount"
+ }
+ ]
+ }
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": [
+ {
+ "name": "amount",
+ "type": "f32"
+ },
+ {
+ "name": "amount_in_lamports",
+ "type": "u64"
+ }
+ ]
+ },
+ {
+ "name": "add_session_member",
+ "docs": [
+ "* Session administrator can add members.\n *\n * @dev members can be added only by session administrator when session is opened\n * An event MemberAdded is emitted\n *\n * @param addr The address of the member to add\n * @param name The nickname of the member to add"
+ ],
+ "discriminator": [
+ 182,
+ 216,
+ 208,
+ 245,
+ 11,
+ 232,
+ 215,
+ 63
+ ],
+ "accounts": [
+ {
+ "name": "admin",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "member",
+ "writable": true,
+ "pda": {
+ "seeds": [
+ {
+ "kind": "const",
+ "value": [
+ 109,
+ 101,
+ 109,
+ 98,
+ 101,
+ 114
+ ]
+ },
+ {
+ "kind": "account",
+ "path": "session.session_id",
+ "account": "SessionAccount"
+ },
+ {
+ "kind": "arg",
+ "path": "addr"
+ }
+ ]
+ }
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": [
+ {
+ "name": "addr",
+ "type": "pubkey"
+ },
+ {
+ "name": "name",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "close_session",
+ "docs": [
+ "* Administrator can close sessions he created.\n *\n * @dev An event SessionClosed is emitted"
+ ],
+ "discriminator": [
+ 68,
+ 114,
+ 178,
+ 140,
+ 222,
+ 38,
+ 248,
+ 211
+ ],
+ "accounts": [
+ {
+ "name": "admin",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ }
+ ],
+ "args": []
+ },
+ {
+ "name": "delete_expense",
+ "docs": [
+ "* Deletes an existing expense in the session.\n *\n * @param name The name of the expense to be deleted\n * @param amount The amount of the expense to be deleted"
+ ],
+ "discriminator": [
+ 117,
+ 203,
+ 143,
+ 99,
+ 175,
+ 155,
+ 125,
+ 144
+ ],
+ "accounts": [
+ {
+ "name": "owner",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "expense",
+ "writable": true
+ }
+ ],
+ "args": []
+ },
+ {
+ "name": "delete_refund",
+ "discriminator": [
+ 225,
+ 116,
+ 74,
+ 229,
+ 247,
+ 76,
+ 14,
+ 6
+ ],
+ "accounts": [
+ {
+ "name": "admin",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "refund",
+ "writable": true
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": []
+ },
+ {
+ "name": "delete_session",
+ "docs": [
+ "* Session's administrator can delete the session.\n *\n * @dev An event SessionDeleted is emitted"
+ ],
+ "discriminator": [
+ 145,
+ 247,
+ 92,
+ 192,
+ 209,
+ 128,
+ 187,
+ 189
+ ],
+ "accounts": [
+ {
+ "name": "admin",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": []
+ },
+ {
+ "name": "delete_session_member",
+ "docs": [
+ "* Session administrator can remove a member from the session.\n *\n * @dev Members can be removed only by session administrator when session is opened\n * An event MemberRemoved is emitted"
+ ],
+ "discriminator": [
+ 87,
+ 38,
+ 145,
+ 255,
+ 242,
+ 94,
+ 180,
+ 202
+ ],
+ "accounts": [
+ {
+ "name": "admin",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "member",
+ "writable": true
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": []
+ },
+ {
+ "name": "init_global",
+ "discriminator": [
+ 44,
+ 238,
+ 77,
+ 253,
+ 76,
+ 182,
+ 192,
+ 162
+ ],
+ "accounts": [
+ {
+ "name": "global",
+ "writable": true,
+ "pda": {
+ "seeds": [
+ {
+ "kind": "const",
+ "value": [
+ 103,
+ 108,
+ 111,
+ 98,
+ 97,
+ 108
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "name": "owner",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": []
+ },
+ {
+ "name": "join_session_as_member",
+ "docs": [
+ "* Anyone can join a session with correct information provided with a share link.\n *\n * An event MemberAdded is emitted\n *\n * @param name The nickname of the member to add\n * @param token The token shared by session's administrator"
+ ],
+ "discriminator": [
+ 146,
+ 154,
+ 245,
+ 82,
+ 18,
+ 241,
+ 163,
+ 206
+ ],
+ "accounts": [
+ {
+ "name": "signer",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "member",
+ "writable": true,
+ "pda": {
+ "seeds": [
+ {
+ "kind": "const",
+ "value": [
+ 109,
+ 101,
+ 109,
+ 98,
+ 101,
+ 114
+ ]
+ },
+ {
+ "kind": "account",
+ "path": "session.session_id",
+ "account": "SessionAccount"
+ },
+ {
+ "kind": "account",
+ "path": "signer"
+ }
+ ]
+ }
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": [
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "token",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "open_session",
+ "docs": [
+ "* Anyone can open new session. Session's creator becomes session administrator.\n *\n * @dev An event SessionCreated is emitted\n *\n * @param name The session name\n * @param description The session description\n * @param member_name The administrator's name"
+ ],
+ "discriminator": [
+ 130,
+ 54,
+ 124,
+ 7,
+ 236,
+ 20,
+ 104,
+ 104
+ ],
+ "accounts": [
+ {
+ "name": "admin",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "global",
+ "writable": true
+ },
+ {
+ "name": "session",
+ "writable": true,
+ "pda": {
+ "seeds": [
+ {
+ "kind": "const",
+ "value": [
+ 115,
+ 101,
+ 115,
+ 115,
+ 105,
+ 111,
+ 110
+ ]
+ },
+ {
+ "kind": "account",
+ "path": "global.session_count",
+ "account": "GlobalAccount"
+ }
+ ]
+ }
+ },
+ {
+ "name": "member",
+ "writable": true,
+ "pda": {
+ "seeds": [
+ {
+ "kind": "const",
+ "value": [
+ 109,
+ 101,
+ 109,
+ 98,
+ 101,
+ 114
+ ]
+ },
+ {
+ "kind": "account",
+ "path": "global.session_count",
+ "account": "GlobalAccount"
+ },
+ {
+ "kind": "account",
+ "path": "admin"
+ }
+ ]
+ }
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": [
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "description",
+ "type": "string"
+ },
+ {
+ "name": "member_name",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "remove_expense_participants",
+ "docs": [
+ "* Removes participant from expense.\n *\n * @param participants The public keys of the participants"
+ ],
+ "discriminator": [
+ 248,
+ 203,
+ 50,
+ 173,
+ 70,
+ 6,
+ 146,
+ 166
+ ],
+ "accounts": [
+ {
+ "name": "owner",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "expense",
+ "writable": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": [
+ {
+ "name": "participants",
+ "type": {
+ "vec": "pubkey"
+ }
+ }
+ ]
+ },
+ {
+ "name": "set_session_token_hash",
+ "docs": [
+ "* Session's administrator can set invitation token hash\n *\n * @param hash The token hash to store in session"
+ ],
+ "discriminator": [
+ 162,
+ 247,
+ 90,
+ 144,
+ 182,
+ 153,
+ 184,
+ 188
+ ],
+ "accounts": [
+ {
+ "name": "admin",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "system_program",
+ "address": "11111111111111111111111111111111"
+ }
+ ],
+ "args": [
+ {
+ "name": "hash",
+ "type": {
+ "array": [
+ "u8",
+ 32
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "name": "update_expense",
+ "docs": [
+ "* Updates an existing expense in the session.\n *\n * @param name The name of the expense to be updated\n * @param amount The new amount of the expense"
+ ],
+ "discriminator": [
+ 122,
+ 188,
+ 72,
+ 67,
+ 172,
+ 189,
+ 179,
+ 163
+ ],
+ "accounts": [
+ {
+ "name": "owner",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "expense",
+ "writable": true
+ }
+ ],
+ "args": [
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "amount",
+ "type": "f32"
+ }
+ ]
+ },
+ {
+ "name": "update_session",
+ "docs": [
+ "* Session's administrator can update the session's name and description.\n *\n * @param name The new session name\n * @param description The new session description"
+ ],
+ "discriminator": [
+ 173,
+ 25,
+ 235,
+ 79,
+ 40,
+ 217,
+ 155,
+ 103
+ ],
+ "accounts": [
+ {
+ "name": "admin",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ }
+ ],
+ "args": [
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "description",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "update_session_member",
+ "discriminator": [
+ 115,
+ 250,
+ 161,
+ 78,
+ 77,
+ 56,
+ 115,
+ 45
+ ],
+ "accounts": [
+ {
+ "name": "admin",
+ "writable": true,
+ "signer": true
+ },
+ {
+ "name": "session",
+ "writable": true
+ },
+ {
+ "name": "member",
+ "writable": true
+ }
+ ],
+ "args": [
+ {
+ "name": "name",
+ "type": "string"
+ }
+ ]
+ }
+ ],
+ "accounts": [
+ {
+ "name": "ExpenseAccount",
+ "discriminator": [
+ 35,
+ 2,
+ 83,
+ 124,
+ 115,
+ 159,
+ 63,
+ 133
+ ]
+ },
+ {
+ "name": "GlobalAccount",
+ "discriminator": [
+ 129,
+ 105,
+ 124,
+ 171,
+ 189,
+ 42,
+ 108,
+ 69
+ ]
+ },
+ {
+ "name": "MemberAccount",
+ "discriminator": [
+ 173,
+ 25,
+ 100,
+ 97,
+ 192,
+ 177,
+ 84,
+ 139
+ ]
+ },
+ {
+ "name": "RefundAccount",
+ "discriminator": [
+ 33,
+ 196,
+ 176,
+ 53,
+ 44,
+ 213,
+ 37,
+ 99
+ ]
+ },
+ {
+ "name": "SessionAccount",
+ "discriminator": [
+ 74,
+ 34,
+ 65,
+ 133,
+ 96,
+ 163,
+ 80,
+ 69
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "ExpenseAdded",
+ "discriminator": [
+ 161,
+ 49,
+ 47,
+ 2,
+ 245,
+ 167,
+ 224,
+ 67
+ ]
+ },
+ {
+ "name": "ExpenseDeleted",
+ "discriminator": [
+ 246,
+ 52,
+ 62,
+ 55,
+ 242,
+ 249,
+ 158,
+ 23
+ ]
+ },
+ {
+ "name": "ExpenseParticipantAdded",
+ "discriminator": [
+ 116,
+ 202,
+ 216,
+ 162,
+ 22,
+ 73,
+ 148,
+ 87
+ ]
+ },
+ {
+ "name": "ExpenseParticipantRemoved",
+ "discriminator": [
+ 37,
+ 178,
+ 57,
+ 228,
+ 101,
+ 203,
+ 244,
+ 215
+ ]
+ },
+ {
+ "name": "ExpenseUpdated",
+ "discriminator": [
+ 132,
+ 21,
+ 179,
+ 234,
+ 31,
+ 228,
+ 223,
+ 159
+ ]
+ },
+ {
+ "name": "MemberAdded",
+ "discriminator": [
+ 198,
+ 220,
+ 228,
+ 196,
+ 92,
+ 235,
+ 240,
+ 79
+ ]
+ },
+ {
+ "name": "MemberDeleted",
+ "discriminator": [
+ 197,
+ 176,
+ 249,
+ 151,
+ 163,
+ 55,
+ 70,
+ 154
+ ]
+ },
+ {
+ "name": "MemberUpdated",
+ "discriminator": [
+ 122,
+ 225,
+ 250,
+ 121,
+ 60,
+ 189,
+ 11,
+ 147
+ ]
+ },
+ {
+ "name": "RefundAdded",
+ "discriminator": [
+ 97,
+ 13,
+ 130,
+ 101,
+ 137,
+ 7,
+ 155,
+ 116
+ ]
+ },
+ {
+ "name": "RefundDeleted",
+ "discriminator": [
+ 171,
+ 242,
+ 116,
+ 20,
+ 107,
+ 251,
+ 175,
+ 16
+ ]
+ },
+ {
+ "name": "SessionClosed",
+ "discriminator": [
+ 57,
+ 237,
+ 11,
+ 243,
+ 194,
+ 34,
+ 120,
+ 27
+ ]
+ },
+ {
+ "name": "SessionDeleted",
+ "discriminator": [
+ 198,
+ 203,
+ 193,
+ 19,
+ 12,
+ 170,
+ 11,
+ 113
+ ]
+ },
+ {
+ "name": "SessionOpened",
+ "discriminator": [
+ 34,
+ 79,
+ 77,
+ 95,
+ 195,
+ 207,
+ 104,
+ 223
+ ]
+ },
+ {
+ "name": "SessionUpdated",
+ "discriminator": [
+ 44,
+ 208,
+ 225,
+ 11,
+ 203,
+ 208,
+ 34,
+ 197
+ ]
+ }
+ ],
+ "errors": [
+ {
+ "code": 6000,
+ "name": "Overflow",
+ "msg": "Overflow when performing arithmetic operations"
+ },
+ {
+ "code": 6001,
+ "name": "DivisionByZero",
+ "msg": "Division by zero when converting amount to lamports"
+ },
+ {
+ "code": 6002,
+ "name": "SessionNameTooLong",
+ "msg": "Session's name can't exceed 20 characters"
+ },
+ {
+ "code": 6003,
+ "name": "SessionDescriptionTooLong",
+ "msg": "Session's description can't exceed 80 characters"
+ },
+ {
+ "code": 6004,
+ "name": "ForbiddenAsNonAdmin",
+ "msg": "Only session administrator is granted"
+ },
+ {
+ "code": 6005,
+ "name": "ForbiddenAsNonOwner",
+ "msg": "Only owner can update his informations"
+ },
+ {
+ "code": 6006,
+ "name": "SessionClosed",
+ "msg": "Session is closed"
+ },
+ {
+ "code": 6007,
+ "name": "SessionNotClosed",
+ "msg": "Session is not closed"
+ },
+ {
+ "code": 6008,
+ "name": "MemberAlreadyExists",
+ "msg": "Member already exists"
+ },
+ {
+ "code": 6009,
+ "name": "MissingInvitationHash",
+ "msg": "Missing invitation link hash"
+ },
+ {
+ "code": 6010,
+ "name": "InvalidInvitationHash",
+ "msg": "Invalid invitation link hash"
+ },
+ {
+ "code": 6011,
+ "name": "ExpenseAmountMustBeGreaterThanZero",
+ "msg": "Expense amount must be greater than zero"
+ },
+ {
+ "code": 6012,
+ "name": "RefundAmountMustBeGreaterThanZero",
+ "msg": "Refund amount must be greater than zero"
+ },
+ {
+ "code": 6013,
+ "name": "ExpenseNameTooLong",
+ "msg": "Expense's name can't exceed 20 characters"
+ },
+ {
+ "code": 6014,
+ "name": "MaxParticipantsReached",
+ "msg": "Expense cannot have more than 20 participants"
+ },
+ {
+ "code": 6015,
+ "name": "NotSessionMember",
+ "msg": "Only session member can add an expense"
+ },
+ {
+ "code": 6016,
+ "name": "NotExpenseOwner",
+ "msg": "Only expense owner can update or delete expense"
+ },
+ {
+ "code": 6017,
+ "name": "ParticipantNotMember",
+ "msg": "Only members can be added as participants"
+ },
+ {
+ "code": 6018,
+ "name": "CannotRemoveExpenseOwner",
+ "msg": "Expense owner cannot be removed from participants"
+ }
+ ],
+ "types": [
+ {
+ "name": "ExpenseAccount",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "expense_id",
+ "type": "u16"
+ },
+ {
+ "name": "date",
+ "type": "i64"
+ },
+ {
+ "name": "owner",
+ "type": "pubkey"
+ },
+ {
+ "name": "amount",
+ "type": "f32"
+ },
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "participants",
+ "type": {
+ "vec": "pubkey"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "name": "ExpenseAdded",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "expense_id",
+ "type": "u16"
+ }
+ ]
+ }
+ },
+ {
+ "name": "ExpenseDeleted",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "expense_id",
+ "type": "u16"
+ }
+ ]
+ }
+ },
+ {
+ "name": "ExpenseParticipantAdded",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "expense_id",
+ "type": "u16"
+ },
+ {
+ "name": "member_pubkey",
+ "type": "pubkey"
+ }
+ ]
+ }
+ },
+ {
+ "name": "ExpenseParticipantRemoved",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "expense_id",
+ "type": "u16"
+ },
+ {
+ "name": "member_pubkey",
+ "type": "pubkey"
+ }
+ ]
+ }
+ },
+ {
+ "name": "ExpenseUpdated",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "expense_id",
+ "type": "u16"
+ }
+ ]
+ }
+ },
+ {
+ "name": "GlobalAccount",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_count",
+ "type": "u64"
+ }
+ ]
+ }
+ },
+ {
+ "name": "MemberAccount",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "addr",
+ "type": "pubkey"
+ },
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "is_admin",
+ "type": "bool"
+ }
+ ]
+ }
+ },
+ {
+ "name": "MemberAdded",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "addr",
+ "type": "pubkey"
+ },
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "is_admin",
+ "type": "bool"
+ }
+ ]
+ }
+ },
+ {
+ "name": "MemberDeleted",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "addr",
+ "type": "pubkey"
+ },
+ {
+ "name": "name",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "name": "MemberUpdated",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "addr",
+ "type": "pubkey"
+ },
+ {
+ "name": "name",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "name": "RefundAccount",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "refund_id",
+ "type": "u16"
+ },
+ {
+ "name": "date",
+ "type": "i64"
+ },
+ {
+ "name": "from",
+ "type": "pubkey"
+ },
+ {
+ "name": "to",
+ "type": "pubkey"
+ },
+ {
+ "name": "amount",
+ "type": "f32"
+ },
+ {
+ "name": "amount_in_lamports",
+ "type": "u64"
+ }
+ ]
+ }
+ },
+ {
+ "name": "RefundAdded",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "refund_id",
+ "type": "u16"
+ }
+ ]
+ }
+ },
+ {
+ "name": "RefundDeleted",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "refund_id",
+ "type": "u16"
+ }
+ ]
+ }
+ },
+ {
+ "name": "SessionAccount",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ },
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "description",
+ "type": "string"
+ },
+ {
+ "name": "admin",
+ "type": "pubkey"
+ },
+ {
+ "name": "expenses_count",
+ "type": "u16"
+ },
+ {
+ "name": "refunds_count",
+ "type": "u16"
+ },
+ {
+ "name": "status",
+ "type": {
+ "defined": {
+ "name": "SessionStatus"
+ }
+ }
+ },
+ {
+ "name": "invitation_hash",
+ "type": {
+ "array": [
+ "u8",
+ 32
+ ]
+ }
+ }
+ ]
+ }
+ },
+ {
+ "name": "SessionClosed",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ }
+ ]
+ }
+ },
+ {
+ "name": "SessionDeleted",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ }
+ ]
+ }
+ },
+ {
+ "name": "SessionOpened",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ }
+ ]
+ }
+ },
+ {
+ "name": "SessionStatus",
+ "type": {
+ "kind": "enum",
+ "variants": [
+ {
+ "name": "Opened"
+ },
+ {
+ "name": "Closed"
+ }
+ ]
+ }
+ },
+ {
+ "name": "SessionUpdated",
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "session_id",
+ "type": "u64"
+ }
+ ]
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/programs/solidr-program/client/types/solidr.ts b/packages/programs/solidr-program/target/types/solidr.ts
similarity index 100%
rename from packages/programs/solidr-program/client/types/solidr.ts
rename to packages/programs/solidr-program/target/types/solidr.ts