From 2d9183eeaadeb63fed047453c6a82299bc33e8a2 Mon Sep 17 00:00:00 2001 From: turupawn Date: Wed, 1 Feb 2023 16:26:35 -0600 Subject: [PATCH] documentation generation --- README.md | 6 ++ contracts/ERC20/BalancerV2FeeToken.sol | 28 ++++++ docs/BalancerFeeToken.md | 0 docs/ERC20/BalancerV2FeeToken.md | 115 +++++++++++++++++++++++++ docs/ERC20/UniswapV2AutoSwapToken.md | 52 +++++++++++ docs/ERC20/UniswapV2FeeToken.md | 94 ++++++++++++++++++++ docs/ERC20/UniswapV3FeeToken.md | 112 ++++++++++++++++++++++++ docs/UniswapV2AutoSwapToken.md | 0 docs/UniswapV2FeeToken.md | 111 ------------------------ docs/UniswapV3FeeToken.md | 111 ------------------------ hardhat.config.js | 13 ++- package-lock.json | 28 +++--- package.json | 3 +- 13 files changed, 439 insertions(+), 234 deletions(-) delete mode 100644 docs/BalancerFeeToken.md create mode 100644 docs/ERC20/BalancerV2FeeToken.md create mode 100644 docs/ERC20/UniswapV2AutoSwapToken.md create mode 100644 docs/ERC20/UniswapV2FeeToken.md create mode 100644 docs/ERC20/UniswapV3FeeToken.md delete mode 100644 docs/UniswapV2AutoSwapToken.md delete mode 100644 docs/UniswapV2FeeToken.md delete mode 100644 docs/UniswapV3FeeToken.md diff --git a/README.md b/README.md index 9d0dcfe..0b4fd91 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,12 @@ npx hardhat test npx hardhat coverage ``` +# 🗎 Generate Documentation + +``` +npx hardhat docgen +``` + # 📝 Take note * This contracts are based on OpenZeppelin libraries but changed `private` variables to `internal` for flexibility diff --git a/contracts/ERC20/BalancerV2FeeToken.sol b/contracts/ERC20/BalancerV2FeeToken.sol index f1c0466..02a1af1 100644 --- a/contracts/ERC20/BalancerV2FeeToken.sol +++ b/contracts/ERC20/BalancerV2FeeToken.sol @@ -6,15 +6,35 @@ pragma solidity ^0.8.0; import "./ERC20.sol"; import "./interfaces/BalancerInterfaces.sol"; +/// @title ERC20 token that takes fees on P2P, buy and sell on Balancer and transfer them to a Vault. +/// @author Filosofía Codigo +/// @notice You can use this contract launch your own token or to study the Balancer ecosystem +/// @dev Based on top OpenZeppelin contracts but changed balances from private to internal for flexibility +/// @custom:experimental This is an experimental contract. abstract contract BalancerV2FeeToken is ERC20 { + /// @notice List of address that won't pay transaction fees mapping(address => bool) public isTaxless; + /// @notice Address that will recieve fees taken from each transaction address public feeReceiver; + /// @notice If set to true, no fees will be taken on any transaction bool public isFeeActive; + /// @notice Array that defines the transactions fees. Index 0 is buy fee, 1 is sell fee and 2 is peer to peer fee uint[] public fees; + /// @notice Number if fee decimals. Default is 2 so for example 250 means 2.5% in percentage numbers uint public feeDecimals = 2; + /// @notice Balancer vault constant address address public balancerVault = 0xBA12222222228d8Ba445958a75a0704d566BF2C8; + /// @notice Contract constructor + /// @dev All percentage numbers are two digit decimals. For example 250 means 2.5% + /// @param name Token Name + /// @param symbol Token Symbol + /// @param totalSupply_ Total supply, all supply will be sent to contract deployer + /// @param buyFeePercentage Percent of tokens that will be sent to the feeReciever when token is bought on Balancer + /// @param sellFeePercentage Percent of tokens that will be sent to the feeReciever when token is sold on Balancer + /// @param p2pFeePercentage Percent of tokens that will be sent to the feeReciever when token is transfered outside of Balancer + /// @param feeReceiver_ Address that will recieve the fees taken every transaction constructor(string memory name, string memory symbol, uint totalSupply_, uint buyFeePercentage, uint sellFeePercentage, uint p2pFeePercentage, @@ -35,6 +55,7 @@ abstract contract BalancerV2FeeToken is ERC20 isFeeActive = true; } + /// @notice This functions is inherited from OpenZeppelin and implements the transaction fee distribution function _transfer( address from, address to, @@ -61,10 +82,17 @@ abstract contract BalancerV2FeeToken is ERC20 super._transfer(from, to, amount); } + /// @notice Set excemptions for transaction fee payments + /// @param account Address that tax configuration will be affected + /// @param value If set to true the account will not pay transaction fees + /// @custom:ownable This function can only be executed by the contract owner. function setTaxless(address account, bool value) external onlyOwner { isTaxless[account] = value; } + /// @notice Set excemptions for all transaction fee payments + /// @param value If set to true all transaction fees will not be charged + /// @custom:ownable This function can only be executed by the contract owner. function setFeeActive(bool value) public onlyOwner { isFeeActive = value; } diff --git a/docs/BalancerFeeToken.md b/docs/BalancerFeeToken.md deleted file mode 100644 index e69de29..0000000 diff --git a/docs/ERC20/BalancerV2FeeToken.md b/docs/ERC20/BalancerV2FeeToken.md new file mode 100644 index 0000000..e471702 --- /dev/null +++ b/docs/ERC20/BalancerV2FeeToken.md @@ -0,0 +1,115 @@ +# Solidity API + +## BalancerV2FeeToken + +You can use this contract launch your own token or to study the Balancer ecosystem + +_Based on top OpenZeppelin contracts but changed balances from private to internal for flexibility_ + +### isTaxless + +```solidity +mapping(address => bool) isTaxless +``` + +List of address that won't pay transaction fees + +### feeReceiver + +```solidity +address feeReceiver +``` + +Address that will recieve fees taken from each transaction + +### isFeeActive + +```solidity +bool isFeeActive +``` + +If set to true, no fees will be taken on any transaction + +### fees + +```solidity +uint256[] fees +``` + +Array that defines the transactions fees. Index 0 is buy fee, 1 is sell fee and 2 is peer to peer fee + +### feeDecimals + +```solidity +uint256 feeDecimals +``` + +Number if fee decimals. Default is 2 so for example 250 means 2.5% in percentage numbers + +### balancerVault + +```solidity +address balancerVault +``` + +Balancer vault constant address + +### constructor + +```solidity +constructor(string name, string symbol, uint256 totalSupply_, uint256 buyFeePercentage, uint256 sellFeePercentage, uint256 p2pFeePercentage, address feeReceiver_) internal +``` + +Contract constructor + +_All percentage numbers are two digit decimals. For example 250 means 2.5%_ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| name | string | Token Name | +| symbol | string | Token Symbol | +| totalSupply_ | uint256 | Total supply, all supply will be sent to contract deployer | +| buyFeePercentage | uint256 | Percent of tokens that will be sent to the feeReciever when token is bought on Balancer | +| sellFeePercentage | uint256 | Percent of tokens that will be sent to the feeReciever when token is sold on Balancer | +| p2pFeePercentage | uint256 | Percent of tokens that will be sent to the feeReciever when token is transfered outside of Balancer | +| feeReceiver_ | address | Address that will recieve the fees taken every transaction | + +### _transfer + +```solidity +function _transfer(address from, address to, uint256 amount) internal virtual +``` + +This functions is inherited from OpenZeppelin and implements the transaction fee distribution + +### setTaxless + +```solidity +function setTaxless(address account, bool value) external +``` + +Set excemptions for transaction fee payments + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| account | address | Address that tax configuration will be affected | +| value | bool | If set to true the account will not pay transaction fees | + +### setFeeActive + +```solidity +function setFeeActive(bool value) public +``` + +Set excemptions for all transaction fee payments + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| value | bool | If set to true all transaction fees will not be charged | + diff --git a/docs/ERC20/UniswapV2AutoSwapToken.md b/docs/ERC20/UniswapV2AutoSwapToken.md new file mode 100644 index 0000000..0d95f2a --- /dev/null +++ b/docs/ERC20/UniswapV2AutoSwapToken.md @@ -0,0 +1,52 @@ +# Solidity API + +## UniswapV2AutoSwapToken + +### minTokensBeforeSwap + +```solidity +uint256 minTokensBeforeSwap +``` + +### autoSwapReciever + +```solidity +address autoSwapReciever +``` + +### lastFeeActive + +```solidity +bool lastFeeActive +``` + +### Swap + +```solidity +event Swap(uint256 amountSent) +``` + +### constructor + +```solidity +constructor(string name, string symbol, uint256 totalSupply_, uint256 buyFeePercentage, uint256 sellFeePercentage, uint256 p2pFeePercentage, address autoSwapReciever_, address routerAddress, address baseTokenAddress, uint256 minTokensBeforeSwapPercent) internal +``` + +### lockTheSwap + +```solidity +modifier lockTheSwap() +``` + +### _transfer + +```solidity +function _transfer(address from, address to, uint256 amount) internal virtual +``` + +### setMinTokensBeforeSwapPercent + +```solidity +function setMinTokensBeforeSwapPercent(uint256 percentage) public +``` + diff --git a/docs/ERC20/UniswapV2FeeToken.md b/docs/ERC20/UniswapV2FeeToken.md new file mode 100644 index 0000000..8bc93c4 --- /dev/null +++ b/docs/ERC20/UniswapV2FeeToken.md @@ -0,0 +1,94 @@ +# Solidity API + +## UniswapV2FeeToken + +### isTaxless + +```solidity +mapping(address => bool) isTaxless +``` + +### feeReceiver + +```solidity +address feeReceiver +``` + +### isFeeActive + +```solidity +bool isFeeActive +``` + +### fees + +```solidity +uint256[] fees +``` + +### feeDecimals + +```solidity +uint256 feeDecimals +``` + +### pair + +```solidity +address pair +``` + +### router + +```solidity +contract ISwapRouter router +``` + +### baseToken + +```solidity +contract IERC20 baseToken +``` + +### constructor + +```solidity +constructor(string name, string symbol, uint256 totalSupply_, uint256 buyFeePercentage, uint256 sellFeePercentage, uint256 p2pFeePercentage, address feeReceiver_, address routerAddress, address baseTokenAddress) internal +``` + +### _transfer + +```solidity +function _transfer(address from, address to, uint256 amount) internal virtual +``` + +### _setTaxless + +```solidity +function _setTaxless(address account, bool isTaxless_) internal +``` + +### _setFeeReceiver + +```solidity +function _setFeeReceiver(address feeReceiver_) internal +``` + +### _setFeeActive + +```solidity +function _setFeeActive(bool isFeeActive_) internal +``` + +### _setPair + +```solidity +function _setPair(address router_, address baseToken_) internal +``` + +### _setFees + +```solidity +function _setFees(uint256 buyFeePercentage, uint256 sellFeePercentage, uint256 p2pFeePercentage) internal +``` + diff --git a/docs/ERC20/UniswapV3FeeToken.md b/docs/ERC20/UniswapV3FeeToken.md new file mode 100644 index 0000000..2af355a --- /dev/null +++ b/docs/ERC20/UniswapV3FeeToken.md @@ -0,0 +1,112 @@ +# Solidity API + +## UniswapV3FeeToken + +### isTaxless + +```solidity +mapping(address => bool) isTaxless +``` + +### feeReceiver + +```solidity +address feeReceiver +``` + +### isFeeActive + +```solidity +bool isFeeActive +``` + +### buyFeePercentage + +```solidity +uint256 buyFeePercentage +``` + +### p2pFeePercentage + +```solidity +uint256 p2pFeePercentage +``` + +### feeDecimals + +```solidity +uint256 feeDecimals +``` + +### baseToken + +```solidity +contract IERC20 baseToken +``` + +### pool1 + +```solidity +address pool1 +``` + +### pool2 + +```solidity +address pool2 +``` + +### pool3 + +```solidity +address pool3 +``` + +### pool4 + +```solidity +address pool4 +``` + +### nonfungiblePositionManager + +```solidity +contract INonfungiblePositionManager nonfungiblePositionManager +``` + +### constructor + +```solidity +constructor(string name, string symbol, uint256 totalSupply_, uint256 buyFeePercentage_, uint256 p2pFeePercentage_, address feeReceiver_, address baseTokenAddress, uint160 rate) internal +``` + +### _transfer + +```solidity +function _transfer(address from, address to, uint256 amount) internal virtual +``` + +### setTaxless + +```solidity +function setTaxless(address account, bool value) external +``` + +### setFeeActive + +```solidity +function setFeeActive(bool value) public +``` + +### isPool + +```solidity +function isPool(address _address) public view returns (bool) +``` + +### sqrt + +```solidity +function sqrt(uint256 y) internal pure returns (uint256 z) +``` + diff --git a/docs/UniswapV2AutoSwapToken.md b/docs/UniswapV2AutoSwapToken.md deleted file mode 100644 index e69de29..0000000 diff --git a/docs/UniswapV2FeeToken.md b/docs/UniswapV2FeeToken.md deleted file mode 100644 index c69e062..0000000 --- a/docs/UniswapV2FeeToken.md +++ /dev/null @@ -1,111 +0,0 @@ -# UniswapV2FeeToken - -Token that main liquidity will be added to a Uniswap V2 or to an equivalent fork. Takes fees on transfer and stores it in a `Fee Receiver Address`. - -## Technical contract overview - -The UniswapV2FeeToken is a type of token very common in DeFi. It collects fees depending on the transaction type (Sell, Buy or P2P peer to peer). Fees are sent to a `feeReceiver`. In the constructor a `router` and `baseToken` is set in order to create a uniswap `pair`. The `pair` helps us detecting wheter a transaction is Sell, Buy or P2P. - -## Constructing a UniswapV2FeeToken contract - -```solidity -// SPDX-License-Identifier: MIT -pragma solidity 0.8.17; - -import "biblioteca/contracts/ERC20/UniswapV2FeeToken.sol"; - -contract MyUniswapV2FeeToken is UniswapV2FeeToken -{ - constructor() UniswapV2FeeToken( - "My Token", "MTKN", // Name and Symbol - 1_000_000_000 ether, // 1 billion supply - address(this), // Vault Address - 100, 200, 0, // Fees: 2% buy 1% sell 0% P2P - 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, // Router Address - 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) // Base Token Address - { - } -} -``` - -## API - -### **constructor**(string memory name, string memory symbol, uint totalSupply\_, address feeReceiver\_, uint buyFeePercentage, uint sellFeePercentage, uint p2pFeePercentage, address routerAddress, address baseTokenAddress) - -Constructor parameters: -* **name**: Token name -* **symbol**: Token symbol -* **totalSupply**: Initial supply in wei -* **feeReceiver**: Address that will receive fees collected -* **buyFeePercentage**: Fee percentange collected when tokens are sent from the pair -* **sellFeePercentage**: Fee percentange collected when the tokens are sent to the pair -* **p2pFeePercentage**: Fee percentange collected when tokens are not sent from nor to the pair -* **routerAddress**: Router address where the main liquidity will be added -* **baseTokenAddress**: Base token that will be paired with the token when liquidity is added - -```solidity -constructor() UniswapV2FeeToken( - "My Token", "MTKN", // Name and Symbol - 1_000_000_000 ether, // 1 billion supply - address(this), // Vault Address - 100, 200, 0, // Fees: 2% buy 1% sell 0% P2P - 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, // Router Address - 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) // Base Token Address -{ -} -``` - -### **\_setTaxless**(address account, bool isTaxless\_) internal - -Add a Fee exempt address. - -```solidity -function setTaxless(address account, bool isTaxless_) internal onlyOwner -{ - _setTaxless(account, isTaxless_); -} -``` - -### **\_setFeeReceiver**(address feeReceiver\_) internal - -Address that will receive the token Fees collected. - -```solidity -function setFeeReceiver(address feeReceiver_) internal onlyOwner -{ - _setFeeReceiver(feeReceiver_); -} -``` - -### **\_setFeeActive**(bool isFeeActive\_) internal - -Set wheter or not fees are being collected. - -```solidity -function setFeeActive(bool isFeeActive_) internal onlyOwner -{ - _setFeeActive(isFeeActive_); -} -``` - -### **\_setPair**(address router_, address baseToken\_) internal - -Change the main pair address by passing the router and the base token as parameter. Creates a new pair in case it wasn't created. After this function is called the fees will be collected in this pair. - -```solidity -function setPair(address router_, address baseToken_) internal onlyOwner -{ - _setPair(router_, baseToken_); -} -``` - -### **\_setFees**(uint buyFeePercentage, uint sellFeePercentage, uint p2pFeePercentage) internal - -Buy and sell fees are collected when interacting with the pair. P2P fees are collected when interacting with other address than the pair. - -```solidity -function _setFees(uint buyFeePercentage, uint sellFeePercentage, uint p2pFeePercentage) internal onlyOwner -{ - _setFees(buyFeePercentage, sellFeePercentage, p2pFeePercentage); -} -``` \ No newline at end of file diff --git a/docs/UniswapV3FeeToken.md b/docs/UniswapV3FeeToken.md deleted file mode 100644 index 1ab6710..0000000 --- a/docs/UniswapV3FeeToken.md +++ /dev/null @@ -1,111 +0,0 @@ -# UniswapV3FeeToken - -Token that main liquidity will be added to a Uniswap V3. Takes fees on transfer and stores it in a `Fee Receiver Address`. - -## Technical contract overview - -The UniswapV3FeeToken collects fees depending on the transaction type: buy or P2P (peer to peer). Fees are sent to a `feeReceiver`. In the constructor a `baseToken` is set in order to create a uniswap `pair`. The `pair` helps us detecting wheter a transaction is Sell, Buy or P2P. Keep in mind that fees on sell can't be added due to Uniswap V3 technical limitation. - -## Constructing a UniswapV2FeeToken contract - -```solidity -// SPDX-License-Identifier: MIT -pragma solidity 0.8.17; - -import "biblioteca/contracts/ERC20/UniswapV3FeeToken.sol"; - -contract MyUniswapV3FeeToken is UniswapV3FeeToken -{ - constructor() UniswapV3FeeToken( - "My Token", "MTKN", // Name and Symbol - 1_000_000_000 ether, // 1 billion supply - msg.sender, // Vault Address - 100, 200, // Fees: 1% buy 2% P2P - 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, // Base token: WETH - 1000) // Initial rate: 1 Base Tokens = 1000 tokens - { - } -} -``` - -## API - -### **constructor**(string memory name, string memory symbol, uint totalSupply\_, address feeReceiver\_, uint buyFeePercentage, uint sellFeePercentage, uint p2pFeePercentage, address routerAddress, address baseTokenAddress) - -Constructor parameters: -* **name**: Token name -* **symbol**: Token symbol -* **totalSupply**: Initial supply in wei -* **feeReceiver**: Address that will receive fees collected -* **buyFeePercentage**: Fee percentange collected when tokens are sent from the pair -* **sellFeePercentage**: Fee percentange collected when the tokens are sent to the pair -* **p2pFeePercentage**: Fee percentange collected when tokens are not sent from nor to the pair -* **routerAddress**: Router address where the main liquidity will be added -* **baseTokenAddress**: Base token that will be paired with the token when liquidity is added - -```solidity -constructor() UniswapV2FeeToken( - "My Token", "MTKN", // Name and Symbol - 1_000_000_000 ether, // 1 billion supply - address(this), // Vault Address - 100, 200, 0, // Fees: 2% buy 1% sell 0% P2P - 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, // Router Address - 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) // Base Token Address -{ -} -``` - -### **\_setTaxless**(address account, bool isTaxless\_) internal - -Add a Fee exempt address. - -```solidity -function setTaxless(address account, bool isTaxless_) internal onlyOwner -{ - _setTaxless(account, isTaxless_); -} -``` - -### **\_setFeeReceiver**(address feeReceiver\_) internal - -Address that will receive the token Fees collected. - -```solidity -function setFeeReceiver(address feeReceiver_) internal onlyOwner -{ - _setFeeReceiver(feeReceiver_); -} -``` - -### **\_setFeeActive**(bool isFeeActive\_) internal - -Set wheter or not fees are being collected. - -```solidity -function setFeeActive(bool isFeeActive_) internal onlyOwner -{ - _setFeeActive(isFeeActive_); -} -``` - -### **\_setPair**(address router_, address baseToken\_) internal - -Change the main pair address by passing the router and the base token as parameter. Creates a new pair in case it wasn't created. After this function is called the fees will be collected in this pair. - -```solidity -function setPair(address router_, address baseToken_) internal onlyOwner -{ - _setPair(router_, baseToken_); -} -``` - -### **\_setFees**(uint buyFeePercentage, uint sellFeePercentage, uint p2pFeePercentage) internal - -Buy and sell fees are collected when interacting with the pair. P2P fees are collected when interacting with other address than the pair. - -```solidity -function _setFees(uint buyFeePercentage, uint sellFeePercentage, uint p2pFeePercentage) internal onlyOwner -{ - _setFees(buyFeePercentage, sellFeePercentage, p2pFeePercentage); -} -``` \ No newline at end of file diff --git a/hardhat.config.js b/hardhat.config.js index 7b9650a..0e6c4db 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -1,15 +1,26 @@ require("@nomicfoundation/hardhat-toolbox"); require('solidity-coverage') require('dotenv').config() +require('solidity-docgen') /** @type import('hardhat/config').HardhatUserConfig */ module.exports = { - solidity: "0.8.17", + solidity: '0.8.17', networks: { hardhat: { forking: { url: process.env.MAINNET_RPC_URL, } } + }, + docgen: { + pages: 'files', + exclude: [ + 'common', + 'examples', + 'ERC20/interfaces', + 'ERC20/ERC20.sol', + 'ERC721' + ] } }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 47693c3..e7bb669 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3129,7 +3129,6 @@ "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, "requires": { "minimist": "^1.2.5", "neo-async": "^2.6.0", @@ -4011,8 +4010,7 @@ "minimist": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, "mkdirp": { "version": "0.5.5", @@ -4185,8 +4183,7 @@ "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node-addon-api": { "version": "2.0.2", @@ -5047,6 +5044,11 @@ } } }, + "solidity-ast": { + "version": "0.4.45", + "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.45.tgz", + "integrity": "sha512-N6uqfaDulVZqjpjru+KvMLjV89M3hesyr/1/t8nkjohRagFSDmDxZvb9viKV98pdwpMzs61Nt2JAApgh0fkL0g==" + }, "solidity-coverage": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.2.tgz", @@ -5449,11 +5451,19 @@ } } }, + "solidity-docgen": { + "version": "0.6.0-beta.34", + "resolved": "https://registry.npmjs.org/solidity-docgen/-/solidity-docgen-0.6.0-beta.34.tgz", + "integrity": "sha512-igdGrkg8gT1jn+B2NwzjEtSf+7NTrSi/jz88zO7MZWgETmcWbXaxgAsQP4BQeC4YFeH0Pie1NsLP7+9qDgvFtA==", + "requires": { + "handlebars": "^4.7.7", + "solidity-ast": "^0.4.38" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-support": { "version": "0.5.21", @@ -5905,7 +5915,6 @@ "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true, "optional": true }, "unbox-primitive": { @@ -6070,8 +6079,7 @@ "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" }, "wordwrapjs": { "version": "4.0.1", diff --git a/package.json b/package.json index 8d37dbf..c40f158 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "typechain": "^8.1.0" }, "dependencies": { - "dotenv": "^16.0.2" + "dotenv": "^16.0.2", + "solidity-docgen": "^0.6.0-beta.34" } }