diff --git a/chapter1/bls-multisig/README.md b/chapter1/bls-multisig/README.md index 8ea5949..6c89150 100644 --- a/chapter1/bls-multisig/README.md +++ b/chapter1/bls-multisig/README.md @@ -58,7 +58,7 @@ If all of those steps are successful, we can execute the operation. ### Integration -We've prepated 2 code snippets demonstrating integration of the above contract to aggregate and submit signatures obtained off-chain. Examples are written in [Rust](./rust) and [Python](./python). We will walk through the Rust code, but the Python code is very similar. +We've prepared 2 code snippets demonstrating integration of the above contract to aggregate and submit signatures obtained off-chain. Examples are written in [Rust](./rust) and [Python](./python). We will walk through the Rust code, but the Python code is very similar. We will use [blst](https://github.com/supranational/blst) library for BLS operations. diff --git a/chapter1/delegate-p256/README.md b/chapter1/delegate-p256/README.md index 5c11913..07e5e61 100644 --- a/chapter1/delegate-p256/README.md +++ b/chapter1/delegate-p256/README.md @@ -3,7 +3,7 @@ [EIP-7702](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7702.md) and [EIP-7212](https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md) allow to delegate control over an EOA to a P256 key. This has large potential for UX improvement as P256 keys are adopted by commonly used protocols like [Apple Secure Enclave](https://support.apple.com/en-au/guide/security/sec59b0b31ff/web) and [WebAuthn](https://webauthn.io). ## Why do EIP-7702+EIP-7212 matter? -The traditional flow of crypto onboarding experience can feel cumbersome: Users have to setup a wallet, back up their mnemonic phrase and make sure to keep it safe. What if there was an simpler and more secure way to manage private keys? Passkeys have already solved this problem by allowing users to authenticate using methods like Touch ID while keeping passwords safe. These keys are generated within secure hardware modules, such as Apple's Secure Enclave or a Trusted Platform Module (TPM), which are isolated from the operating system to protect them from being exposed. +The traditional flow of crypto onboarding experience can feel cumbersome: Users have to setup a wallet, back up their mnemonic phrase and make sure to keep it safe. What if there was a simpler and more secure way to manage private keys? Passkeys have already solved this problem by allowing users to authenticate using methods like Touch ID while keeping passwords safe. These keys are generated within secure hardware modules, such as Apple's Secure Enclave or a Trusted Platform Module (TPM), which are isolated from the operating system to protect them from being exposed. EIP-7212 introduces a precompile for the **secp256r1** elliptic curve, a curve that is widely used in protocols like [Apple Secure Enclave](https://support.apple.com/en-au/guide/security/sec59b0b31ff/web) and [WebAuthn](https://webauthn.io). EIP-7702 introduces a new transaction type, allowing an Externally Owned Accounts (EOAs) to function like a smart contract. This unlocks features such as gas sponsorship, transaction bundling or granting limited permissions to a sub-key. diff --git a/chapter1/eof/README.md b/chapter1/eof/README.md index b85c28a..b1ff629 100644 --- a/chapter1/eof/README.md +++ b/chapter1/eof/README.md @@ -1,10 +1,10 @@ # EOF ## Context -EOF (Ethereum Object Format) is a series of EIPs which aim to improve effenciency & security of smart contract deployment & execution. EOF introduces a new binary format for smart contracts on the Ethereum blockchain. +EOF (Ethereum Object Format) is a series of EIPs which aim to improve efficiency & security of smart contract deployment & execution. EOF introduces a new binary format for smart contracts on the Ethereum blockchain. ## How to compile for EOF -Support for EOF compilation is avaiable natively in [foundry](https://github.com/foundry-rs/foundry). +Support for EOF compilation is available natively in [foundry](https://github.com/foundry-rs/foundry). Compile the contracts with EOF, using the `--eof` flag. Note that this will pull a docker image and might take a while to download on the first iteration ```bash @@ -141,7 +141,7 @@ The banned opcodes are: - Legacy call instructions: `CREATE`, `CALL`, `DELEGATECALL`, `CREATE2`, `STATICCALL` - Legacy opcodes: `SELFDESTRUCT`, `CALLCODE` -Your contracts are likely to get affected by `EXTCODESIZE` ban, because it made checks like `address(...).code.length > 0` impossible. Another common pattern is calls/staticcalls in low-level assembly. Those would need to either be cahnged to high-level calls or changed to `ext*` instructions. i.e +Your contracts are likely to get affected by `EXTCODESIZE` ban, because it made checks like `address(...).code.length > 0` impossible. Another common pattern is calls/staticcalls in low-level assembly. Those would need to either be changed to high-level calls or changed to `ext*` instructions. i.e ```solidity assembly { call(gas(), to, value, offset, size, retOffset, retSize) diff --git a/chapter1/simple-7702/README.md b/chapter1/simple-7702/README.md index e17b0ca..9420c77 100644 --- a/chapter1/simple-7702/README.md +++ b/chapter1/simple-7702/README.md @@ -50,7 +50,7 @@ SIGNED_AUTH=$(cast wallet sign-auth $SIMPLE_DELEGATE_ADDRESS --private-key $ALIC cast send $ALICE_ADDRESS "execute((bytes,address,uint256)[])" "[("0x",$(cast az),0)]" --private-key $BOB_PK --auth $SIGNED_AUTH ``` -This is done by passing `--auth` flag, which can accept either an address or an encoded authorization. The transaction above would firstly apply a signed authorization, making Alice’s EOA to have bytecode delegating to deployed contract. After that it will be executed as a call to Alice which code would already include the newly added bytecode, allowing us to succesfully call `execute` and transact on her behalf. +This is done by passing `--auth` flag, which can accept either an address or an encoded authorization. The transaction above would firstly apply a signed authorization, making Alice’s EOA to have bytecode delegating to deployed contract. After that it will be executed as a call to Alice which code would already include the newly added bytecode, allowing us to successfully call `execute` and transact on her behalf. - Verify that our command was successful, by checking Alice's code which now contains the [delegation designation](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7702.md#delegation-designation) prefix `0xef01`: