You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building the SmartContract deploy transaction without calling compile(), o1js refuses to build, asking for the verification key to be present. In frontend, it does not make sense to compile the SmartContract if the proving is being made on backend. The workaround now is to directly set the _verificationKey variable using pre-calculated verification keys for different networks:
It is a different case—I need this for devnet and mainnet and need to deploy a contract (in my case, FungibleToken) with a valid verification key that will be used later to send the transaction to the contract on devnet and mainnet. I prove all the transactions, just in the cloud. In the browser, I build the tx and sign it using Auro Wallet with the user's private key; then I send it to the cloud for proving.
Usually, I do not need to compile, prove, or have the verification keys for it. The deploy transaction is the exception as the verification key is needed for building the AccountUpdate, and I need a way to use it without compiling.
Theoretically, I can build AccountUpdate manually, but it is better to rely on FungibleToken deploy().
When building the SmartContract deploy transaction without calling
compile()
, o1js refuses to build, asking for the verification key to be present. In frontend, it does not make sense to compile the SmartContract if the proving is being made on backend. The workaround now is to directly set the_verificationKey
variable using pre-calculated verification keys for different networks:The variable
_verificationKey
is an internal one and can be changed in future o1js versions.Proposal:
Add SmartContract.setVerificationKeyUnsafe(vk: VerificationKey) to set verification key of the SmartContract without compiling it.
The text was updated successfully, but these errors were encountered: