Can the contract state be set to a different value for every deployment during the deployment transaction?
Something like this:
const initialState: Field = Field.random()
const transaction = await Mina.transaction(
{ sender, fee: transactionFee, memo: “Mina Navigators“ },
() => {
AccountUpdate.fundNewAccount(sender);
zkApp.deploy({ verificationKey });
zkApp.init(initialState) // sets @state(Field) state to initialState
}
);
I've found no way so far to do it, as the init() function does not take arguments.
Now I first send the deployment transaction, wait for it to be included in the block, and then send the second transaction to initialize the contract state to custom values that are different for every deployment (like name for NFT).
I want to send one transaction instead of two.