Open arrusev opened 1 year ago
/data
endpoint still needs some work to work as expected
e.g. this change has been deployed only recently https://github.com/vgrichina/fast-near/commit/50f9fce1aff3121a34d60d37f71a13b61044bea1 and I don't think testnet RPC is up to date with it
there might need to be some caching changes as well
I think only contract calls / account views have been tested extensively so far
@arrusev may you give more details on what's your use case for fetching state vs calling contract?
I think even with https://github.com/vgrichina/fast-near/commit/50f9fce1aff3121a34d60d37f71a13b61044bea1 there are more issues with contracts which have a lot of state changes for single key – I'm gonna prepare few more improvements to get it work
but basically main reason that /data
is not in readme is because it's not quire ready as is
we want to extend the near-api-js
library to be able to execute contract functions locally, instead of calling RPC provider.
We face some issues with states bigger than 50kb and in that case, we want to use fast-near
API to retrieve the whole contract state
@arrusev are you still working on this?
@arrusev are you still working on this?
I am personally not involved in this anymore but other people are working on stuff related to near-api-js
. @vikinatora , @gtsonevv
I'm trying to fetch the most recent state of
priceoracle.testnet
contract but the response differs from the one that RPC request returns.How to reproduce:
Make RPC call
Make Fast-Near HTTP call:
Compare the results: The value
AgAAAABpBAAAAAAAAAACAAAAAGsEAAAAAAAAAAIAAAAAdgIAAAABaQoAAAAAAAAAAgAAAAFrCgAAAAAAAAACAAAAAXZaAAAAEwAAAHByaWNlb3JhY2xlLnRlc3RuZXQAAAAlpAAKi8oiBAAAAAAA
returned from the RPC call is missing within Fast-Near's response.Also i've tried to supply the
iterator
param in order to fetch the next page but the response is 1:1 the same as without iterator(it seems like the response is cached but not refetched).https://rpc.web4.testnet.page/account/priceoracle.testnet/data/STATE?encoding=base64&iterator=02643a70726963656f7261636c652e746573746e65743a535441544507e78d04