2

Let's assume we have a frontier-based node with smart contract X. From an off-chain worker, we want to call X.some_method() which will return data, and then the worker would use this data to make some business decisions and submit a transaction back to update the contract state. Would that be possible by directly calling the evm pallet from the off-chain worker, without the need to make RPC calls?

1 Answer 1

2

I don't know much about EVM and Frontier, but in general offchain workers cannot write to the state directly, so if they call into a function directly that has some side effect, it will be ignored. The only way for them to write to state is to emit a transaction back to the local node and the rest of the network.

Thus,

Would that be possible by directly calling the evm pallet from the off-chain worker, without the need to make RPC calls?

I believe no.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.