Skip to content

Commit

Permalink
P-865 Adding solana token holding amount (#2905)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
0xverin authored Jul 22, 2024
1 parent 92a63e7 commit 7bcdf8b
Show file tree
Hide file tree
Showing 55 changed files with 834 additions and 1,101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,4 @@ library Utils {

return (success, value);
}
function isStringsEqual(
string memory a,
string memory b
) internal pure returns (bool) {
return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ pragma solidity ^0.8.8;
library Constants {
uint256 constant decimals_factor = 1000;
}
struct TokenInfo {
uint32 network;
string tokenAddress;
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import "../libraries/Utils.sol";

library GeniidataClient {
function getTokenBalance(
string[] memory secrets,
string memory secret,
string memory identityString,
string memory tokenName,
uint8 tokenDecimals
Expand All @@ -40,7 +40,7 @@ library GeniidataClient {
)
);
HttpHeader[] memory headers = new HttpHeader[](1);
headers[0] = HttpHeader("api-key", secrets[1]);
headers[0] = HttpHeader("api-key", secret);

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

0 comments on commit 7bcdf8b

Please sign in to comment.