Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Commit 734e430

Browse files
authored
Grammatical corrections in eth-types (#1708)
Hello I am learning web3 programming, I went through some of the code because I was told zk is fascinating (and it is). I found some little errors in comments, nothing important. I hope you don't mind opening a PR for such a little thing, I read the contributing file and didn't find it being forbidden, but even if it is little I hope i'll help you even just a bit in your research. Thank you for making that repo public. Have a nice day.
1 parent ef14352 commit 734e430

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

eth-types/src/evm_types/memory.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl Memory {
293293
}
294294

295295
/// Reads an entire [`Word`] which starts at the provided [`MemoryAddress`]
296-
/// `addr` and finnishes at `addr + 32`.
296+
/// `addr` and finishes at `addr + 32`.
297297
pub fn read_word(&self, addr: MemoryAddress) -> Word {
298298
Word::from_big_endian(&self.read_chunk(addr, MemoryAddress::from(32)))
299299
}
@@ -359,7 +359,7 @@ impl Memory {
359359

360360
/// Copy source data to memory. Used in (ext)codecopy/calldatacopy.
361361
pub fn copy_from(&mut self, dst_offset: Word, src_offset: Word, length: Word, data: &[u8]) {
362-
// Reference go-ethereum `opCallDataCopy` function for defails.
362+
// Reference go-ethereum `opCallDataCopy` function for details.
363363
// https://github.com/ethereum/go-ethereum/blob/bb4ac2d396de254898a5f44b1ea2086bfe5bd193/core/vm/instructions.go#L299
364364

365365
// `length` should be checked for overflow during gas cost calculation.

eth-types/src/evm_types/opcode_ids.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ impl OpcodeId {
676676
let (min_stack_ptr, max_stack_ptr): (u32, u32) = match self {
677677
// `min_stack_pointer` 0 means stack overflow never happen, for example, `OpcodeId::ADD`
678678
// can only encounter underflow error, but never encounter overflow error.
679-
// `max_stack_pointer` means max stack poniter for op code normally run. for example,
679+
// `max_stack_pointer` means max stack pointer for op code normally run. for example,
680680
// `OpcodeId::ADD` 's max stack pointer is 1022, when actual sp > 1022, will
681681
// encounter underflow error.
682682
OpcodeId::STOP => (0, 1024),

eth-types/src/sign_types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn sign(
3636
let mut x_bytes = [0u8; 64];
3737
x_bytes[..32].copy_from_slice(&x_repr[..]);
3838

39-
let sig_r = secp256k1::Fq::from_uniform_bytes(&x_bytes); // get x cordinate (E::Base) on E::Scalar
39+
let sig_r = secp256k1::Fq::from_uniform_bytes(&x_bytes); // get x coordinate (E::Base) on E::Scalar
4040
let sig_s = randomness_inv * (msg_hash + sig_r * sk);
4141
(sig_r, sig_s)
4242
}

0 commit comments

Comments
 (0)