Skip to content

Commit

Permalink
feat: photon v0.26.0 (#844)
Browse files Browse the repository at this point in the history
* Switch to Photon v0.26.0

* Format + update autogenerated photon-api types

* Update TokenData field types to i64

* Enable skipped tests for compressed token RPC

Three previously skipped end-to-end tests for compressed token RPCs have been enabled. The tests cover the functionality of getCompressedTokenAccountsByOwner, getCompressedTokenAccountBalance, and getCompressedTokenBalancesByOwner functions.
  • Loading branch information
sergeytimoshin authored Jun 20, 2024
1 parent 221f274 commit 6f10474
Show file tree
Hide file tree
Showing 103 changed files with 132 additions and 152 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion cli/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const LIGHT_PROVER_PROCESS_NAME = "light-prover";
export const INDEXER_PROCESS_NAME = "photon";
export const FORESTER_PROCESS_NAME = "forester";

export const PHOTON_VERSION = "0.25.0";
export const PHOTON_VERSION = "0.26.0";

export const LIGHT_PROTOCOL_PROGRAMS_DIR_ENV = "LIGHT_PROTOCOL_PROGRAMS_DIR";
export const BASE_PATH = "../../bin/";
2 changes: 1 addition & 1 deletion forester/src/nullifier/nullify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ async fn fetch_queue_data<T: Indexer, R: RpcConnection>(
ForesterError::NoProofsFound
})?;

let compressed_account_proofs: HashMap<String, (Vec<[u8; 32]>, u64, i64)> = proofs
let compressed_account_proofs: HashMap<String, (Vec<[u8; 32]>, u64, u64)> = proofs
.into_iter()
.map(|proof| {
(
Expand Down
2 changes: 1 addition & 1 deletion forester/src/nullifier/queue_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub struct StateQueueData {
pub change_log_index: usize,
pub sequence_number: usize,
pub compressed_accounts_to_nullify: Vec<Account>,
pub compressed_account_proofs: HashMap<String, (Vec<[u8; 32]>, u64, i64)>,
pub compressed_account_proofs: HashMap<String, (Vec<[u8; 32]>, u64, u64)>,
}

#[derive(Clone, Copy, Debug)]
Expand Down
16 changes: 8 additions & 8 deletions js/compressed-token/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@
"vitest": "^1.6.0"
},
"nx": {
"targets": {
"build": {
"inputs": [
"{workspaceRoot}/target/idl",
"{workspaceRoot}/target/types"
]
}
"targets": {
"build": {
"inputs": [
"{workspaceRoot}/target/idl",
"{workspaceRoot}/target/types"
]
}
}
}
}
}
6 changes: 3 additions & 3 deletions js/compressed-token/tests/e2e/rpc-token-interop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('rpc-interop token', () => {
await transfer(testRpc, payer, mint, bn(700), bob, charlie.publicKey);
});

it.skip('getCompressedTokenAccountsByOwner should match', async () => {
it('getCompressedTokenAccountsByOwner should match', async () => {
const senderAccounts = await rpc.getCompressedTokenAccountsByOwner(
bob.publicKey,
{ mint },
Expand Down Expand Up @@ -97,7 +97,7 @@ describe('rpc-interop token', () => {
});
});

it.skip('getCompressedTokenAccountBalance should match ', async () => {
it('getCompressedTokenAccountBalance should match ', async () => {
const senderAccounts = await rpc.getCompressedTokenAccountsByOwner(
bob.publicKey,
{ mint },
Expand All @@ -114,7 +114,7 @@ describe('rpc-interop token', () => {
assert.isNotNull(balanceTest.amount);
});

it.skip('getCompressedTokenBalancesByOwner should match', async () => {
it('getCompressedTokenBalancesByOwner should match', async () => {
const balances = await rpc.getCompressedTokenBalancesByOwner(
bob.publicKey,
{ mint },
Expand Down
16 changes: 8 additions & 8 deletions js/stateless.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@
"lint": "eslint ."
},
"nx": {
"targets": {
"build": {
"inputs": [
"{workspaceRoot}/target/idl",
"{workspaceRoot}/target/types"
]
}
"targets": {
"build": {
"inputs": [
"{workspaceRoot}/target/idl",
"{workspaceRoot}/target/types"
]
}
}
}
}
}
2 changes: 1 addition & 1 deletion photon-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "photon-api"
version = "0.25.0"
version = "0.26.0"
authors = ["OpenAPI Generator team and contributors"]
description = "Solana indexer for general compression"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions photon-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Solana indexer for general compression

This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.

- API version: 0.25.0
- Package version: 0.25.0
- API version: 0.26.0
- Package version: 0.26.0
- Generator version: 7.5.0
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`

Expand Down
1 change: 0 additions & 1 deletion photon-api/docs/TokenData.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amount** | **i32** | | [default to 100]
**delegate** | Option<**String**> | A Solana public key represented as a base58 string. | [optional][default to 11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3]
**delegated_amount** | **i32** | | [default to 100]
**is_native** | Option<**i32**> | | [optional][default to 100]
**mint** | **String** | A Solana public key represented as a base58 string. | [default to 11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3]
**owner** | **String** | A Solana public key represented as a base58 string. | [default to 11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3]
Expand Down
4 changes: 2 additions & 2 deletions photon-api/src/apis/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -38,7 +38,7 @@ impl Default for Configuration {
fn default() -> Self {
Configuration {
base_path: "http://127.0.0.1".to_owned(),
user_agent: Some("OpenAPI-Generator/0.25.0/rust".to_owned()),
user_agent: Some("OpenAPI-Generator/0.26.0/rust".to_owned()),
client: reqwest::Client::new(),
basic_auth: None,
oauth_access_token: None,
Expand Down
2 changes: 1 addition & 1 deletion photon-api/src/apis/default_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Solana indexer for general compression
*
* The version of the OpenAPI document: 0.25.0
* The version of the OpenAPI document: 0.26.0
*
* Generated by: https://openapi-generator.tech
*/
Expand Down
Loading

0 comments on commit 6f10474

Please sign in to comment.