bizzswap

1.0.1 • Public • Published

⚡ BizzSwap ⚡

A place where you hold and manage only the tokens you believe in!

Getting started

Installation

yarn add bizzswap

Usage

Once installed, you can use the contracts from the package by importing them:

pragma solidity ^0.8.0;

import 'bizzswap/contracts/interfaces/IBizzSwap.sol';

contract MyDonation {
	address public bizzswapContract;

	constructor(address _bizzswapContract) {
		bizzswapContract = _bizzswapContract;
	}

	function donate(
		IBizzSwap.SwapParameters memory _params,
		bool _isEthDesired,
		address _recipient,
		address _inputTokenAddress,
		address _outputTokenAddress,
		uint256 _exactAmountOut,
		uint256 _maximumAmountIn
	) public {
		IBizzSwap(bizzswapContract).pay(
			_params,
			_isEthDesired,
			_recipient,
			_inputTokenAddress,
			_outputTokenAddress,
			_exactAmountOut,
			_maximumAmountIn
		);
	}
}

Local development

Prerequisites

Be sure to have installed the following

Git

Node.js

Yarn

Installation

  1. Clone the repo
git clone https://github.com/MVPWorkshop/BizzSwap.git
cd BizzSwap
  1. Install packages
yarn install
  1. Make an .env file and Enter necessary data listed in .env.example file
PRIVATE_KEY='<key>'
ALCHEMY_KEY='<key>'
ETHERSCAN_API_KEY='<key>'
ARBISCAN_API_KEY='<key>'
POLYGONSCAN_API_KEY='<key>'
  1. Compile contracts
yarn compile
  1. Run tests
yarn test
  1. Run test coverage
yarn coverage

Deployment addresses are available at Deploys.md

Dependencies (14)

Dev Dependencies (8)

Package Sidebar

Install

npm i bizzswap

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

123 kB

Total Files

7

Last publish

Collaborators

  • andrejrakic