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

[TS SDK] Explore http2 #7432

Closed
wants to merge 4 commits into from
Closed

[TS SDK] Explore http2 #7432

wants to merge 4 commits into from

Conversation

0xmaayan
Copy link
Contributor

Description

Explore http2 using fetch-h2 package.

Notes:

starting...
accounts created
{ ms: 34, s: 0, m: 0, h: 0, d: 0 }
accounts funded
{ ms: 305, s: 15, m: 0, h: 0, d: 0 }
accounts checked
{ ms: 708, s: 16, m: 0, h: 0, d: 0 }
accounts initialized
{ ms: 784, s: 16, m: 0, h: 0, d: 0 }
transactions submitted
{ ms: 19, s: 38, m: 0, h: 0, d: 0 }
transactions commited
{ ms: 675, s: 39, m: 0, h: 0, d: 0 }

Thank you David for code inspiration.

exit(0);
}

async function transafer(sender: AptosAccount, recipient: string, sequenceNumber: bigint, amount: number) {
Copy link
Contributor

Choose a reason for hiding this comment

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

transfer or tran safer? 😂

Comment on lines +106 to +142
"0x1::coin",
"transfer",
Copy link
Contributor

Choose a reason for hiding this comment

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

fyi, for future ease of use: 0x1::aptos_account::transfer_coins will create the account / register the coin if it doesn't exist

accounts.push(new AptosAccount());
recipients.push(new AptosAccount());
}
console.log(`${accounts.length * 2} accounts created`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log(`${accounts.length * 2} accounts created`);
console.log(`${accounts.length + recipients.length} accounts created`);

nit: Number still the same, but i felt like its more read-able this way :D

fetch(fund, {
method: "POST",
headers: {
Authorization: `Bearer ejfklsdfj7vr4388fhhfh3f78hf345345hf00da0`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious, what is this bearer token here?

Comment on lines +164 to +165
// const txn = await submitTransaction(bcsTxn);
// return txn.hash;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Forgot to remove these 2 lines?

@0xmaayan 0xmaayan closed this May 11, 2023
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.

3 participants