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
During the implementation of the reusable services integration it turns out that now the contracts are deployed in 2 steps:
The initcode is uploaded and saved as a file using a FileCreateTransactionBody.
The returned file id from step 1 is then passed to a ContractCreateTransactionBody.
Each step performs a separate transaction.
For step 2 even if we pass the correct file id, since the mirror node data is readonly, the FileReadableKVState is not able to populate the contract's bytecode from the DB since it was never explicitly persisted in the DB.
Solution
Add 2 new fields in the ContractCallContext that preserve the file id and the contract's bytecode. If they are available when we call FileReadableKVState#readFromDataSource, return them with priority.
Alternatives
No response
The text was updated successfully, but these errors were encountered:
Problem
During the implementation of the reusable services integration it turns out that now the contracts are deployed in 2 steps:
FileCreateTransactionBody
.ContractCreateTransactionBody
.Each step performs a separate transaction.
For step 2 even if we pass the correct file id, since the mirror node data is readonly, the
FileReadableKVState
is not able to populate the contract's bytecode from the DB since it was never explicitly persisted in the DB.Solution
Add 2 new fields in the
ContractCallContext
that preserve the file id and the contract's bytecode. If they are available when we callFileReadableKVState#readFromDataSource
, return them with priority.Alternatives
No response
The text was updated successfully, but these errors were encountered: