Skip to content

Commit

Permalink
Merge pull request #42 from invariant-labs/remove-unused-entrypoints
Browse files Browse the repository at this point in the history
remove unused entrypoints
  • Loading branch information
none00y authored Aug 21, 2024
2 parents f7892ac + bddd184 commit 6073916
Show file tree
Hide file tree
Showing 38 changed files with 158 additions and 3,263 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test-protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ jobs:
if: steps.cache-anchor.outputs.cache-hit != 'true'
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
avm install ${{ env.anchor_version }}
cargo install --git https://github.com/project-serum/anchor --tag v${{ env.anchor_version }} anchor-cli --locked
- name: build programs
working-directory: ${{ env.protocol_path }}
run: |
Expand Down
3 changes: 1 addition & 2 deletions protocol/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ skip-lint = false

[programs.localnet]
protocol = "HTBzkQCWc2sbkn5WmLkPmQKKotaeeWgZ3RSD4Eg3f1MS"
puppet = "8KQzCc22ZqGLPoipqRhYvkQtHJw6nY1NxrrGy8JLz1jC"
invariant = "CsT21LCRqBfh4SCcNZXtWjRZ6xvYKvdpEBaytCVmWnVJ"

[registry]
Expand All @@ -17,7 +16,7 @@ cluster = "localnet"
wallet = "~/.config/solana/id.json"

[workspace]
members = ["programs/protocol", "programs/puppet", "programs/invariant"]
members = ["programs/protocol", "programs/invariant"]

[scripts]
test = "ts-mocha -p ./tsconfig.json -t 1000000"
8 changes: 0 additions & 8 deletions protocol/Cargo.lock

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

2 changes: 0 additions & 2 deletions protocol/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ set -e

# Define the keypair JSON content
protocol='[125,25,103,8,46,252,74,11,10,231,221,13,113,82,123,17,118,205,218,140,247,37,159,150,140,109,50,158,185,90,57,107,244,112,134,82,19,192,92,70,188,247,227,156,239,127,119,76,193,85,143,146,12,43,48,189,79,193,48,21,49,108,226,209]'
puppet='[51,155,154,107,110,131,244,50,197,81,99,152,71,175,210,224,80,66,26,119,45,91,107,252,7,64,94,239,6,209,249,114,30,90,202,122,203,133,109,126,97,16,179,156,79,250,190,92,149,86,98,253,100,145,117,244,93,225,240,192,20,135,163,104]'
invarinat='[100,94,104,217,253,66,112,71,155,206,9,70,30,6,93,185,82,49,169,250,96,24,120,234,25,145,148,106,134,60,55,123,176,93,3,185,31,73,255,255,107,72,82,123,112,9,31,16,214,15,171,107,164,37,143,208,35,195,133,157,224,137,246,197]'

# Write the keypair JSON to file
mkdir -p target/deploy
echo "$protocol" > target/deploy/protocol-keypair.json
echo "$puppet" > target/deploy/puppet-keypair.json
echo "$invarinat" > target/deploy/invariant-keypair.json

# Build the program using Anchor
Expand Down
2 changes: 0 additions & 2 deletions protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"build:all": "npm run build:program && npm run build:sdk",
"test": "npm run build:all && npx ts-mocha -p tsconfig.json tests/**/*.ts",
"test:init": "anchor test --skip-build tests/init.test.ts",
"test:token": "anchor test --skip-build tests/token.test.ts",
"test:invoke": "anchor test --skip-build tests/invoke.test.ts",
"test:init-lp-pool": "anchor test --skip-build tests/init-lp-pool.test.ts",
"test:mint": "anchor test --skip-build tests/mint.test.ts",
"test:burn": "anchor test --skip-build tests/burn.test.ts",
Expand Down
1 change: 0 additions & 1 deletion protocol/programs/protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ decimal = { path = "../invariant/decimal" }
bytemuck = "1.16.0"
anchor-lang = {version = "0.29.0", features = ["init-if-needed"]}
anchor-spl = "0.29.0"
puppet = { path = "../puppet", features = ["cpi"]}
invariant = { path = "../invariant", features = ["cpi"]}
104 changes: 0 additions & 104 deletions protocol/programs/protocol/src/contexts/invoke_close_position.rs

This file was deleted.

126 changes: 0 additions & 126 deletions protocol/programs/protocol/src/contexts/invoke_create_position.rs

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions protocol/programs/protocol/src/contexts/mod.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
mod burn;
mod init;
mod init_pool;
mod invoke_close_position;
mod invoke_create_position;
mod invoke_update_seconds_per_liquidity;
mod mint;
mod reopen_position;
mod test;
mod token;

pub use burn::*;
pub use init::*;
pub use init_pool::*;
pub use invoke_close_position::*;
pub use invoke_create_position::*;
pub use invoke_update_seconds_per_liquidity::*;
pub use mint::*;
pub use reopen_position::*;
pub use test::*;
pub use token::*;
Loading

0 comments on commit 6073916

Please sign in to comment.