mirror of https://github.com/status-im/nim-eth.git
Fix Authorization fields name to v, r, s (#749)
This commit is contained in:
parent
470baf82bd
commit
b736906dc7
|
@ -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
|
||||
|
|
|
@ -38,7 +38,7 @@ type
|
|||
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 =
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue