feat(txm): transactions with value#647
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
not-reed
left a comment
There was a problem hiding this comment.
i think in the txm getting-started changing /txm/api/interfaces/TransactionConstructorConfig to /txm/api/type-aliases/TransactionConstructorConfig fixes the docs build error
contracts/package.json
Outdated
| "account-abstraction": "https://github.com/eth-infinitism/account-abstraction#v0.7.0", | ||
| "forge-std": "https://github.com/foundry-rs/forge-std.git#v1.9.6", | ||
| "kernel": "https://github.com/zerodevapp/kernel#v3.1", | ||
| "node-jq": "^6.0.1", |
| address: this.address, | ||
| functionName: this.functionName, | ||
| contractName: this.contractName, | ||
| value: bigIntToZeroPadded(this.value), // We convert the bigint value to a zero-padded string because 'value' can exceed the numeric limits of Number |
There was a problem hiding this comment.
Not sure why we need the zero padding here actually? Couldn't we just this.value.toString()?
There was a problem hiding this comment.
Padding is needed to ensure that when we compare two strings representing bigints, the comparisons work correctly. We're not comparing numbers but strings, so without padding, the comparison would be alphabetical. For example, "9" would be considered greater than "10" because alphabetically, "9" comes after "1"
|
Just need to revert the node-jq change + possibly get rid of the padding. |
69f4e43 to
57343bb
Compare
57430f2 to
5d33a08
Compare
57343bb to
4361ec6
Compare
059fedb to
bfbf5b3
Compare
b6848f9 to
7e3bd09
Compare
01a6851 to
e07e382
Compare
7e3bd09 to
9ba69a6
Compare
e07e382 to
c8e1c10
Compare
9ba69a6 to
a081c22
Compare
c8e1c10 to
16e515c
Compare
a081c22 to
1a07492
Compare
16e515c to
3ec87d7
Compare
3ec87d7 to
c4fea51
Compare

Description
This PR introduces a new feature in the TXM that allows creating transactions with a value. This enables making transfers.
Checklist
Basics
norswap/build-system-caching).Reminder: PR review guidelines
Correctness
testnet, mainnet, standalone wallet, ...).
< INDICATE BROWSER, DEMO APP & OTHER ENV DETAILS USED FOR TESTING HERE >
< INDICATE TESTED SCENARIOS (USER INTERFACE INTERACTION, CODE FLOWS) HERE >
and have updated the code & comments accordingly.
Architecture & Documentation
(2) commenting these boundaries correctly, (3) adding inline comments for context when needed.
comments.
in a Markdown document.
packages/coreandpackages/react), see here for more info.