Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Align transaction with ethereum execution apis #338

Closed
rafaelkallis opened this issue Jul 14, 2022 · 1 comment · Fixed by #341
Closed

Align transaction with ethereum execution apis #338

rafaelkallis opened this issue Jul 14, 2022 · 1 comment · Fixed by #341
Assignees
Labels
bug Something isn't working limechain P1
Milestone

Comments

@rafaelkallis
Copy link
Contributor

Description

return new Transaction({
accessList: undefined, // we don't support access lists for now, so punt
blockHash: contractResultDetails.block_hash.substring(0, 66),
blockNumber: EthImpl.numberTo0x(contractResultDetails.block_number),
chainId: contractResultDetails.chain_id,
from: contractResultDetails.from.substring(0, 42),
gas: contractResultDetails.gas_used,
gasPrice: EthImpl.toNullIfEmptyHex(contractResultDetails.gas_price),
hash: contractResultDetails.hash.substring(0, 66),
input: contractResultDetails.function_parameters,
maxPriorityFeePerGas: EthImpl.toNullIfEmptyHex(contractResultDetails.max_priority_fee_per_gas),
maxFeePerGas: EthImpl.toNullIfEmptyHex(contractResultDetails.max_fee_per_gas),
nonce: contractResultDetails.nonce,
r: rSig,
s: sSig,
to: contractResultDetails.to.substring(0, 42),
transactionIndex: contractResultDetails.transaction_index,
type: contractResultDetails.type,
v: contractResultDetails.v,
value: contractResultDetails.amount,
});

gas, transactionIndex, value require EthImpl.numberTo0x because they are uint (see https://github.com/ethereum/execution-apis/blob/main/src/schemas/transaction.yaml)

Steps to reproduce

eth_getBlockByNumber [17165012, true]

Additional context

image

Hedera network

testnet

Version

0.3.0

Operating system

Linux

@rafaelkallis rafaelkallis added the bug Something isn't working label Jul 14, 2022
@Nana-EC
Copy link
Collaborator

Nana-EC commented Jul 19, 2022

All uints should be hex encoded according to schema

@Nana-EC Nana-EC added this to the 0.5.0 milestone Jul 19, 2022
@natanasow natanasow self-assigned this Jul 19, 2022
Repository owner moved this from In Progress to Done in Smart Contract Sprint Board Jul 20, 2022
Nana-EC added a commit that referenced this issue Jul 21, 2022
Cherry-pick #338 to release/0.4

Update transaction response integers to be hexadecimal like ethereum execution apis schema

Signed-off-by: Nikolay Atanasow <n.atanasow94@gmail.com>
Signed-off-by: Nana-EC <nana@swirldslabs.com>

Co-authored-by: Nikolay Atanasow <n.atanasow94@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working limechain P1
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants