Closed Tarnadas closed 12 months ago
@Tarnadas Did you compile your contract / workspaces-rs project with Rust <= 1.69? See this issue for more details: https://github.com/near/nearcore/issues/9143
Hey @frol, yes I'm aware of the issue and use Rust 1.69. But why should the Rust version that I use for compilation affect this? Isn't workspaces doing an RPC call and not doing anything on chain in my case?
@Tarnadas If you use workspaces-rs
to compile your smart contract, it will compile it with whatever Rust compiler it finds and deploy it (actually, hard to tell without looking at the code of the test you wrote), and then it will fail to be executed on nearcore.
Ah ok, that makes it clear. But I don't use workspaces to compile my code. I have a build script and just load the wasm file for deployment.
In this particular case I don't use workspaces for integration tests, but instead I have a deploy program for testnet. I read the existing contract state to delete existing keys and do a deployment afterwards.
@Tarnadas If you don't use workspaces-rs, submit your issue somewhere it belongs to and provide more details with the code you run, otherwise it is impossible to help you.
I wrote in the issue that I use ‘view_state‘ from workspaces: https://docs.rs/workspaces/0.7.0/workspaces/struct.Worker.html#method.view_state
Is this issue still relevant, If it is stale we can close it.
@Tarnadas Please, try using the latest near-workspaces
0.9 release and feel free to reopen this issue if it still fails for you
Hey,
I have a script to deploy my contract. As preparation I read all keys to clean up storage for a redeployment and I use workspaces for this. However just recently the call to
view_state
returns an error:I changed my code to manually call the RPC server via this query and it works:
So it seems like the error must be in the workspaces crate.