-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
In case WASM will not support asynchronous methods we might need to take an alternative approach.
A simple way is to have each operation work with polling, storageLoad would become:
ethereum.storageLoad(args)ethereum.storageLoadResult() -> i32(where 1 means result is written to the specified memory location)
And the following pseudocode in WASM:
ethereum.storageLoad()
do {
result = ethereum.storageLoadResult()
} while(!result)
The JS interface would need to do the sleep then. It's not efficient at all, but there's no way to sleep in WASM.