GithubHelp home page GithubHelp logo

Is it mandatory to cache the abi? about eosjs HOT 11 CLOSED

eosio avatar eosio commented on June 9, 2024
Is it mandatory to cache the abi?

from eosjs.

Comments (11)

jcalfee avatar jcalfee commented on June 9, 2024 1

a) I need to add ABI support to eos.transaction ... As you discovered, you can use eos.contract instead..
b) eosioc tells me you may be using dawn 3 so this may be related.. There are many changes. I'll start adding support next week. If you need a work-around, try using the dawn2 build tag.

from eosjs.

jcalfee avatar jcalfee commented on June 9, 2024 1

It is mandatory to download the ABI and it will automatically cache. I don't have to cache it.

from eosjs.

jcalfee avatar jcalfee commented on June 9, 2024 1

Did you go back to dawn2? You may need dawn3 updates, I'm working on that now..

from eosjs.

kesar avatar kesar commented on June 9, 2024

b) eosioc tells me you may be using dawn 3 so this may be related.. There are many changes. I'll start adding support next week. If you need a work-around, try using the dawn2 build tag.

Yeah, I am using https://github.com/EOSIO/eos/releases/tag/DAWN-2018-01-31-ALPHA probably its because of that! 👍If you want the code for testing you can find it: ( https://github.com/kesar/twitbot/tree/master/contracts/twitbot ) it works fine from command line.

Isn't possible to upload contracts without abi ? I guess it needs to be supported a contract without abi as well.

from eosjs.

jcalfee avatar jcalfee commented on June 9, 2024

Isn't possible to upload contracts without abi ? I guess it needs to be supported a contract without abi as well.

Perhaps, I can see a scheduled event used in this way. But If a contract does not have an ABI, there are no action methods to call so the eos.contract lookup method would have no use anyways. So the ABI is required for the eos.contract lookup so it will have one or more actions to call.

from eosjs.

jcalfee avatar jcalfee commented on June 9, 2024

a) npm [email protected] will lookup the ABI for each message when you provide a full transaction.
b) tracked under another ticket: #25

Now, back to abi caching .. I'm going to look at the dawn 3 get_code API and see if that changed. What I really need is a get_abi and a immutable flag, this way I know to automatically re-fresh the cache frequency if the abi is mutable. I assume you have no issues with memory right? I'm thinking I can cache all ABIs but I need to refresh in some cases.

from eosjs.

kesar avatar kesar commented on June 9, 2024

a) npm [email protected] will lookup the ABI for each message when you provide a full transaction.

👍 awesome. I'm gonna test it :)

from eosjs.

kesar avatar kesar commented on June 9, 2024

yeah, transaction now doesnt return the abi cache issue. 👍

I'm getting something different not related to this issue, perhaps you can also throw some light? The type is uint64, but passing quantity: 1 it doesnt work. Any idea how should I send a uint64 format ?

Thanks!

from eosjs.

jcalfee avatar jcalfee commented on June 9, 2024

Use a string, if the number is not quoted javascript will change your number to be about 53 bits even if the number is larger..

from eosjs.

kesar avatar kesar commented on June 9, 2024

Use a string, if the number is not quoted javascript will change your number to be about 53 bits even if the number is larger..

It seems that its not doing it, perhaps an issue in the fcbuffer?: I changed it to quantity: "1"

Error: Required uint64 tip.2 message.data transaction.messages
at validateInt (/Users/kesar/PhpstormProjects/twitbot/app/node_modules/fcbuffer/lib/types.js:677:11)
at Object.fromObject (/Users/kesar/PhpstormProjects/twitbot/app/node_modules/fcbuffer/lib/types.js:444:7)
at Object.fromObject (/Users/kesar/PhpstormProjects/twitbot/app/node_modules/fcbuffer/lib/struct.js:144:34)
at messageDataFromObject (/Users/kesar/PhpstormProjects/twitbot/app/node_modules/eosjs/lib/structs.js:428:29)
at Object.fromObject (/Users/kesar/PhpstormProjects/twitbot/app/node_modules/fcbuffer/lib/struct.js:141:15)
at Object.fromObject (/Users/kesar/PhpstormProjects/twitbot/app/node_modules/fcbuffer/lib/types.js:320:28)
at Object.fromObject (/Users/kesar/PhpstormProjects/twitbot/app/node_modules/fcbuffer/lib/struct.js:144:34)
at /Users/kesar/PhpstormProjects/twitbot/app/node_modules/eosjs/lib/write-api.js:553:34
at /Users/kesar/PhpstormProjects/twitbot/app/node_modules/eosjs/lib/write-api.js:699:7
at /Users/kesar/PhpstormProjects/twitbot/app/node_modules/eosjs-api/lib/exported-helpers.js:65:7

from eosjs.

kesar avatar kesar commented on June 9, 2024

Oh ok! so that would be the problem :)

Feel free to ping me in telegram ( @kesarito ) if you want me to help with testing

I will close this issues as the ABI thing is solved! Thanks 🙏

from eosjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.