New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fairmint/c-org-optimizer

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fairmint/c-org-optimizer

C-Org-Optimizer

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

cOrgOptimizer

C-Org-Optimizer

This is the example code how to use this module:

const Optimizer = require('corgoptimizer')
const Web3 = require('web3')
const provider_http = 'http://localhost:8545'

var web3 = new Web3(new Web3.providers.HttpProvider(provider_http))

const daiExchange = '0x9B53246dd09549E120575fed900E3C41D595496c'
const fairExchange = '0x336FcAb263982922b4e5C736Ed888D577eE817cf'
const DAT = '0x93264ff8642d0F2C21BCC78aE367B9eC6137addA'


async function main()
{
    optimizer = new Optimizer(web3,daiExchange,fairExchange,DAT)
    let result = await optimizer.optimizeBuyTransaction('11083071190')
    console.log('Result of Buy Optimization. ')
    console.log('Amount to buy on Uniswap:   ', result.uniswap.toString())
    console.log('Amount to buy on DAT:       ', result.dat.toString())

    result = await optimizer.optimizeSellTransaction('11083071190')
    console.log()
    console.log('Result of Sell Optimization.') 
    console.log('Amount to sell on Uniswap:  ', result.uniswap.toString())
    console.log('Amount to sel on DAT:       ', result.dat.toString())
}

main()

Keywords

FAQs

Package last updated on 23 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc