-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the eth_sendRawTransaction JSON-RPC endpoint
- Loading branch information
Showing
6 changed files
with
169 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// TODO(m-Peter): Use proper address for each network | ||
import EVM from 0xf8d6e0586b0a20c7 | ||
|
||
transaction(encodedTx: [UInt8]) { | ||
let bridgedAccount: &EVM.BridgedAccount | ||
|
||
prepare(signer: auth(Storage) &Account) { | ||
self.bridgedAccount = signer.storage.borrow<&EVM.BridgedAccount>( | ||
from: /storage/evm | ||
) ?? panic("Could not borrow reference to the bridged account!") | ||
} | ||
|
||
execute { | ||
EVM.run(tx: encodedTx, coinbase: self.bridgedAccount.address()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters