Replies: 1 comment
-
if you know the address that hold the resource and the resource type, you can call multiple |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Discord user ID
No response
Describe your question in detail.
Hello,
I want to create a smart contract to help me to pull all the needed information with a single request, instead of 1 request per address.
I have a webpage with charts (real-time prices of different pools) and for every pool I have to make 1 request, which is slow (request by request) or overloaded (requests in parallel). Theoretically I need to get the price every 500ms or 1sec, per pool.
I though to make a smart contract where I give as input 3 lists:
pools: vector<address>
,coinsA: vector<CoinType>
,coinsB: vector<CoinType>
.And inside of the function to access the resource:
pools[i].getResource(0x0::mod::ResX<coinsA[i], coinsB[i]>
- I know this is not right, but is for describing my idea.Or instead of coinsA and coinsB to have
resources: vector<Resources>
and to dopools[i].getResource(resources[i])
.It is possible any of these? Or any other way, to reduce the multiple requests to a single one? I am open to use any SDK if that helps me to achieve my target.
Thank you.
What error, if any, are you getting?
No response
What have you tried or looked at? Or how can we reproduce the error?
No response
Which operating system are you using?
Windows
Which SDK or tool are you using? (if any)
REST API
Describe your environment or tooling in detail
No response
Beta Was this translation helpful? Give feedback.
All reactions