rchain / pyrchain

Python 3 interface to RChain RNode RPC
GNU General Public License v3.0
10 stars 10 forks source link

Reading data output to deployId with exploratory-deploy #74

Closed w2vy closed 3 years ago

w2vy commented 3 years ago

I have successfully deployed and executed a contract that results in executing

deployId(rho:rchain:deployId) and then deployId!(["#define", "inboxURI", uri]) where uri has been set to a valid uri

I have performed a client.deploy() It's on localhost so I also did a propose I can do a client.find_deploy and find the block the deploy is in What methods can I use to get the data.

I have tried client.get_data_at_deploy_id() I also have looked at https://developer.rchain.coop/rnode-api

w2vy commented 3 years ago

I have been able to use rnode-api to see that the deployed code is in a block, I have tried every api in there and I am left to think that the only place the ["#define", "inboxURI", "uri-encoded-name"] could be stored is the tuple space.

both explore-deploy and explore-deploy-by-block-hash require a term or rholang code to be run, I have looked at powerbox and can't see anything that will obviously let me find data with a deployid

i am missing something very simple

zsluedem commented 3 years ago

Please give me some time to verify this.

zsluedem commented 3 years ago

I have been able to use rnode-api to see that the deployed code is in a block, I have tried every api in there and I am left to think that the only place the ["#define", "inboxURI", "uri-encoded-name"] could be stored is the tuple space.

both explore-deploy and explore-deploy-by-block-hash require a term or rholang code to be run, I have looked at powerbox and can't see anything that will obviously let me find data with a deployid

i am missing something very simple

@w2vy Sorry for the late reply. I think I mislead you in the discord channel. Currently the explore deploy can not do such a thing and only data-at-name can do this trick.

zsluedem commented 3 years ago

close this one because of no replies. Feel free to reopen it if you got any further questions.

HiXiaozhe commented 10 months ago

I'm having the same problem as w2vy during smart contract deployment, that is, after deploying and proposing the smart contract locally, how to get the data in the channel. I tried the 'data_at_name' method but it doesn't work. It could be because I am not using it correctly, can you give me some help?