Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-script for populating data for one contract only (trying to fix psalomo.near nft image) #6

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

petersalomonsen
Copy link
Contributor

@petersalomonsen petersalomonsen commented Jan 4, 2022

I'm trying to recreate the following error locally (in my gitpod dev env)

http post https://fastrpc.mainnet.near.org jsonrpc=2.0 id=dontcare method=query \                       
  params:='{
    "request_type": "call_function",
    "method_name": "web4_get",
    "account_id": "psalomo.near",
    "args_base64": "eyJyZXF1ZXN0IjogeyJwYXRoIjogIi9uZnRpbWFnZS8xLnN2ZyJ9fQ=="
    }'
HTTP/1.1 400 Bad Request
Content-Length: 140
Date: Tue, 04 Jan 2022 19:25:53 GMT
Server: Google Frontend
X-Cloud-Trace-Context: 10d73d2534acf943ed78a6cd09271439;o=1
content-type: text/plain; charset=utf-8

Error: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined

This PR includes a script for populating data for one contract only to redis (instead of waiting for the full indexer). However it seems like the error above is not reproducible, everything works fine when data is populated this way. Trying to figure out why this is not the case with the production fastrpc.

For populating data for the contract that fails, run:

yarn dev-preload-data psalomo.near

This PR also contains gitpod.yml to install redis in the dev environment.

As soon as I'm able to reproduce the error, I'll try to fix #5

preload with code

contract from argument, preload data

preload with history from helper
@petersalomonsen
Copy link
Contributor Author

I can reproduce this error by setting contractId to undefined

@petersalomonsen
Copy link
Contributor Author

It seems like this fix is not deployed to production 004061b

is this correct @vgrichina ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant