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
2 changes: 1 addition & 1 deletion .github/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CARGO_TERM_COLOR=always
NODE_VERSION=20.x
PROGRAMS=["program", "adversarial_program/margin_withdraw_cpi"]
PROGRAMS=["programs/escrow", "programs/adversarial_program/margin_withdraw_cpi"]
RUST_VERSION=1.78.0
SOLANA_VERSION=1.17.34
4 changes: 2 additions & 2 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ programs_common: &programs_common

program_binary: &program_binary
- *programs_common
- "program/**"
- "programs/escrow/**"

adversarial_binary: &adversarial_binary
- *programs_common
- "adversarial_program/margin_withdraw_cpi/**"
- "programs/adversarial_program/margin_withdraw_cpi/**"

programs: &programs
- *adversarial_binary
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build-programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,7 @@ jobs:
with:
name: programs-build
# First wildcard ensures exported paths are consistently under the programs folder.
path: ./targe*/deploy/*.so
path: |
./target*/deploy/*.so
./target*/deploy/*.json
if-no-files-found: error
5 changes: 4 additions & 1 deletion Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ cluster = "devnet"
wallet = "~/.config/solana/devnet.json"

[workspace]
members = ["program", "adversarial_program/margin_withdraw_cpi"]
members = [
"programs/escrow",
"programs/adversarial_program/margin_withdraw_cpi",
]
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[workspace]
resolver = "2"
members = ["program", "adversarial_program/margin_withdraw_cpi"]
members = [
"programs/escrow",
"programs/adversarial_program/margin_withdraw_cpi",
]
exclude = ["clients/rust"]
12 changes: 6 additions & 6 deletions clients/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tensor-foundation/escrow",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"description": "Shared escrow for all Tensor protocols",
"sideEffects": false,
"module": "./dist/src/index.mjs",
Expand Down Expand Up @@ -42,15 +42,15 @@
"devDependencies": {
"@ava/typescript": "^4.1.0",
"@solana/eslint-config-solana": "^3.0.0",
"@tensor-foundation/test-helpers": "1.0.0-beta.1",
"@tensor-foundation/amm": "0.9.0",
"@tensor-foundation/marketplace": "0.5.0",
"@tensor-foundation/whitelist": "0.3.0",
"@tensor-foundation/test-helpers": "1.0.0-beta.2",
"@tensor-foundation/amm": "1.0.3",
"@tensor-foundation/marketplace": "1.0.0-beta.4",
"@tensor-foundation/whitelist": "1.0.0-beta.1",
"@tensor-foundation/mpl-token-metadata": "1.0.0-beta.1",
"@tensor-foundation/mpl-bubblegum": "1.0.0-beta.1",
"@tensor-foundation/mpl-core": "1.0.0-beta.1",
"@solana/webcrypto-ed25519-polyfill": "^2.0.0",
"@solana-program/system": "0.6.1",
"@solana-program/system": "0.6.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@types/node": "^22.0.0",
Expand Down
2,486 changes: 945 additions & 1,541 deletions clients/js/pnpm-lock.yaml

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions clients/js/src/generated/accounts/marginAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {
fixEncoderSize,
getAddressDecoder,
getAddressEncoder,
getArrayDecoder,
getArrayEncoder,
getBytesDecoder,
getBytesEncoder,
getStructDecoder,
Expand All @@ -27,8 +25,6 @@ import {
getU16Encoder,
getU32Decoder,
getU32Encoder,
getU8Decoder,
getU8Encoder,
transformEncoder,
type Account,
type Address,
Expand Down Expand Up @@ -59,7 +55,7 @@ export type MarginAccount = {
owner: Address;
name: ReadonlyUint8Array;
nr: number;
bump: Array<number>;
bump: ReadonlyUint8Array;
poolsAttached: number;
reserved: ReadonlyUint8Array;
};
Expand All @@ -68,7 +64,7 @@ export type MarginAccountArgs = {
owner: Address;
name: ReadonlyUint8Array;
nr: number;
bump: Array<number>;
bump: ReadonlyUint8Array;
poolsAttached: number;
reserved: ReadonlyUint8Array;
};
Expand All @@ -80,7 +76,7 @@ export function getMarginAccountEncoder(): Encoder<MarginAccountArgs> {
['owner', getAddressEncoder()],
['name', fixEncoderSize(getBytesEncoder(), 32)],
['nr', getU16Encoder()],
['bump', getArrayEncoder(getU8Encoder(), { size: 1 })],
['bump', fixEncoderSize(getBytesEncoder(), 1)],
['poolsAttached', getU32Encoder()],
['reserved', fixEncoderSize(getBytesEncoder(), 64)],
]),
Expand All @@ -94,7 +90,7 @@ export function getMarginAccountDecoder(): Decoder<MarginAccount> {
['owner', getAddressDecoder()],
['name', fixDecoderSize(getBytesDecoder(), 32)],
['nr', getU16Decoder()],
['bump', getArrayDecoder(getU8Decoder(), { size: 1 })],
['bump', fixDecoderSize(getBytesDecoder(), 1)],
['poolsAttached', getU32Decoder()],
['reserved', fixDecoderSize(getBytesDecoder(), 64)],
]);
Expand Down
10 changes: 4 additions & 6 deletions clients/js/src/generated/accounts/tSwap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {
fixEncoderSize,
getAddressDecoder,
getAddressEncoder,
getArrayDecoder,
getArrayEncoder,
getBytesDecoder,
getBytesEncoder,
getStructDecoder,
Expand Down Expand Up @@ -57,7 +55,7 @@ export function getTSwapDiscriminatorBytes() {
export type TSwap = {
discriminator: ReadonlyUint8Array;
version: number;
bump: Array<number>;
bump: ReadonlyUint8Array;
/** @DEPRECATED, use constant above instead */
config: TSwapConfig;
owner: Address;
Expand All @@ -67,7 +65,7 @@ export type TSwap = {

export type TSwapArgs = {
version: number;
bump: Array<number>;
bump: ReadonlyUint8Array;
/** @DEPRECATED, use constant above instead */
config: TSwapConfigArgs;
owner: Address;
Expand All @@ -80,7 +78,7 @@ export function getTSwapEncoder(): Encoder<TSwapArgs> {
getStructEncoder([
['discriminator', fixEncoderSize(getBytesEncoder(), 8)],
['version', getU8Encoder()],
['bump', getArrayEncoder(getU8Encoder(), { size: 1 })],
['bump', fixEncoderSize(getBytesEncoder(), 1)],
['config', getTSwapConfigEncoder()],
['owner', getAddressEncoder()],
['feeVault', getAddressEncoder()],
Expand All @@ -94,7 +92,7 @@ export function getTSwapDecoder(): Decoder<TSwap> {
return getStructDecoder([
['discriminator', fixDecoderSize(getBytesDecoder(), 8)],
['version', getU8Decoder()],
['bump', getArrayDecoder(getU8Decoder(), { size: 1 })],
['bump', fixDecoderSize(getBytesDecoder(), 1)],
['config', getTSwapConfigDecoder()],
['owner', getAddressDecoder()],
['feeVault', getAddressDecoder()],
Expand Down
1 change: 1 addition & 0 deletions clients/js/src/generated/instructions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ export * from './initUpdateTswap';
export * from './withdrawMarginAccount';
export * from './withdrawMarginAccountCpiTamm';
export * from './withdrawMarginAccountCpiTcomp';
export * from './withdrawTswapFees';
Loading