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
For things like events (#373) we need or EVM compatibility, we something needs addresses for things that are entirely in the rollup (not part of any underlying chain) and not a user address either. This is conceptually equivalent to precompiles you see in other chains (ex: Ethereum)
I think the best way to expose this is the following:
Games have a new folder called something like precompile (or maybe placed in the contracts folder)
The precompile folder has code that looks like this:
The JS code generates an object that looks like { Foo: "0x...", Bar: "0x..." } where the hash value is something like sha3("foo")
In places in your code (ex: events) where you need to refer to these precompiles, you use import { precompiles} from "contracts"; precompiles.Foo
The precompiles need to be extracted and put in the packaged folder so that other tools can know the inverse map (the string that generated the address)
An example would be in Tarochi, when you buy something from the store, it could generate an event where the contract address is something like generatePrecompile("general store")
The API might need to be slightly different (ex: maybe use enums instead) to ensure that the types are resolved statically
The text was updated successfully, but these errors were encountered:
For things like events (#373) we need or EVM compatibility, we something needs addresses for things that are entirely in the rollup (not part of any underlying chain) and not a user address either. This is conceptually equivalent to precompiles you see in other chains (ex: Ethereum)
I think the best way to expose this is the following:
precompile
(or maybe placed in the contracts folder){ Foo: "0x...", Bar: "0x..." }
where the hash value is something likesha3("foo")
import { precompiles} from "contracts"; precompiles.Foo
packaged
folder so that other tools can know the inverse map (the string that generated the address)An example would be in Tarochi, when you buy something from the store, it could generate an event where the contract address is something like
generatePrecompile("general store")
The API might need to be slightly different (ex: maybe use enums instead) to ensure that the types are resolved statically
The text was updated successfully, but these errors were encountered: