Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: update client to include rlp_encoded_tx #320

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

drohit-cb
Copy link
Contributor

@drohit-cb drohit-cb commented Nov 26, 2024

What changed? Why?

Update auto-generated client to include rlp_encoded_tx field within EthereumTransaction

Testing

>> npx ts-node --project tsconfig.json
> import { Coinbase, ExternalAddress, StakingReward, StakeOptionsMode, Validator, ValidatorStatus, Transaction, Asset, Wallet } from "./src";
undefined
> import { ethers } from "ethers";
undefined
> import axios from 'axios';
undefined
>
undefined
>
undefined
> const coinbase = Coinbase.configureFromJson({ filePath: "MY_KEY_PATH" });
undefined
>
undefined
> let ea = new ExternalAddress("ethereum-holesky", "0x87Bf57c3d7B211a100ee4d00dee08435130A62fA");
undefined
> let stakeOperation = await ea.buildStakeOperation(0.0001, "eth", StakeOptionsMode.PARTIAL);
undefined
> let tx = stakeOperation.getTransactions()[0];
undefined
> tx.content()!
{
  from: '0x87Bf57c3d7B211a100ee4d00dee08435130A62fA',
  gas: 300000,
  gas_price: 10000000032,
  hash: '0x2eea35130bef61142de193cc0c87d860f3bb9f2f2e34ddc5548bceaf70d5cb2b',
  input: '0x3a4b66f1',
  max_fee_per_gas: 10000000032,
  max_priority_fee_per_gas: 10000000000,
  nonce: 320,
  rlp_encoded_tx: '0x02f83b8242688201408502540be4008502540be420830493e094a55416de5de61a0ac1aa8970a280e04388b1de4b865af3107a4000843a4b66f1c0808080',
  to: '0xA55416de5DE61A0AC1aa8970a280E04388B1dE4b',
  type: 2,
  value: '100000000000000'
}
> tx.content()!.rlp_encoded_tx
'0x02f83b8242688201408502540be4008502540be420830493e094a55416de5de61a0ac1aa8970a280e04388b1de4b865af3107a4000843a4b66f1c0808080'

Qualified Impact

@drohit-cb drohit-cb requested a review from alex-stone November 26, 2024 16:44
CHANGELOG.md Outdated Show resolved Hide resolved
@drohit-cb drohit-cb force-pushed the feat/add-rlp-encoded-tx branch from 99e5298 to 002d6be Compare November 26, 2024 17:31
@drohit-cb drohit-cb requested a review from alex-stone November 26, 2024 17:33
@drohit-cb drohit-cb merged commit fb3bd35 into v0.11.0 Nov 26, 2024
4 checks passed
@drohit-cb drohit-cb deleted the feat/add-rlp-encoded-tx branch November 26, 2024 17:48
@alex-stone alex-stone mentioned this pull request Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants