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

Vault contracts with utils file for interactions with HTS in tests #15

Merged
merged 18 commits into from
Apr 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove account creation
  • Loading branch information
maksimKrukovich committed Apr 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 1453d1ce778bd05b2cc268b2fb279810bdf4e273
34 changes: 17 additions & 17 deletions test/vault.test.ts
Original file line number Diff line number Diff line change
@@ -26,11 +26,11 @@ describe("Vault", function () {
operatorPrKey
);

aliceKey = PrivateKey.generateED25519();
aliceAccountId = await createAccount(client, aliceKey, 20);
const alice = createAccount(client, aliceKey, aliceAccountId);
// aliceKey = PrivateKey.generateED25519();
// aliceAccountId = await createAccount(client, aliceKey, 20);
// const alice = createAccount(client, aliceKey, aliceAccountId);

console.log("account creation success");
// console.log("account creation success");

const stakingToken = await createFungibleToken(
"ERC4626 on Hedera",
@@ -52,13 +52,13 @@ describe("Vault", function () {
);
await hederaVault.waitForDeployment();

client.setOperator(aliceAccountId!, aliceKey);
const tokenAssociate = await new TokenAssociateTransaction()
.setAccountId(aliceAccountId!)
.setTokenIds([stakingToken!])
.execute(client);
// client.setOperator(aliceAccountId!, aliceKey);
// const tokenAssociate = await new TokenAssociateTransaction()
// .setAccountId(aliceAccountId!)
// .setTokenIds([stakingToken!])
// .execute(client);

console.log("association success");
// console.log("association success");

// await mintToken(stakingToken, client, 100, operatorPrKey);

@@ -76,13 +76,13 @@ describe("Vault", function () {

// console.log("balance check", await stToken.(owner.address));

client.setOperator(
operatorAccountId,
operatorPrKey
);
await TokenTransfer(stakingToken, operatorAccountId, aliceAccountId, 50, client);
// client.setOperator(
// operatorAccountId,
// operatorPrKey
// );
// await TokenTransfer(stakingToken, operatorAccountId, aliceAccountId, 50, client);

console.log("token transfer success");
// console.log("token transfer success");

// console.log(
// await TokenBalance(receiver.address, client)
@@ -92,7 +92,7 @@ describe("Vault", function () {
hederaVault,
stakingToken,
// stToken,
alice,
// alice,
to,
client,
owner,
Loading