npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

orchai-combinator-bsc-simulation

v1.0.51

Published

- [TRAVA SIMULATION ROUTE](#trava-simulation-route) - [Table of contents](#table-of-contents) - [Initialize state](#initialize-state) - [Các action liên quan đến token](#các-action-liên-quan-đến-token) - [Các action liên quan đến pools: deposit, borro

Downloads

30

Readme

orchai-combinator-bsc-simulation

Table of contents

import { ApplicationState } from "../State/ApplicationState";

let chainId = Number((await provider.getNetwork()).chainId);

let appState = new ApplicationState(
    userAddress: String,
    smartWalletAddress: String,
    provider: JsonRpcProvider, // reader
    chainId: chainId
);

Simulate state

Sau khi init state xong. Với mỗi state, các simulate khác nhau

Simulate Utilities actions

Pull token

result = await simulateSendToken(
    appState5,
    tokenAddress,
    from: wallet address
    to: smart wallet address,
    amount: number | string
)

Sendtoken

result = await simulateSendToken(
    appState6,
    tokenAddress,
    from: smart wallet address
    to: main wallet address,
    amount: number | string
)

Wrap

result = await simulateWrap(
    appState7,
    amount: number | string
)

Unwrap

result = await simulateUnwrap(
    appState8,
    amount: number | string
)

Simulate Pancake actions

Swap

result = await simulateSwap(
    appState9,
    fromToken: token 1 address,
    toToken: token2 address,
    fromAmount: amount of token 1 will swap
    fromAddress,
    toAddress,
    priceImpact
)

Get token balance

balance = await getUserTokenBalance(appState, userAddress, tokenAddress)

Simulate Orai Liquid Staking actions

Stake

result = await simulateOraiLSStake(
    appState10,
    amount,
    from address,
    to address
)

Unstake

result = await simulateOraiLSUnstake(
    appState12,
    _amount,
    from address
)

Withdraw Unstake

result = await simulateOraiLSWithdrawUnstake(
    appState12,
    to address
)

Approve

PullToken

  • approve token duoc chon cho smart wallet

Orai LS Stake

  • approve Orai cho smart wallet neu from la EOA Wallet

Orai LS Unstake

  • approve scOrai cho smart wallet neu from la EOA Wallet

Disploy after action

Wrap and Unwrap

hien thi balance bnb va wbnb

Pull token and send token

hien thi balnace cua token duoc chon

Stake

hien thi balance Orai va ScOrai

Unstake

hien thi balance Orai

Withdraw Unstake

hien thi balance Orai va ScOrai

Swap

hien thi balance cua 2 token swap