solana-fm / explorer-kit Goto Github PK
View Code? Open in Web Editor NEWPublic Solana Data Parser
License: GNU General Public License v3.0
Public Solana Data Parser
License: GNU General Public License v3.0
Describe the bug
I created an instruction parser for bubblegum. The parsing of innerInstructions
fails with error
return str
67 | }
68 | function decodeUnsafe (source) {
69 | console.log("DECODE UNSAFE");
70 | console.log(source);
71 | if (typeof source !== 'string') { throw new TypeError('Expected String') }
^
TypeError: Expected String
at decodeUnsafe (/home/almei/Documents/solana/solana-scripts/node_modules/@solanafm/utils/node_modules/bs58/node_modules/base-x/src/index.js:71:45)
at decode (/home/almei/Documents/solana/solana-scripts/node_modules/@solanafm/utils/node_modules/bs58/node_modules/base-x/src/index.js:115:18)
at z (/home/almei/Documents/solana/solana-scripts/node_modules/@solanafm/utils/dist/index.js:1:1956)
at parseInstructions (/home/almei/Documents/solana/solana-scripts/node_modules/@solanafm/explorer-kit/dist/index.mjs:5018:26)
at /home/almei/Documents/solana/solana-scripts/parsers/bubblegum.ts:61:40
at processTicksAndRejections (:61:77)
I added log statements in:
node_modules/@solanafm/utils/node_modules/bs58/node_modules/base-x/src/index.js:69
function decodeUnsafe (source) {
console.log("DECODE UNSAFE");
console.log(source);
if (typeof source !== 'string') { throw new TypeError('Expected String') }
The output is undefined
node_modules/@solanafm/utils/node_modules/bs58/node_modules/base-x/src/index.js
function decode (string) {
console.log("STRING TO DECODE");
console.log(string);
var buffer = decodeUnsafe(string)
The output is undefined
My:
BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY
4FZvTLqp3CutUBdq4ja9gtfvuF3NkhvRWBDGYaiQ1cptRBes8gpEpqfCKc83eM35GeGYGziX6K4kr7652KxLUWrG
I'm using the example script from #6
Screenshots
Here's a screenshot of my instruction data, accounts which exist and then the logs & error
Desktop (please complete the following information):
Ubuntu 22.04.3 LTS
1.0.22
Additional context
I cloned the repo and added a test with the programHash & transaction mentioned above and it errored the same there as well. Can this be a dependency issue?
Describe the bug
Cool project!
You can also checkout the examples as well!
The link to https://github.com/solana-fm/explorer-kit/examples is broken (and I can't find the read URL).
Describe the solution you'd like
Anchor recently released 0.3.0
of Anchor and there are breaking changes with regards to the IDL after it's generated from a 0.3.0
Anchor program. The IDLs from 0.29.0
and earlier will not be compatible with the 0.3.0
typescript client.
Additional context
Describe the bug
A clear and concise description of what the bug is.
I've installed the package into my CommonJS typescript application, however I get the following error when attempting to import the module:
Error [ERR_REQUIRE_ESM]: require() of ES Module ... /node_modules/change-case/dist/index.js
Can this get updated to support CommonJS? The cause appears to be the change-case
package that only gets used once to change a string to snake case.
This could easily be updated to use a local copy instead of relying on this module:
https://www.30secondsofcode.org/js/s/string-case-conversion/#convert-any-case-to-snake-case
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.