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

@vmexfinance/contracts

v1.4.0

Published

VMEX V1 smart contracts

Downloads

14

Readme

Setup

Run yarn install to install node_modules or update them Copy .env template into .env file with the required fields

How to deploy on mainnet:

run yarn vmex:node:fork:main in one terminal (starts up localhost network) as a fork

metamask should now be able to connect to http://127.0.0.1:8545

run yarn vmex:deploy:fork:main in another terminal to deploy the contracts and the fork of mainnet on the localhost network

Or, run yarn start:dev to run a node and deploy in the same terminal

you can use metamask to execute contract calls on the frontend

run yarn console:localhost:fork to start console that can interact with the above forked mainnet on the localhost network

Remeber to run yarn localhost:deployIncentivesController to deploy the incentives controller which is required for tests

Run yarn vmex:mainnetfork:unit-tests to test all localhost tests

How to deploy on Sepolia:

Setup

  • Make sure your .env file has the SEPOLIA_ALCHEMY_KEY and MNEMONIC set
  • Fill up your wallet 0 with ~0.5 ETH, wallet 3 with ~0.05 ETH, and wallet 7 with ~0.05 ETH

run yarn vmex:sepolia:deploy

OPTIONAL: If the mock tokens are already deployed, use getAllMockedTokens instead of deployAllMockTokens inside the buildTestEnv function in the contract-deployments.ts file

How to deploy on OP fork:

run yarn vmex:node:fork:optimism in one terminal (starts up localhost network) as a fork

metamask should now be able to connect to http://127.0.0.1:8545

run yarn vmex:deploy:fork:optimism in another terminal to deploy the contracts and the fork of OP on the localhost network

Run yarn vmex:OPfork:unit-tests to test all localhost tests

How to test in hardhat network mock environment:

Run yarn test These are a separate set of tests than the above unit-tests

Or, to avoid having to redeploy on a hardhat network every test (if debugging tests), first run a local node and then deploy (in another terminal):

  1. yarn vmex:node
  2. yarn vmex:dev:deploy Note that this doesn't require calling separate script to deploy incentives controller since in step 2 it is already deployed

Then you can keep running yarn vmex:dev:test without having to redeploy the test contracts

Check and update uniswapv3 pool addresses with most volume

Run yarn get-uniswap-data Copy the output in the terminal to markets/aave/commons.ts

Contract verification

Common errors and fixes:

ENOENT: no such file or directory ...

Fix:

npx hardhat clean
yarn compile
# rerun scripts

Note can use contract verification to see which contracts need upgrading since they are different from the local codebase

Foundry testing

Make sure to install packages with node, since foundry will read node dependencies but hardhat will not read foundry dependencies in lib

  1. Install foundry and forge: https://book.getfoundry.sh/getting-started/installation
  2. Now can build and run tests: forge test --fork-url https://mainnet.base.org --fork-block-number 4924830 --match-contract CLSyncOracle -vvvv

Hardhat Accounts

Account #0: 0xc783df8a850f42e7F7e57013759C285caa701eB6 (1000000 ETH)

Account #1: 0xeAD9C93b79Ae7C1591b1FB5323BD777E86e150d4 (1000000 ETH)

Account #2: 0xE5904695748fe4A84b40b3fc79De2277660BD1D3 (1000000 ETH)

Account #3: 0x92561F28Ec438Ee9831D00D1D59fbDC981b762b2 (1000000 ETH)

Account #4: 0x2fFd013AaA7B5a7DA93336C2251075202b33FB2B (1000000 ETH)

Account #5: 0x9FC9C2DfBA3b6cF204C37a5F690619772b926e39 (1000000 ETH)

Account #6: 0xaD9fbD38281F615e7DF3DeF2Aad18935a9e0fFeE (1000000 ETH)

Account #7: 0x8BffC896D42F07776561A5814D6E4240950d6D3a (1000000 ETH)