From d57fef899912bb4aabeee53877a65cd25766150d Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Wed, 24 Apr 2024 03:55:23 -0400 Subject: [PATCH] Slight documentation tweaks --- coins/ethereum/src/deployer.rs | 1 + processor/src/multisigs/scanner.rs | 1 + processor/src/multisigs/scheduler/mod.rs | 1 + spec/integrations/Ethereum.md | 12 +++++++----- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/coins/ethereum/src/deployer.rs b/coins/ethereum/src/deployer.rs index d6cfeee9d..1a16664cb 100644 --- a/coins/ethereum/src/deployer.rs +++ b/coins/ethereum/src/deployer.rs @@ -100,6 +100,7 @@ impl Deployer { let to_block = BlockNumberOrTag::Latest; // Find the first log using this init code (where the init code is binding to the key) + // TODO: Make an abstraction for event filtering (de-duplicating common code) let filter = Filter::new().from_block(0).to_block(to_block).address(Address::from(Self::address())); let filter = filter.event_signature(abi::Deployment::SIGNATURE_HASH); diff --git a/processor/src/multisigs/scanner.rs b/processor/src/multisigs/scanner.rs index 20c611924..3d28f3e83 100644 --- a/processor/src/multisigs/scanner.rs +++ b/processor/src/multisigs/scanner.rs @@ -29,6 +29,7 @@ pub enum ScannerEvent { outputs: Vec, }, // Eventuality completion found on-chain + // TODO: Move this from a tuple Completed( Vec, usize, diff --git a/processor/src/multisigs/scheduler/mod.rs b/processor/src/multisigs/scheduler/mod.rs index 6ec95fc44..26c940fe8 100644 --- a/processor/src/multisigs/scheduler/mod.rs +++ b/processor/src/multisigs/scheduler/mod.rs @@ -53,6 +53,7 @@ pub trait Scheduler: Sized + Clone + PartialEq + Debug { txn: &mut D::Transaction<'_>, utxos: Vec, payments: Vec>, + // TODO: Tighten this to multisig_for_any_change key_for_any_change: ::G, force_spend: bool, ) -> Vec>; diff --git a/spec/integrations/Ethereum.md b/spec/integrations/Ethereum.md index bf32f1012..1e1f3ba19 100644 --- a/spec/integrations/Ethereum.md +++ b/spec/integrations/Ethereum.md @@ -2,14 +2,16 @@ ### Addresses -Ethereum addresses are 20-byte hashes. +Ethereum addresses are 20-byte hashes, identical to Ethereum proper. ### In Instructions -Ethereum In Instructions are present via being appended to the calldata -transferring funds to Serai. `origin` is automatically set to the party from -which funds are being transferred. For an ERC20, this is `from`. For ETH, this -is the caller. +In Instructions may be created in one of two ways. + +1) Have an EOA call `transfer` or `transferFrom` on an ERC20, appending the + encoded InInstruction directly after the calldata. `origin` defaults to the + party transferred from. +2) Call `inInstruction` on the Router. `origin` defaults to `msg.sender`. ### Out Instructions