Commit 064d6fc7 by github-actions

Transpile 943b3e37

parent f05d29a1
...@@ -235,7 +235,7 @@ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeabl ...@@ -235,7 +235,7 @@ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeabl
* *
* Requirements: * Requirements:
* *
* - `to` cannot be the zero address. * - `account` cannot be the zero address.
*/ */
function _mint(address account, uint256 amount) internal virtual { function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address"); require(account != address(0), "ERC20: mint to the zero address");
......
...@@ -25,7 +25,7 @@ library MathUpgradeable { ...@@ -25,7 +25,7 @@ library MathUpgradeable {
* zero. * zero.
*/ */
function average(uint256 a, uint256 b) internal pure returns (uint256) { function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute // (a + b) / 2 can overflow, so we distribute.
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
} }
} }
...@@ -175,10 +175,6 @@ library SafeMathUpgradeable { ...@@ -175,10 +175,6 @@ library SafeMathUpgradeable {
* @dev Returns the integer division of two unsigned integers, reverting with custom message on * @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero. * division by zero. The result is rounded towards zero.
* *
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Counterpart to Solidity's `/` operator. Note: this function uses a * Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity * `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas). * uses an invalid opcode to revert (consuming all remaining gas).
......
...@@ -9,7 +9,7 @@ A token is a _representation of something in the blockchain_. This something can ...@@ -9,7 +9,7 @@ A token is a _representation of something in the blockchain_. This something can
Much of the confusion surrounding tokens comes from two concepts getting mixed up: _token contracts_ and the actual _tokens_. Much of the confusion surrounding tokens comes from two concepts getting mixed up: _token contracts_ and the actual _tokens_.
A _token contract_ is simply an Ethereum smart contract. "Sending tokens" actually means "calling a method on a smart contract that someone wrote and deployed". At the end of the day, a token contract is not much more a mapping of addresses to balances, plus some methods to add and subtract from those balances. A _token contract_ is simply an Ethereum smart contract. "Sending tokens" actually means "calling a method on a smart contract that someone wrote and deployed". At the end of the day, a token contract is not much more than a mapping of addresses to balances, plus some methods to add and subtract from those balances.
It is these balances that represent the _tokens_ themselves. Someone "has tokens" when their balance in the token contract is non-zero. That's it! These balances could be considered money, experience points in a game, deeds of ownership, or voting rights, and each of these tokens would be stored in different token contracts. It is these balances that represent the _tokens_ themselves. Someone "has tokens" when their balance in the token contract is non-zero. That's it! These balances could be considered money, experience points in a game, deeds of ownership, or voting rights, and each of these tokens would be stored in different token contracts.
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
"solidity-coverage": "^0.7.11", "solidity-coverage": "^0.7.11",
"solidity-docgen": "^0.5.3", "solidity-docgen": "^0.5.3",
"web3": "^1.3.0", "web3": "^1.3.0",
"yargs": "^16.2.0" "yargs": "^17.0.0"
} }
}, },
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
...@@ -1909,14 +1909,14 @@ ...@@ -1909,14 +1909,14 @@
} }
}, },
"node_modules/@truffle/contract": { "node_modules/@truffle/contract": {
"version": "4.3.14", "version": "4.3.15",
"resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.3.14.tgz", "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.3.15.tgz",
"integrity": "sha512-F/IogCpQetrx8BBtKhfA4zo5pBpnMEscmiDGw4qQ+tUPZxam1KAOiTZ3srYoyxK8wHw/136Wn4CzzX2StgFaKQ==", "integrity": "sha512-PHM6tCF/GB3r/t5YbeXagtg9XPtjFgbc5YnRcXs8m2Cp2hXFeU91n1dxmIkBVJklia+tWGqLuVxvMqI88tcWbw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@truffle/blockchain-utils": "^0.0.29", "@truffle/blockchain-utils": "^0.0.29",
"@truffle/contract-schema": "^3.4.0", "@truffle/contract-schema": "^3.4.0",
"@truffle/debug-utils": "^5.0.14", "@truffle/debug-utils": "^5.0.15",
"@truffle/error": "^0.0.13", "@truffle/error": "^0.0.13",
"@truffle/interface-adapter": "^0.4.22", "@truffle/interface-adapter": "^0.4.22",
"bignumber.js": "^7.2.1", "bignumber.js": "^7.2.1",
...@@ -1947,9 +1947,9 @@ ...@@ -1947,9 +1947,9 @@
"dev": true "dev": true
}, },
"node_modules/@truffle/contract/node_modules/@truffle/codec": { "node_modules/@truffle/contract/node_modules/@truffle/codec": {
"version": "0.10.4", "version": "0.10.5",
"resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.10.4.tgz", "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.10.5.tgz",
"integrity": "sha512-h8M8LKORuvtd3X+VdLH//Ql6HS9jw977vHGuRPYqlFkTvvdLEjzsg4PFnxMvusnus6AWtRclbAfSOiojT6JcMg==", "integrity": "sha512-M8YR8hKxXTypgg8g8iD/rUkkWgS89/NqkLAR+ZpZIzO3PZ5pkiIysO2VkWeqJid8hVDM4O4Eswgt2ISrQzsVRg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"big.js": "^5.2.2", "big.js": "^5.2.2",
...@@ -1966,12 +1966,12 @@ ...@@ -1966,12 +1966,12 @@
} }
}, },
"node_modules/@truffle/contract/node_modules/@truffle/debug-utils": { "node_modules/@truffle/contract/node_modules/@truffle/debug-utils": {
"version": "5.0.14", "version": "5.0.15",
"resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.0.14.tgz", "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.0.15.tgz",
"integrity": "sha512-f5N+OafG3X9h5eJ+oQ4No+Qu7mmasEUx38EclRVY3VyKIoAObZGMSDy5hev5QEHFMtgV20I+DAypRN0+A5Fb5Q==", "integrity": "sha512-G5y+0Xx+IM6C9b8Vjm6bl73wIjB1/2qtVKnBlhbKfgxNpRgxFvXE/jeSkCPYpcnF3CsGign0dsIyZj59tMqE5A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@truffle/codec": "^0.10.4", "@truffle/codec": "^0.10.5",
"@trufflesuite/chromafi": "^2.2.2", "@trufflesuite/chromafi": "^2.2.2",
"bn.js": "^5.1.3", "bn.js": "^5.1.3",
"chalk": "^2.4.2", "chalk": "^2.4.2",
...@@ -11790,6 +11790,15 @@ ...@@ -11790,6 +11790,15 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/mocha/node_modules/ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/mocha/node_modules/argparse": { "node_modules/mocha/node_modules/argparse": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
...@@ -11824,6 +11833,15 @@ ...@@ -11824,6 +11833,15 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/mocha/node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/mocha/node_modules/js-yaml": { "node_modules/mocha/node_modules/js-yaml": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz",
...@@ -11887,6 +11905,32 @@ ...@@ -11887,6 +11905,32 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/mocha/node_modules/string-width": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
"integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
"dev": true,
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/mocha/node_modules/strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"dependencies": {
"ansi-regex": "^5.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/mocha/node_modules/supports-color": { "node_modules/mocha/node_modules/supports-color": {
"version": "8.1.1", "version": "8.1.1",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
...@@ -11917,6 +11961,24 @@ ...@@ -11917,6 +11961,24 @@
"node": ">= 8" "node": ">= 8"
} }
}, },
"node_modules/mocha/node_modules/yargs": {
"version": "16.2.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
"dev": true,
"dependencies": {
"cliui": "^7.0.2",
"escalade": "^3.1.1",
"get-caller-file": "^2.0.5",
"require-directory": "^2.1.1",
"string-width": "^4.2.0",
"y18n": "^5.0.5",
"yargs-parser": "^20.2.2"
},
"engines": {
"node": ">=10"
}
},
"node_modules/mock-fs": { "node_modules/mock-fs": {
"version": "4.14.0", "version": "4.14.0",
"resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz",
...@@ -17346,9 +17408,9 @@ ...@@ -17346,9 +17408,9 @@
"dev": true "dev": true
}, },
"node_modules/yargs": { "node_modules/yargs": {
"version": "16.2.0", "version": "17.0.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.0.0.tgz",
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "integrity": "sha512-gbtedDPfBgG40iLbaRXhqYJycUYqFVZQLIxl1cG5Ez/xZL/47TetSYzPSIixkWa36GKHr9D/o/oSG1vHXF4zTw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"cliui": "^7.0.2", "cliui": "^7.0.2",
...@@ -17360,7 +17422,7 @@ ...@@ -17360,7 +17422,7 @@
"yargs-parser": "^20.2.2" "yargs-parser": "^20.2.2"
}, },
"engines": { "engines": {
"node": ">=10" "node": ">=12"
} }
}, },
"node_modules/yargs-parser": { "node_modules/yargs-parser": {
...@@ -18923,14 +18985,14 @@ ...@@ -18923,14 +18985,14 @@
} }
}, },
"@truffle/contract": { "@truffle/contract": {
"version": "4.3.14", "version": "4.3.15",
"resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.3.14.tgz", "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.3.15.tgz",
"integrity": "sha512-F/IogCpQetrx8BBtKhfA4zo5pBpnMEscmiDGw4qQ+tUPZxam1KAOiTZ3srYoyxK8wHw/136Wn4CzzX2StgFaKQ==", "integrity": "sha512-PHM6tCF/GB3r/t5YbeXagtg9XPtjFgbc5YnRcXs8m2Cp2hXFeU91n1dxmIkBVJklia+tWGqLuVxvMqI88tcWbw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@truffle/blockchain-utils": "^0.0.29", "@truffle/blockchain-utils": "^0.0.29",
"@truffle/contract-schema": "^3.4.0", "@truffle/contract-schema": "^3.4.0",
"@truffle/debug-utils": "^5.0.14", "@truffle/debug-utils": "^5.0.15",
"@truffle/error": "^0.0.13", "@truffle/error": "^0.0.13",
"@truffle/interface-adapter": "^0.4.22", "@truffle/interface-adapter": "^0.4.22",
"bignumber.js": "^7.2.1", "bignumber.js": "^7.2.1",
...@@ -18950,9 +19012,9 @@ ...@@ -18950,9 +19012,9 @@
"dev": true "dev": true
}, },
"@truffle/codec": { "@truffle/codec": {
"version": "0.10.4", "version": "0.10.5",
"resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.10.4.tgz", "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.10.5.tgz",
"integrity": "sha512-h8M8LKORuvtd3X+VdLH//Ql6HS9jw977vHGuRPYqlFkTvvdLEjzsg4PFnxMvusnus6AWtRclbAfSOiojT6JcMg==", "integrity": "sha512-M8YR8hKxXTypgg8g8iD/rUkkWgS89/NqkLAR+ZpZIzO3PZ5pkiIysO2VkWeqJid8hVDM4O4Eswgt2ISrQzsVRg==",
"dev": true, "dev": true,
"requires": { "requires": {
"big.js": "^5.2.2", "big.js": "^5.2.2",
...@@ -18969,12 +19031,12 @@ ...@@ -18969,12 +19031,12 @@
} }
}, },
"@truffle/debug-utils": { "@truffle/debug-utils": {
"version": "5.0.14", "version": "5.0.15",
"resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.0.14.tgz", "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.0.15.tgz",
"integrity": "sha512-f5N+OafG3X9h5eJ+oQ4No+Qu7mmasEUx38EclRVY3VyKIoAObZGMSDy5hev5QEHFMtgV20I+DAypRN0+A5Fb5Q==", "integrity": "sha512-G5y+0Xx+IM6C9b8Vjm6bl73wIjB1/2qtVKnBlhbKfgxNpRgxFvXE/jeSkCPYpcnF3CsGign0dsIyZj59tMqE5A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@truffle/codec": "^0.10.4", "@truffle/codec": "^0.10.5",
"@trufflesuite/chromafi": "^2.2.2", "@trufflesuite/chromafi": "^2.2.2",
"bn.js": "^5.1.3", "bn.js": "^5.1.3",
"chalk": "^2.4.2", "chalk": "^2.4.2",
...@@ -26895,6 +26957,12 @@ ...@@ -26895,6 +26957,12 @@
"integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
"dev": true "dev": true
}, },
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true
},
"argparse": { "argparse": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
...@@ -26917,6 +26985,12 @@ ...@@ -26917,6 +26985,12 @@
"path-exists": "^4.0.0" "path-exists": "^4.0.0"
} }
}, },
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"js-yaml": { "js-yaml": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz",
...@@ -26959,6 +27033,26 @@ ...@@ -26959,6 +27033,26 @@
"p-limit": "^3.0.2" "p-limit": "^3.0.2"
} }
}, },
"string-width": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
"integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
}
},
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.0"
}
},
"supports-color": { "supports-color": {
"version": "8.1.1", "version": "8.1.1",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
...@@ -26976,6 +27070,21 @@ ...@@ -26976,6 +27070,21 @@
"requires": { "requires": {
"isexe": "^2.0.0" "isexe": "^2.0.0"
} }
},
"yargs": {
"version": "16.2.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
"dev": true,
"requires": {
"cliui": "^7.0.2",
"escalade": "^3.1.1",
"get-caller-file": "^2.0.5",
"require-directory": "^2.1.1",
"string-width": "^4.2.0",
"y18n": "^5.0.5",
"yargs-parser": "^20.2.2"
}
} }
} }
}, },
...@@ -31385,9 +31494,9 @@ ...@@ -31385,9 +31494,9 @@
"dev": true "dev": true
}, },
"yargs": { "yargs": {
"version": "16.2.0", "version": "17.0.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.0.0.tgz",
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "integrity": "sha512-gbtedDPfBgG40iLbaRXhqYJycUYqFVZQLIxl1cG5Ez/xZL/47TetSYzPSIixkWa36GKHr9D/o/oSG1vHXF4zTw==",
"dev": true, "dev": true,
"requires": { "requires": {
"cliui": "^7.0.2", "cliui": "^7.0.2",
...@@ -78,6 +78,6 @@ ...@@ -78,6 +78,6 @@
"solidity-coverage": "^0.7.11", "solidity-coverage": "^0.7.11",
"solidity-docgen": "^0.5.3", "solidity-docgen": "^0.5.3",
"web3": "^1.3.0", "web3": "^1.3.0",
"yargs": "^16.2.0" "yargs": "^17.0.0"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment