Skip to content

Commit 7bcdf8b

Browse files
authored
P-865 Adding solana token holding amount (#2905)
* add MoralisClient * fix secrets * remove func * add solana configure * fmt * refactor tokens * removing tokenname mapping * simplify constructor * change type * change one more * brc20 * erc20 * refactoring token info * roolback MoralisClient * fix params * Integrated function
1 parent 92a63e7 commit 7bcdf8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+834
-1101
lines changed

tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Utils.sol

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,4 @@ library Utils {
168168

169169
return (success, value);
170170
}
171-
function isStringsEqual(
172-
string memory a,
173-
string memory b
174-
) internal pure returns (bool) {
175-
return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b));
176-
}
177171
}

tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/Constants.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ pragma solidity ^0.8.8;
2121
library Constants {
2222
uint256 constant decimals_factor = 1000;
2323
}
24+
struct TokenInfo {
25+
uint32 network;
26+
string tokenAddress;
27+
}

tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/GeniidataClient.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import "../libraries/Utils.sol";
2424

2525
library GeniidataClient {
2626
function getTokenBalance(
27-
string[] memory secrets,
27+
string memory secret,
2828
string memory identityString,
2929
string memory tokenName,
3030
uint8 tokenDecimals
@@ -40,7 +40,7 @@ library GeniidataClient {
4040
)
4141
);
4242
HttpHeader[] memory headers = new HttpHeader[](1);
43-
headers[0] = HttpHeader("api-key", secrets[1]);
43+
headers[0] = HttpHeader("api-key", secret);
4444

4545
// https://geniidata.readme.io/reference/get-brc20-tick-list-copy
4646
(bool success, string memory value) = Http.GetString(

0 commit comments

Comments
 (0)