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

Implemented "account_put_transaction" method. Added TransactionUtil.t… #437

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

zajko
Copy link
Contributor

@zajko zajko commented Jun 4, 2024

…s as an implementation for DTO of Transaction entity

@zajko zajko marked this pull request as draft June 4, 2024 07:22
@zajko zajko force-pushed the account_put_transaction_method branch from e62c7e8 to da9a85e Compare June 4, 2024 13:26
* @param publicKey CLPublicKey instance
* @param transferId BigNumberish value (can be also string representing number). Max U64.
*/
constructor(publicKey: CLPublicKey, transferId: BigNumberish) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Types used with @JsonObject and TypedJson generally require a no-args constructor

…s as an implementation for DTO of Transaction entity
@zajko zajko force-pushed the account_put_transaction_method branch from da9a85e to a1e107b Compare June 4, 2024 15:02
@zajko zajko marked this pull request as ready for review June 4, 2024 15:03
@hoffmannjan hoffmannjan changed the base branch from devnet-alignments to feat-3.0 June 4, 2024 15:25
Copy link
Contributor

@hoffmannjan hoffmannjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and works for me! great job!

Copy link
Contributor

@ryo-casper ryo-casper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really great job 👍 , left some NITs can be ignored

@@ -247,6 +258,67 @@ describe('CasperServiceByJsonRPC', () => {
expect(balanceByUref.eq(balanceByPublicKey)).to.be;
});

it.only('should transfer CSPR - account_put_transaction', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please remove .only?

Comment on lines +11 to +13
export const byteArrayJsonSerializer: (bytes: Uint8Array) => string = (
bytes: Uint8Array
) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT

Suggested change
export const byteArrayJsonSerializer: (bytes: Uint8Array) => string = (
bytes: Uint8Array
) => {
export const byteArrayJsonSerializer = ( bytes: Uint8Array ): string => {

if (transaction.Deploy) {
signDeploy(transaction.Deploy, signingKey);
return transaction;
} else if (transaction.Version1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if possible, could we split this into signTransactionV1?

* @param payment The payment logic of the deploy
* @returns A new `Transaction` object
*/
export function makeV1Transaction(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: please keep consistency for naming; TransactionV1 or V1Transaction

@@ -113,6 +116,7 @@ export interface ValidatorsInfoResult extends RpcResult {

/** JSON RPC service for interacting with Casper nodes */
export class CasperServiceByJsonRPC {
oneMegaByte = 1048576;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: Well, I know this comes from the, old code, but for human readability, what about 1 * 1024 * 1024?

@zajko zajko merged commit b6cfc8b into casper-ecosystem:feat-3.0 Jun 10, 2024
1 check failed
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.

None yet

3 participants