mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-28 22:49:42 +00:00
3f0f4d520d
If instead of intaking calls, we intake code, we can deploy a fresh contract which makes arbitrary calls *without* attempting to build our abstraction layer over the concept. This should have the same gas costs, as we still have one contract deployment. The new contract only has a constructor, so it should have no actual code and beat the Sandbox in that regard? We do have to call into ourselves to meter the gas, yet we already had to call into the deployed Sandbox to achieve that. Also re-defines the OutInstruction to include tokens, implements OutInstruction-specified gas amounts, bumps the Solidity version, and other such misc changes.
9 lines
305 B
Rust
9 lines
305 B
Rust
use std::{env, fs};
|
|
|
|
fn main() {
|
|
let artifacts_path = env::var("OUT_DIR").unwrap().to_string() + "/ethereum-schnorr-contract";
|
|
if !fs::exists(&artifacts_path).unwrap() {
|
|
fs::create_dir(&artifacts_path).unwrap();
|
|
}
|
|
build_solidity_contracts::build(&[], "contracts", &artifacts_path).unwrap();
|
|
}
|