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

Enable ssz serialization and add WalletClient tests #13

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

ukorvl
Copy link
Member

@ukorvl ukorvl commented May 31, 2024

This diff fixes lots of minor issue in ssz serialization enabling it work properly. It introduces valid ssz schemas accordingly with ssz schemas in the main repository.
It improves methods signatures making user's life much more easier. To send the message user should specify its fields. We added auto-fill for such message fields as gasPrice, gasLimit, from, value, data.
For instance, to send a common message we can use sendMessage we can specify only:

client.sendMessage({
    to: addHexPrefix(defaultAddress),
    value: 0n,
});

To deploy a contract there is a method deployContract. We can call it like this:

client.deployContract({
    deployData: {
      bytecode: "0x",
    },
});

All other parameters are auto-filled, but can be overwritten by the user.

@ukorvl ukorvl self-assigned this May 31, 2024
Copy link

changeset-bot bot commented May 31, 2024

🦋 Changeset detected

Latest commit: a2f1700

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nilfoundation/niljs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ukorvl ukorvl force-pushed the 2-wallet-client-tests branch 4 times, most recently from 3828d50 to f89a754 Compare May 31, 2024 13:16
@ukorvl ukorvl linked an issue May 31, 2024 that may be closed by this pull request
Closed
@ukorvl ukorvl force-pushed the 2-wallet-client-tests branch 2 times, most recently from 6b04a29 to b5c8f92 Compare May 31, 2024 14:52
@ukorvl ukorvl force-pushed the 2-wallet-client-tests branch from b5c8f92 to a2f1700 Compare May 31, 2024 14:55
@ukorvl ukorvl merged commit f47866e into master Jun 1, 2024
2 checks passed
@ukorvl ukorvl mentioned this pull request Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests
1 participant