Skip to content

Commit

Permalink
fixed last test
Browse files Browse the repository at this point in the history
  • Loading branch information
sampocs committed Feb 21, 2025
1 parent b914af1 commit 8a24864
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions integration-tests/client/test/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,8 @@ describe("buyback and burn", () => {
});

const stakeAmount = 10_000_000;
const rewardAmount = 10_000;
const feeAmount = 1_000;

// Liquid stake 10 ATOM
await ibcTransfer({
Expand All @@ -989,6 +991,7 @@ describe("buyback and burn", () => {
});

await submitTxAndExpectSuccess(stridejs, [liquidStakeMsg]);
sleep(1000);

// Check st tokens
const { balance: { amount: stAtomBalance } = { amount: "0" } } =
Expand All @@ -998,7 +1001,7 @@ describe("buyback and burn", () => {
});
expect(BigInt(stAtomBalance)).toBeGreaterThan(0n);

// Send 10% of stake to withdrawal address
// Send 10% of stake to fee address
// If we send more, you risk tripping some rate limits
const {
hostZone: { withdrawalIcaAddress },
Expand All @@ -1010,11 +1013,12 @@ describe("buyback and burn", () => {
cosmos.bank.v1beta1.MessageComposer.withTypeUrl.send({
fromAddress: gaiajs.address,
toAddress: withdrawalIcaAddress,
amount: coinsFromString(`${stakeAmount / 10}${UATOM}`),
amount: coinsFromString(`${rewardAmount}${UATOM}`),
}),
]);

// Wait for funds to get swept from withdrawal address on gaia into x/auction
// Wait for funds to get swept from fee address on gaia into x/auction
console.log("Waiting for funds to land in auction account");
while (true) {
const { balance: { amount: auctionBalanceAfter } = { amount: "0" } } =
await stridejs.query.cosmos.bank.v1beta1.balance({
Expand All @@ -1024,7 +1028,7 @@ describe("buyback and burn", () => {

if (
BigInt(auctionBalanceAfter) >=
BigInt(auctionBalanceBefore) + BigInt(stakeAmount)
BigInt(auctionBalanceBefore) + BigInt(feeAmount)
) {
break;
}
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/network/scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ EXPEDITED_VOTING_PERIOD="29s"
UNBONDING_TIME="240s"
AIRDROP_PERIOD_SECONDS=86400

STRIDE_DAY_EPOCH_DURATION="140s"
STRIDE_EPOCH_EPOCH_DURATION="35s"
STRIDE_DAY_EPOCH_DURATION="180s"
STRIDE_EPOCH_EPOCH_DURATION="45s"
STRIDE_MINT_EPOCH_DURATION="5s"

ICQORACLE_OSMOSIS_CHAIN_ID="osmosis-test-1"
Expand Down

0 comments on commit 8a24864

Please sign in to comment.