Skip to content

Commit

Permalink
feat(Oracle.spec.ts): add opcode values for transactions in test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ipromise2324 committed Feb 21, 2024
1 parent 84ffb3e commit 7bd6491
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/Oracle.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { watch } from 'fs';
import { Alarm } from '../build/Oracle/tact_Alarm';
import { Blockchain, SandboxContract, TreasuryContract, printTransactionFees } from '@ton-community/sandbox';
import { Address, Cell, beginCell, toNano } from 'ton-core';
Expand All @@ -10,7 +9,6 @@ import Decimal from 'decimal.js';
import { float, toToken, int } from './utils';
import '@ton-community/test-utils';
import { RewardJettonWallet } from '../build/Oracle/tact_RewardJettonWallet';
import exp from 'constants';

const QUOTEASSET_DECIMALS = 6;
const BASEASSET_DECIMALS = 9;
Expand Down Expand Up @@ -2251,6 +2249,7 @@ describe('Oracle', () => {
expect(windResult.transactions).toHaveTransaction({
from: timekeeper4.address,
to: timekeeper4WalletAddress,
op: 0x0f8a7ea5,
success: true,
});

Expand All @@ -2261,41 +2260,47 @@ describe('Oracle', () => {
expect(windResult.transactions).toHaveTransaction({
from: timekeeper4WalletAddress,
to: oracleWalletAddress,
op: 0x178d4519,
success: true,
});

// Check that oracle's jetton wallet send JettonTransferNotification msg to oracle
expect(windResult.transactions).toHaveTransaction({
from: oracleWalletAddress,
to: oracle.address,
op: 0x7362d09c,
success: true,
});

// Check that oracle send Reset msg to Alarm0
expect(windResult.transactions).toHaveTransaction({
from: oracle.address,
to: alarmAddress1,
op: 0x352395e7,
success: true,
});

// Check that Alarm contract send Refund msg to oracle
expect(windResult.transactions).toHaveTransaction({
from: alarmAddress1,
to: oracle.address,
op: 0x201dd3cd,
success: true,
});

// Check that Orcale send JettonTransfer msg to oracle's jetton wallet
expect(windResult.transactions).toHaveTransaction({
from: oracle.address,
to: oracleWalletAddress,
op: 0x0f8a7ea5,
success: true,
});

// Check that oracle's jetton wallet send JettonInternalTransfer msg to timekeeper's jetton wallet
expect(windResult.transactions).toHaveTransaction({
from: oracleWalletAddress,
to: timekeeper4WalletAddress,
op: 0x178d4519,
success: true,
});
});
Expand Down

0 comments on commit 7bd6491

Please sign in to comment.