aurora-is-near / aurora-engine

⚙️ Aurora Engine implements an Ethereum Virtual Machine (EVM) on the NEAR Protocol.
https://doc.aurora.dev/develop/compat/evm
330 stars 82 forks source link

Chore: Relocate Engine parameter type definitions #668

Closed birchmd closed 1 year ago

birchmd commented 1 year ago

Description

We're working on an Aurora SDK for Near contracts. The goal of this project is to make it easier for developers on Near to interact with the Aurora Engine from their own contracts. Part of this effort includes exposing common Engine types used for input and output of Engine functions (for example CallArgs and SubmitResult). Unfortunately the aurora-engine crate itself cannot be included as a library in another Wasm contract, and maybe that's for the best since it's pretty heavy-weight to include the whole Engine logic in something that is only acting as a client. Therefore, in this PR I move these important types to be defined in aurora-engine-types instead. I have left them as pub use in aurora-engine to as to not break any crates that depended on their definition being in the Engine as well.

I also needed to add an addition feature to the aurora-engine-types crate to avoid primitive-types/std since it pulls in getrandom which cannot be compiled to Near Wasm.

Performance / NEAR gas cost considerations

None; this is pure refactor only.