-
Notifications
You must be signed in to change notification settings - Fork 61
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
Implemented "account_put_transaction" method. Added TransactionUtil.t… #437
Conversation
e62c7e8
to
da9a85e
Compare
* @param publicKey CLPublicKey instance | ||
* @param transferId BigNumberish value (can be also string representing number). Max U64. | ||
*/ | ||
constructor(publicKey: CLPublicKey, transferId: BigNumberish) { |
There was a problem hiding this comment.
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
da9a85e
to
a1e107b
Compare
…t_transaction' test
There was a problem hiding this 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!
There was a problem hiding this 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 () => { |
There was a problem hiding this comment.
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
?
export const byteArrayJsonSerializer: (bytes: Uint8Array) => string = ( | ||
bytes: Uint8Array | ||
) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT
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) { |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
?
…s as an implementation for DTO of Transaction entity