Skip to content

Commit

Permalink
Adjust to more breaking changes (helius-labs#110)
Browse files Browse the repository at this point in the history
* Adjust to Light Protocol breaking changes

* Upgrade to 0.27

* Adjust to more breaking changes

* Publish new version
  • Loading branch information
pmantica11 authored Jun 26, 2024
1 parent f518959 commit 294ce1c
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "photon-indexer"
publish = true
readme = "README.md"
repository = "https://github.com/helius-labs/photon"
version = "0.27.0"
version = "0.28.0"

[[bin]]
name = "photon"
Expand Down
4 changes: 2 additions & 2 deletions src/api/method/get_multiple_new_address_proofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct MerkleContextWithNewAddressProof {
pub address: SerializablePubkey,
pub lowerRangeAddress: SerializablePubkey,
pub higherRangeAddress: SerializablePubkey,
pub leafIndex: u32,
pub nextIndex: u32,
pub proof: Vec<Hash>,
pub merkleTree: SerializablePubkey,
pub rootSeq: u64,
Expand Down Expand Up @@ -60,7 +60,7 @@ pub async fn get_multiple_new_address_proofs_helper(
address,
lowerRangeAddress: SerializablePubkey::try_from(model.value)?,
higherRangeAddress: SerializablePubkey::try_from(model.next_value)?,
leafIndex: model.next_index as u32,
nextIndex: model.next_index as u32,
proof: proof.proof,
lowElementLeafIndex: model.leaf_index as u32,
merkleTree: SerializablePubkey::from(ADDRESS_TREE_ADDRESS),
Expand Down
4 changes: 2 additions & 2 deletions src/api/method/get_validity_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn convert_non_inclusion_merkle_proof_to_hex(
.iter()
.map(|x| hash_to_hex(x))
.collect(),
next_index: non_inclusion_merkle_proof_inputs[i].leafIndex,
next_index: non_inclusion_merkle_proof_inputs[i].nextIndex,
leaf_lower_range_value: pubkey_to_hex(
&non_inclusion_merkle_proof_inputs[i].lowerRangeAddress,
),
Expand Down Expand Up @@ -336,7 +336,7 @@ pub async fn get_validity_proof(
leafIndices: account_proofs
.iter()
.map(|x| x.leafIndex)
.chain(new_address_proofs.iter().map(|x| x.leafIndex))
.chain(new_address_proofs.iter().map(|x| x.lowElementLeafIndex))
.collect(),
leaves: account_proofs
.iter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ expression: proof
"address": "1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh",
"lowerRangeAddress": "11111111111111111111111111111111",
"higherRangeAddress": "14LNC6QgTME7wBRWqnWLc2TW28YUVTZS5BUhYurVjuMU",
"leafIndex": 2,
"nextIndex": 2,
"proof": [
"34cMT7MjFrs8hLp2zHMrPJHKkUxBDBwBTNck77wLjjcY",
"3NSmDbNhhgymcVqrKTWPHGN2UbVLgQcMZJh13b5YWhxQ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ expression: proof
"address": "Fi6AXBGuGs7DRXP428hwhJJfTpJ4BVZD8DiUcX1cj35W",
"lowerRangeAddress": "11111111111111111111111111111111",
"higherRangeAddress": "14uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofL",
"leafIndex": 1,
"nextIndex": 1,
"proof": [
"34cMT7MjFrs8hLp2zHMrPJHKkUxBDBwBTNck77wLjjcY",
"3CFKteYSRSkp9EGFPzibgzCPtNuJ5HeZ31fAsBpgcHwZ",
Expand Down Expand Up @@ -50,7 +50,7 @@ expression: proof
"address": "sH8ux4csv8wxiRejuHjpTCkrfGgeNtg6Y55AJJ9GJSd",
"lowerRangeAddress": "11111111111111111111111111111111",
"higherRangeAddress": "14uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofL",
"leafIndex": 1,
"nextIndex": 1,
"proof": [
"34cMT7MjFrs8hLp2zHMrPJHKkUxBDBwBTNck77wLjjcY",
"3CFKteYSRSkp9EGFPzibgzCPtNuJ5HeZ31fAsBpgcHwZ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ expression: validity_proof
3
],
"leafIndices": [
1
0
],
"leaves": [
"12nCKqGG85jHxbTeA8i2Z7D4vnNUUrQ4r5e8dv2o16X"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ expression: proof
"address": "12nCKqGG85jHxbTeA8i2Z7D4vnNUUrQ4r5e8dv2o16X",
"lowerRangeAddress": "11111111111111111111111111111111",
"higherRangeAddress": "14uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofL",
"leafIndex": 1,
"nextIndex": 1,
"proof": [
"34cMT7MjFrs8hLp2zHMrPJHKkUxBDBwBTNck77wLjjcY",
"3CFKteYSRSkp9EGFPzibgzCPtNuJ5HeZ31fAsBpgcHwZ",
Expand Down

0 comments on commit 294ce1c

Please sign in to comment.