Description:
Multi-signature wallet contract requiring multiple confirmations for transaction execution.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"BBUXToken.sol": {
"content": "\r
\r
// SPDX-License-Identifier: MIT\r
\r
pragma solidity 0.8.30;\r
pragma experimental ABIEncoderV2;\r
\r
\r
/**\r
* @dev Interface of the ERC20 standard as defined in the EIP.\r
*/\r
interface IERC20 {\r
/**\r
* @dev Emitted when `value` tokens are moved from one account (`from`) to\r
* another (`to`).\r
*\r
* Note that `value` may be zero.\r
*/\r
event Transfer(address indexed from, address indexed to, uint256 value);\r
\r
/**\r
* @dev Emitted when the allowance of a `spender` for an `owner` is set by\r
* a call to {approve}. `value` is the new allowance.\r
*/\r
event Approval(address indexed owner, address indexed spender, uint256 value);\r
\r
/**\r
* @dev Returns the amount of tokens in existence.\r
*/\r
function totalSupply() external view returns (uint256);\r
\r
/**\r
* @dev Returns the amount of tokens owned by `account`.\r
*/\r
function balanceOf(address account) external view returns (uint256);\r
\r
/**\r
* @dev Moves `amount` tokens from the caller's account to `to`.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* Emits a {Transfer} event.\r
*/\r
function transfer(address to, uint256 amount) external returns (bool);\r
\r
/**\r
* @dev Returns the remaining number of tokens that `spender` will be\r
* allowed to spend on behalf of `owner` through {transferFrom}. This is\r
* zero by default.\r
*\r
* This value changes when {approve} or {transferFrom} are called.\r
*/\r
function allowance(address owner, address spender) external view returns (uint256);\r
\r
/**\r
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* IMPORTANT: Beware that changing an allowance with this method brings the risk\r
* that someone may use both the old and the new allowance by unfortunate\r
* transaction ordering. One possible solution to mitigate this race\r
* condition is to first reduce the spender's allowance to 0 and set the\r
* desired value afterwards:\r
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r
*\r
* Emits an {Approval} event.\r
*/\r
function approve(address spender, uint256 amount) external returns (bool);\r
\r
/**\r
* @dev Moves `amount` tokens from `from` to `to` using the\r
* allowance mechanism. `amount` is then deducted from the caller's\r
* allowance.\r
*\r
* Returns a boolean value indicating whether the operation succeeded.\r
*\r
* Emits a {Transfer} event.\r
*/\r
function transferFrom(address from, address to, uint256 amount) external returns (bool);\r
}\r
\r
\r
/**\r
* @dev Interface for the optional metadata functions from the ERC20 standard.\r
*\r
* _Available since v4.1._\r
*/\r
interface IERC20Metadata is IERC20 {\r
/**\r
* @dev Returns the name of the token.\r
*/\r
function name() external view returns (string memory);\r
\r
/**\r
* @dev Returns the symbol of the token.\r
*/\r
function symbol() external view returns (string memory);\r
\r
/**\r
* @dev Returns the decimals places of the token.\r
*/\r
function decimals() external view returns (uint8);\r
}\r
\r
\r
/**\r
* @dev Provides information about the current execution context, including the\r
* sender of the transaction and its data. While these are generally available\r
* via msg.sender and msg.data, they should not be accessed in such a direct\r
* manner, since when dealing with meta-transactions the account sending and\r
* paying for execution may not be the actual sender (as far as an application\r
* is concerned).\r
*\r
* This contract is only required for intermediate, library-like contracts.\r
*/\r
abstract contract Context {\r
function _msgSender() internal view virtual returns (address) {\r
return msg.sender;\r
}\r
\r
function _msgData() internal view virtual returns (bytes calldata) {\r
return msg.data;\r
}\r
}\r
\r
\r
/**\r
* @dev Contract module which provides a basic access control mechanism, where\r
* there is an account (an owner) that can be granted exclusive access to\r
* specific functions.\r
*\r
* By default, the owner account will be the one that deploys the contract. This\r
* can later be changed with {transferOwnership}.\r
*\r
* This module is used through inheritance. It will make available the modifier\r
* `onlyOwner`, which can be applied to your functions to restrict their use to\r
* the owner.\r
*/\r
abstract contract Ownable is Context {\r
address private _owner;\r
\r
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r
\r
/**\r
* @dev Initializes the contract setting the deployer as the initial owner.\r
*/\r
constructor() {\r
_transferOwnership(_msgSender());\r
}\r
\r
/**\r
* @dev Throws if called by any account other than the owner.\r
*/\r
modifier onlyOwner() {\r
_checkOwner();\r
_;\r
}\r
\r
/**\r
* @dev Returns the address of the current owner.\r
*/\r
function owner() public view virtual returns (address) {\r
return _owner;\r
}\r
\r
/**\r
* @dev Throws if the sender is not the owner.\r
*/\r
function _checkOwner() internal view virtual {\r
require(owner() == _msgSender(), "Ownable: caller is not the owner");\r
}\r
\r
/**\r
* @dev Leaves the contract without owner. It will not be possible to call\r
* `onlyOwner` functions. Can only be called by the current owner.\r
*\r
* NOTE: Renouncing ownership will leave the contract without an owner,\r
* thereby disabling any functionality that is only available to the owner.\r
*/\r
function renounceOwnership() public virtual onlyOwner {\r
_transferOwnership(address(0));\r
}\r
\r
/**\r
* @dev Transfers ownership of the contract to a new account (`newOwner`).\r
* Can only be called by the current owner.\r
*/\r
function transferOwnership(address newOwner) public virtual onlyOwner {\r
require(newOwner != address(0), "Ownable: new owner is the zero address");\r
_transferOwnership(newOwner);\r
}\r
\r
/**\r
* @dev Transfers ownership of the contract to a new account (`newOwner`).\r
* Internal function without access restriction.\r
*/\r
function _transferOwnership(address newOwner) internal virtual {\r
address oldOwner = _owner;\r
_owner = newOwner;\r
emit OwnershipTransferred(oldOwner, newOwner);\r
}\r
}\r
\r
\r
/**\r
* @dev Collection of functions related to the address type\r
*/\r
library Address {\r
/**\r
* @dev Returns true if `account` is a contract.\r
*\r
* [IMPORTANT]\r
* ====\r
* It is unsafe to assume that an address for which this function returns\r
* false is an externally-owned account (EOA) and not a contract.\r
*\r
* Among others, `isContract` will return false for the following\r
* types of addresses:\r
*\r
* - an externally-owned account\r
* - a contract in construction\r
* - an address where a contract will be created\r
* - an address where a contract lived, but was destroyed\r
*\r
* Furthermore, `isContract` will also return true if the target contract within\r
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\r
* which only has an effect at the end of a transaction.\r
* ====\r
*\r
* [IMPORTANT]\r
* ====\r
* You shouldn't rely on `isContract` to protect against flash loan attacks!\r
*\r
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\r
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\r
* constructor.\r
* ====\r
*/\r
function isContract(address account) internal view returns (bool) {\r
// This method relies on extcodesize/address.code.length, which returns 0\r
// for contracts in construction, since the code is only stored at the end\r
// of the constructor execution.\r
\r
return account.code.length > 0;\r
}\r
\r
/**\r
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to\r
* `recipient`, forwarding all available gas and reverting on errors.\r
*\r
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\r
* of certain opcodes, possibly making contracts go over the 2300 gas limit\r
* imposed by `transfer`, making them unable to receive funds via\r
* `transfer`. {sendValue} removes this limitation.\r
*\r
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\r
*\r
* IMPORTANT: because control is transferred to `recipient`, care must be\r
* taken to not create reentrancy vulnerabilities. Consider using\r
* {ReentrancyGuard} or the\r
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\r
*/\r
function sendValue(address payable recipient, uint256 amount) internal {\r
require(address(this).balance >= amount, "Address: insufficient balance");\r
\r
(bool success, ) = recipient.call{value: amount}("");\r
require(success, "Address: unable to send value, recipient may have reverted");\r
}\r
\r
/**\r
* @dev Performs a Solidity function call using a low level `call`. A\r
* plain `call` is an unsafe replacement for a function call: use this\r
* function instead.\r
*\r
* If `target` reverts with a revert reason, it is bubbled up by this\r
* function (like regular Solidity function calls).\r
*\r
* Returns the raw returned data. To convert to the expected return value,\r
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\r
*\r
* Requirements:\r
*\r
* - `target` must be a contract.\r
* - calling `target` with `data` must not revert.\r
*\r
* _Available since v3.1._\r
*/\r
function functionCall(address target, bytes memory data) internal returns (bytes memory) {\r
return functionCallWithValue(target, data, 0, "Address: low-level call failed");\r
}\r
\r
/**\r
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\r
* `errorMessage` as a fallback revert reason when `target` reverts.\r
*\r
* _Available since v3.1._\r
*/\r
function functionCall(\r
address target,\r
bytes memory data,\r
string memory errorMessage\r
) internal returns (bytes memory) {\r
return functionCallWithValue(target, data, 0, errorMessage);\r
}\r
\r
/**\r
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r
* but also transferring `value` wei to `target`.\r
*\r
* Requirements:\r
*\r
* - the calling contract must have an ETH balance of at least `value`.\r
* - the called Solidity function must be `payable`.\r
*\r
* _Available since v3.1._\r
*/\r
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\r
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\r
}\r
\r
/**\r
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\r
* with `errorMessage` as a fallback revert reason when `target` reverts.\r
*\r
* _Available since v3.1._\r
*/\r
function functionCallWithValue(\r
address target,\r
bytes memory data,\r
uint256 value,\r
string memory errorMessage\r
) internal returns (bytes memory) {\r
require(address(this).balance >= value, "Address: insufficient balance for call");\r
(bool success, bytes memory returndata) = target.call{value: value}(data);\r
return verifyCallResultFromTarget(target, success, returndata, errorMessage);\r
}\r
\r
/**\r
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r
* but performing a static call.\r
*\r
* _Available since v3.3._\r
*/\r
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\r
return functionStaticCall(target, data, "Address: low-level static call failed");\r
}\r
\r
/**\r
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\r
* but performing a static call.\r
*\r
* _Available since v3.3._\r
*/\r
function functionStaticCall(\r
address target,\r
bytes memory data,\r
string memory errorMessage\r
) internal view returns (bytes memory) {\r
(bool success, bytes memory returndata) = target.staticcall(data);\r
return verifyCallResultFromTarget(target, success, returndata, errorMessage);\r
}\r
\r
/**\r
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r
* but performing a delegate call.\r
*\r
* _Available since v3.4._\r
*/\r
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\r
return functionDelegateCall(target, data, "Address: low-level delegate call failed");\r
}\r
\r
/**\r
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\r
* but performing a delegate call.\r
*\r
* _Available since v3.4._\r
*/\r
function functionDelegateCall(\r
address target,\r
bytes memory data,\r
string memory errorMessage\r
) internal returns (bytes memory) {\r
(bool success, bytes memory returndata) = target.delegatecall(data);\r
return verifyCallResultFromTarget(target, success, returndata, errorMessage);\r
}\r
\r
/**\r
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\r
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\r
*\r
* _Available since v4.8._\r
*/\r
function verifyCallResultFromTarget(\r
address target,\r
bool success,\r
bytes memory returndata,\r
string memory errorMessage\r
) internal view returns (bytes memory) {\r
if (success) {\r
if (returndata.length == 0) {\r
// only check isContract if the call was successful and the return data is empty\r
// otherwise we already know that it was a contract\r
require(isContract(target), "Address: call to non-contract");\r
}\r
return returndata;\r
} else {\r
_revert(returndata, errorMessage);\r
}\r
}\r
\r
/**\r
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\r
* revert reason or using the provided one.\r
*\r
* _Available since v4.3._\r
*/\r
function verifyCallResult(\r
bool success,\r
bytes memory returndata,\r
string memory errorMessage\r
) internal pure returns (bytes memory) {\r
if (success) {\r
return returndata;\r
} else {\r
_revert(returndata, errorMessage);\r
}\r
}\r
\r
function _revert(bytes memory returndata, string memory errorMessage) private pure {\r
// Look for revert reason and bubble it up if present\r
if (returndata.length > 0) {\r
// The easiest way to bubble the revert reason is using memory via assembly\r
/// @solidity memory-safe-assembly\r
assembly {\r
let returndata_size := mload(returndata)\r
revert(add(32, returndata), returndata_size)\r
}\r
} else {\r
revert(errorMessage);\r
}\r
}\r
}\r
\r
\r
contract BBUX is Context, IERC20, IERC20Metadata,Ownable {\r
\r
mapping (address => uint256) private _balances;\r
mapping (address => mapping (address => uint256)) private _allowances;\r
\r
bool public mintedByDxsale = true;\r
uint256 private _totalSupply;\r
bool public mintingFinishedPermanent = false;\r
string private _name;\r
string private _symbol;\r
uint8 private _decimals;\r
address public _creator;\r
/**\r
* @dev Sets the values for {name}, {symbol} and {decimals}.\r
*\r
*\r
* All two of these values are immutable: they can only be set once during\r
* construction.\r
*/\r
constructor (address creator_,string memory name_, string memory symbol_,uint8 decimals_, uint256 tokenSupply_) {\r
_name = name_;\r
_symbol = symbol_;\r
_decimals = decimals_;\r
_creator = creator_;\r
\r
_mint(_creator,tokenSupply_);\r
mintingFinishedPermanent = true;\r
}\r
\r
/**\r
* @dev Returns the name of the token.\r
*/\r
function name() public view virtual override returns (string memory) {\r
return _name;\r
}\r
\r
/**\r
* @dev Returns the symbol of the token, usually a shorter version of the\r
* name.\r
*/\r
function symbol() public view virtual override returns (string memory) {\r
return _symbol;\r
}\r
\r
/**\r
* @dev Returns the number of decimals used to get its user representation.\r
* For example, if `decimals` equals `2`, a balance of `505` tokens should\r
* be displayed to a user as `5,05` (`505 / 10 ** 2`).\r
*\r
* Tokens usually opt for a value of 18, imitating the relationship between\r
* Ether and Wei. This is the value {ERC20} uses, unless this function is\r
* overridden;\r
*\r
* NOTE: This information is only used for _display_ purposes: it in\r
* no way affects any of the arithmetic of the contract, including\r
* {IERC20-balanceOf} and {IERC20-transfer}.\r
*/\r
function decimals() public view virtual override returns (uint8) {\r
return _decimals;\r
}\r
\r
/**\r
* @dev See {IERC20-totalSupply}.\r
*/\r
function totalSupply() public view virtual override returns (uint256) {\r
return _totalSupply;\r
}\r
\r
/**\r
* @dev See {IERC20-balanceOf}.\r
*/\r
function balanceOf(address account) public view virtual override returns (uint256) {\r
return _balances[account];\r
}\r
\r
/**\r
* @dev See {IERC20-transfer}.\r
*\r
* Requirements:\r
*\r
* - `recipient` cannot be the zero address.\r
* - the caller must have a balance of at least `amount`.\r
*/\r
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\r
_transfer(_msgSender(), recipient, amount);\r
return true;\r
}\r
\r
/**\r
* @dev See {IERC20-allowance}.\r
*/\r
function allowance(address owner, address spender) public view virtual override returns (uint256) {\r
return _allowances[owner][spender];\r
}\r
\r
/**\r
* @dev See {IERC20-approve}.\r
*\r
* Requirements:\r
*\r
* - `spender` cannot be the zero address.\r
*/\r
function approve(address spender, uint256 amount) public virtual override returns (bool) {\r
_approve(_msgSender(), spender, amount);\r
return true;\r
}\r
\r
/**\r
* @dev See {IERC20-transferFrom}.\r
*\r
* Emits an {Approval} event indicating the updated allowance. This is not\r
* required by the EIP. See the note at the beginning of {ERC20}.\r
*\r
* Requirements:\r
*\r
* - `sender` and `recipient` cannot be the zero address.\r
* - `sender` must have a balance of at least `amount`.\r
* - the caller must have allowance for ``sender``'s tokens of at least\r
* `amount`.\r
*/\r
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\r
_transfer(sender, recipient, amount);\r
\r
uint256 currentAllowance = _allowances[sender][_msgSender()];\r
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");\r
_approve(sender, _msgSender(), currentAllowance - amount);\r
\r
return true;\r
}\r
\r
/**\r
* @dev Atomically increases the allowance granted to `spender` by the caller.\r
*\r
* This is an alternative to {approve} that can be used as a mitigation for\r
* problems described in {IERC20-approve}.\r
*\r
* Emits an {Approval} event indicating the updated allowance.\r
*\r
* Requirements:\r
*\r
* - `spender` cannot be the zero address.\r
*/\r
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\r
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\r
return true;\r
}\r
\r
/**\r
* @dev Atomically decreases the allowance granted to `spender` by the caller.\r
*\r
* This is an alternative to {approve} that can be used as a mitigation for\r
* problems described in {IERC20-approve}.\r
*\r
* Emits an {Approval} event indicating the updated allowance.\r
*\r
* Requirements:\r
*\r
* - `spender` cannot be the zero address.\r
* - `spender` must have allowance for the caller of at least\r
* `subtractedValue`.\r
*/\r
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\r
uint256 currentAllowance = _allowances[_msgSender()][spender];\r
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");\r
_approve(_msgSender(), spender, currentAllowance - subtractedValue);\r
\r
return true;\r
}\r
\r
/**\r
* @dev Moves tokens `amount` from `sender` to `recipient`.\r
*\r
* This is internal function is equivalent to {transfer}, and can be used to\r
* e.g. implement automatic token fees, slashing mechanisms, etc.\r
*\r
* Emits a {Transfer} event.\r
*\r
* Requirements:\r
*\r
* - `sender` cannot be the zero address.\r
* - `recipient` cannot be the zero address.\r
* - `sender` must have a balance of at least `amount`.\r
*/\r
function _transfer(address sender, address recipient, uint256 amount) internal virtual {\r
require(sender != address(0), "ERC20: transfer from the zero address");\r
require(recipient != address(0), "ERC20: transfer to the zero address");\r
\r
_beforeTokenTransfer(sender, recipient, amount);\r
\r
uint256 senderBalance = _balances[sender];\r
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");\r
_balances[sender] = senderBalance - amount;\r
_balances[recipient] += amount;\r
\r
emit Transfer(sender, recipient, amount);\r
}\r
\r
/** @dev Creates `amount` tokens and assigns them to `account`, increasing\r
* the total supply.\r
*\r
* Emits a {Transfer} event with `from` set to the zero address.\r
*\r
* Requirements:\r
*\r
* - `account` cannot be the zero address.\r
*/\r
function _mint(address account, uint256 amount) internal virtual {\r
require(!mintingFinishedPermanent,"cant be minted anymore!");\r
require(account != address(0), "ERC20: mint to the zero address");\r
\r
_beforeTokenTransfer(address(0), account, amount);\r
\r
_totalSupply += amount;\r
_balances[account] += amount;\r
emit Transfer(address(0), account, amount);\r
} \r
\r
/**\r
* @dev Destroys `amount` tokens from `account`, reducing the\r
* total supply.\r
*\r
* Emits a {Transfer} event with `to` set to the zero address.\r
*\r
* Requirements:\r
*\r
* - `account` cannot be the zero address.\r
* - `account` must have at least `amount` tokens.\r
*/\r
function _burn(address account, uint256 amount) internal virtual {\r
require(account != address(0), "ERC20: burn from the zero address");\r
\r
_beforeTokenTransfer(account, address(0), amount);\r
\r
uint256 accountBalance = _balances[account];\r
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");\r
_balances[account] = accountBalance - amount;\r
_totalSupply -= amount;\r
\r
emit Transfer(account, address(0), amount);\r
}\r
\r
/**\r
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\r
*\r
* This internal function is equivalent to `approve`, and can be used to\r
* e.g. set automatic allowances for certain subsystems, etc.\r
*\r
* Emits an {Approval} event.\r
*\r
* Requirements:\r
*\r
* - `owner` cannot be the zero address.\r
* - `spender` cannot be the zero address.\r
*/\r
function _approve(address owner, address spender, uint256 amount) internal virtual {\r
require(owner != address(0), "ERC20: approve from the zero address");\r
require(spender != address(0), "ERC20: approve to the zero address");\r
\r
_allowances[owner][spender] = amount;\r
emit Approval(owner, spender, amount);\r
}\r
\r
/**\r
* @dev Hook that is called before any transfer of tokens. This includes\r
* minting and burning.\r
*\r
* Calling conditions:\r
*\r
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\r
* will be to transferred to `to`.\r
* - when `from` is zero, `amount` tokens will be minted for `to`.\r
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.\r
* - `from` and `to` are never both zero.\r
*\r
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r
*/\r
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\r
}"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": []
}
}}
Submitted on: 2025-11-05 13:12:31
Comments
Log in to comment.
No comments yet.