Fix Authorization fields name to v, r, s (#749)

This commit is contained in:
andri lim 2024-10-15 21:09:16 +07:00 committed by GitHub
parent 470baf82bd
commit b736906dc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 19 additions and 19 deletions

View File

@ -69,8 +69,8 @@ jobs:
if: runner.os == 'Linux' && matrix.target.cpu == 'i386'
run: |
sudo dpkg --add-architecture i386
sudo apt-fast update -qq
sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \
sudo apt-get update -qq
sudo DEBIAN_FRONTEND='noninteractive' apt-get install \
--no-install-recommends -yq gcc-multilib g++-multilib \
libz-dev:i386 libbz2-dev:i386 liblz4-dev:i386 libssl-dev:i386
mkdir -p external/bin

View File

@ -33,12 +33,12 @@ type
## AKA mix_digest in some specs - Hash32 in the eth API but Bytes32 in
## the execution API and spec!
nonce*: Bytes8
baseFeePerGas*: Opt[UInt256] # EIP-1559
withdrawalsRoot*: Opt[Hash32] # EIP-4895
blobGasUsed*: Opt[uint64] # EIP-4844
excessBlobGas*: Opt[uint64] # EIP-4844
baseFeePerGas*: Opt[UInt256] # EIP-1559
withdrawalsRoot*: Opt[Hash32] # EIP-4895
blobGasUsed*: Opt[uint64] # EIP-4844
excessBlobGas*: Opt[uint64] # EIP-4844
parentBeaconBlockRoot*: Opt[Hash32] # EIP-4788
requestsRoot*: Opt[Hash32] # EIP-7685
requestsHash*: Opt[Hash32] # EIP-7685
# starting from EIP-4399, `mixDigest` field is called `prevRandao`
template prevRandao*(h: Header): Bytes32 =

View File

@ -24,9 +24,9 @@ type
chainId*: ChainId
address*: Address
nonce*: AccountNonce
yParity*: uint64
R*: UInt256
S*: UInt256
v*: uint64
r*: UInt256
s*: UInt256
TxType* = enum
TxLegacy # 0

View File

@ -76,9 +76,9 @@ proc append*(w: var RlpWriter, x: Authorization) =
w.append(x.chainId.uint64)
w.append(x.address)
w.append(x.nonce)
w.append(x.yParity)
w.append(x.R)
w.append(x.S)
w.append(x.v)
w.append(x.r)
w.append(x.s)
proc appendTxEip7702(w: var RlpWriter, tx: Transaction) =
w.startList(13)
@ -310,9 +310,9 @@ proc read*(rlp: var Rlp, T: type Authorization): T {.raises: [RlpError].} =
result.chainId = rlp.read(uint64).ChainId
rlp.read(result.address)
rlp.read(result.nonce)
rlp.read(result.yParity)
rlp.read(result.R)
rlp.read(result.S)
rlp.read(result.v)
rlp.read(result.r)
rlp.read(result.s)
proc readTxEip7702(rlp: var Rlp, tx: var Transaction) {.raises: [RlpError].} =
tx.txType = TxEip7702

View File

@ -26,9 +26,9 @@ const
chainID: 1.ChainId,
address: source,
nonce: 2.AccountNonce,
yParity: 3,
R: 4.u256,
S: 5.u256
v: 3,
r: 4.u256,
s: 5.u256
)]
proc tx0(i: int): PooledTransaction =