GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - chobynleo/utils-contract: Useful solidity contract libraries. Predict asset value after Swap Token or Zap.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
contracts
contracts
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
hardhat.config.js
hardhat.config.js
 
 
package.json
package.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

utils-contract

Useful solidity contract libraries.

  • defi
  • proxy
  • security
  • token
  • math

defi

getZapVaule.sol

  1. Predict asset value after Token to Token
function getValueOfTokenToToken(
    address token, 
    uint amount, 
    address [] memory pathArr
) external view returns (uint inputVaule, uint outputValue)

Parameters:

  • token: Enter the token address. If it is coin, enter the WBNB address.
  • amount: Numbers of tokens.
  • pathArr: An array of address sets. The default array begins with the token address passed in and ends with the token address specified for output.

Return:

  • inputVaule: The actual asset value of the token passed in.
  • outputValue: Forecast the value of assets after Zap conversion.
  1. Predict asset value after Token to Lp
function getValueOfTokenToLp(
    address token, 
    uint amount, 
    address [] memory pathArr0,
    address [] memory pathArr1
) external view returns (uint inputVaule, uint outputValue)

Parameters:

  • token: Enter the token address. If it is coin, enter the WBNB address.

  • amount: Numbers of tokens.

  • pathArr0: An array of address sets representing the conversion of the passed token to the specified output token. If the passed token is the same address as the specified output token, this parameter is represented by an empty array [].

  • pathArr1: An array of address sets representing the conversion of the passed token to the specified output token. If the passed token is the same address as the specified output token, this parameter is represented by an empty array [].

Return:

  • inputVaule: The actual asset value of the token passed in.
  • outputValue: Forecast the value of assets after Zap conversion.

About

Useful solidity contract libraries. Predict asset value after Swap Token or Zap.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.