forked from LibrePlex/libreplex-program-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from rarible/feature/testing-suite
[FEATURE]: Merkle Tree Integration + Test Suite
- Loading branch information
Showing
77 changed files
with
2,647 additions
and
3,188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
**/target/* | ||
!**/target/types | ||
|
||
.cursorrules | ||
|
||
local-scripts | ||
|
||
.anchor | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"timeout": 1000000 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
module.exports = { | ||
trailingComma: 'es5', | ||
tabWidth: 2, | ||
semi: true, | ||
singleQuote: true, | ||
trailingComma: 'es5', | ||
tabWidth: 2, | ||
printWidth: 160, | ||
|
||
semi: true, | ||
singleQuote: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,66 @@ | ||
<div align="center"> | ||
<img src="https://avatars.githubusercontent.com/u/134429862?s=200&v=4" width="150" /> | ||
# Eclipse Program Library Testing Guide | ||
|
||
This guide provides step-by-step instructions for setting up and running tests for the Eclipse Program Library. | ||
|
||
## Prerequisites | ||
|
||
- [Rust](https://www.rust-lang.org/tools/install) | ||
- [Solana CLI](https://docs.solana.com/cli/install-solana-cli-tools) | ||
- [Anchor](https://www.anchor-lang.com/docs/installation) | ||
- [Node.js and npm](https://nodejs.org/en/download/) | ||
- [Yarn](https://classic.yarnpkg.com/en/docs/install) | ||
|
||
## Setup and Testing Steps | ||
|
||
1. Clone the repository: | ||
``` | ||
git clone https://github.com/rarible/eclipse-program-library.git | ||
cd eclipse-program-library | ||
``` | ||
|
||
2. Install dependencies: | ||
``` | ||
yarn install | ||
``` | ||
|
||
3. Sync program IDs: | ||
- Open `Anchor.toml` and `constants.ts` | ||
- Ensure that the program IDs in both files match | ||
- Example: | ||
```toml | ||
# In Anchor.toml | ||
[programs.localnet] | ||
libreplex_editions = "587DoLBH2H39i5bToWBc6zRgbD2iJZtc4Kb8nYsskYTq" | ||
libreplex_editions_controls = "5hEa5j38yNJRM9vQA44Q6gXVj4Db8y3mWxkDtQeofKKs" | ||
``` | ||
```typescript | ||
// In constants.ts | ||
export const LIBREPLEX_EDITIONS_PROGRAM_ID = new PublicKey("587DoLBH2H39i5bToWBc6zRgbD2iJZtc4Kb8nYsskYTq"); | ||
export const LIBREPLEX_EDITIONS_CONTROLS_PROGRAM_ID = new PublicKey("5hEa5j38yNJRM9vQA44Q6gXVj4Db8y3mWxkDtQeofKKs"); | ||
``` | ||
|
||
4. Run tests: | ||
- To build and run tests: | ||
``` | ||
anchor test | ||
``` | ||
- To skip building and only run tests (faster for repeated testing): | ||
``` | ||
anchor test --skip-build | ||
``` | ||
|
||
## Notes | ||
|
||
- If you encounter wallet-related errors, ensure your `Anchor.toml` is configured to use your local keypair: | ||
```toml | ||
[provider] | ||
cluster = "localnet" | ||
wallet = "~/.config/solana/id.json" | ||
``` | ||
|
||
- For any issues or questions, please open an issue in the GitHub repository. | ||
|
||
## Contributing | ||
|
||
We welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) file for details on how to contribute to this project. | ||
|
||
<h1>Libreplex</h1> | ||
|
||
<h4> | ||
<a href="https://libreplex.github.io/libreplex-program-library/">Documentation (stable)</a> | ||
</h4> | ||
</div> | ||
|
||
|
||
|
||
The mission of Libreplex is to provide a community-driven, open license protocol to the Solana SPL Token and NFT community. The protocol must meet the following criteria: | ||
|
||
1) Distributed deployment keys | ||
|
||
To ensure that no single entity can unilaterally make changes that impact or jeopardise the integrity of the applications that depend on the protocol. | ||
|
||
2) Open license held by a Trust / Foundation | ||
|
||
The licensing must ensure that any applications utilising the protocol can do so knowing that the nature of the protocol remains constant, to minimise uncertainty and maximise transparency. | ||
|
||
3) Guaranteed fees-free for life | ||
|
||
The fee-free nature of the protocol ensures that even though applications built on top of the protocol may introduce fees, the protocol itself will never do so. This establishes a level playing field to all and enforces predictability and transparency. | ||
|
||
4) Open source | ||
|
||
The source of the protocol will be made available on github or similar. After initial launch, any changes will be subject to 30-day vetting and a community vote. | ||
|
||
INSTRUCTIONS: | ||
|
||
Install dependencies | ||
|
||
``` | ||
yarn | ||
``` | ||
|
||
Build | ||
|
||
``` | ||
anchor build | ||
``` | ||
|
||
To run unit tests (cargo): | ||
|
||
`cargo test` | ||
|
||
To run unit tests (cargo, for a single program): | ||
|
||
`cargo test libreplex_metadata` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @dev: sync with Anchor.toml to ensure correct program ids are used on tests | ||
export const EDITIONS_PROGRAM_ID = 'GHVmd43GebD2SSedqG1AAh76izf5CPAhz6KotkZyRzUD'; | ||
export const EDITIONS_CONTROLS_PROGRAM_ID = 'CCWfNBFcrjbKSjKes9DqgiQYsnmCFgCVKx21mmV2xWgN'; | ||
export const TOKEN_GROUP_EXTENSION_PROGRAM_ID = '5hx15GaPPqsYA61v6QpcGPpo125v7rfvEfZQ4dJErG5V'; |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.