An open source interface for Marginswap.
yarn
yarn start
git clone [email protected]:marginswap/marginswap-core.git
cd marginswap-core
git clone [email protected]:marginswap/core-abi.git build
- Place a private key file in your home folder ~/.marginswap-secret. If you want it to match up with your wallet like MetaMask, create the account in your wallet, copy the private key and paste it into the file.
- Install the dependencies by running
yarn
- then run
npx hardhat node
in the marginswap-core root and leave it running in a terminal tab - in a new tab, move to the build directory
cd marginswap-core/build
- create a yarn link to this directory
yarn link
[email protected]:marginswap/marginswap-sdk.git
yarn
yarn build
- yarn link the core-abi repo
yarn link @marginswap/core-abi
- create a link for this repo
yarn link
yarn
cp .env.sample .env
- link the core repo
yarn link @marginswap/core-abi
- link the sdk repo
yarn link @marginswap/sdk
- In metamask, set your network to Localhost 8545, then go to Settings > Networks > Localhost 8545 and set the chain ID to 31337
yarn start
To have the interface default to a different network when a wallet is not connected:
- Make a copy of
.env.sample
named.env
- Change
REACT_APP_NETWORK_ID
to"{YOUR_NETWORK_ID}"
- Change
REACT_APP_NETWORK_URL
to e.g."https://{YOUR_NETWORK_ID}.infura.io/v3/{YOUR_INFURA_KEY}"
Note that the interface only works on testnets where both Uniswap V2 and multicall are deployed. The interface will not work on other networks.
Please open all pull requests against the master
branch.
CI checks will run against all PRs.