Source Code
Latest 25 from a total of 1,172 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Send Welcome Tok... | 23947550 | 108 days ago | IN | 0 ETH | 0.00017192 | ||||
| Send Welcome Tok... | 23523835 | 167 days ago | IN | 0 ETH | 0.0001711 | ||||
| Send Welcome Tok... | 23517466 | 168 days ago | IN | 0 ETH | 0.00017146 | ||||
| Send Welcome Tok... | 23495927 | 171 days ago | IN | 0 ETH | 0.00017217 | ||||
| Send Welcome Tok... | 23495924 | 171 days ago | IN | 0 ETH | 0.00017237 | ||||
| Send Welcome Tok... | 23493533 | 171 days ago | IN | 0 ETH | 0.00018157 | ||||
| Send Welcome Tok... | 23491155 | 172 days ago | IN | 0 ETH | 0.00022902 | ||||
| Send Welcome Tok... | 23491153 | 172 days ago | IN | 0 ETH | 0.00023035 | ||||
| Send Welcome Tok... | 23481627 | 173 days ago | IN | 0 ETH | 0.00017102 | ||||
| Send Welcome Tok... | 23474481 | 174 days ago | IN | 0 ETH | 0.00019243 | ||||
| Send Welcome Tok... | 23474478 | 174 days ago | IN | 0 ETH | 0.00019342 | ||||
| Send Welcome Tok... | 23469705 | 175 days ago | IN | 0 ETH | 0.00153883 | ||||
| Send Welcome Tok... | 23469703 | 175 days ago | IN | 0 ETH | 0.00149811 | ||||
| Send Welcome Tok... | 23467320 | 175 days ago | IN | 0 ETH | 0.00017342 | ||||
| Send Welcome Tok... | 23467318 | 175 days ago | IN | 0 ETH | 0.00017373 | ||||
| Send Welcome Tok... | 23464934 | 175 days ago | IN | 0 ETH | 0.00018355 | ||||
| Send Welcome Tok... | 23464931 | 175 days ago | IN | 0 ETH | 0.00017896 | ||||
| Send Welcome Tok... | 23460171 | 176 days ago | IN | 0 ETH | 0.0001715 | ||||
| Send Welcome Tok... | 23455393 | 177 days ago | IN | 0 ETH | 0.0001859 | ||||
| Send Welcome Tok... | 23453017 | 177 days ago | IN | 0 ETH | 0.00017444 | ||||
| Send Welcome Tok... | 23453014 | 177 days ago | IN | 0 ETH | 0.00017378 | ||||
| Send Welcome Tok... | 23450627 | 177 days ago | IN | 0 ETH | 0.00017033 | ||||
| Send Welcome Tok... | 23445864 | 178 days ago | IN | 0 ETH | 0.00019267 | ||||
| Send Welcome Tok... | 23445862 | 178 days ago | IN | 0 ETH | 0.0001914 | ||||
| Send Welcome Tok... | 23443484 | 178 days ago | IN | 0 ETH | 0.00017913 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ERC20WelcomeTokens
Compiler Version
v0.8.28+commit.7893614a
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2024-11-19
*/
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
// File: @openzeppelin/contracts/interfaces/IERC20.sol
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)
pragma solidity ^0.8.20;
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// File: @openzeppelin/contracts/interfaces/IERC165.sol
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)
pragma solidity ^0.8.20;
// File: @openzeppelin/contracts/interfaces/IERC1363.sol
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)
pragma solidity ^0.8.20;
/**
* @title IERC1363
* @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
*
* Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
* after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
*/
interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0xb0202a11.
* 0xb0202a11 ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @param data Additional data with no specified format, sent in call to `spender`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}
// File: @openzeppelin/contracts/utils/Errors.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}
// File: @openzeppelin/contracts/utils/Address.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert Errors.FailedCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly ("memory-safe") {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert Errors.FailedCall();
}
}
}
// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
/**
* @title SafeERC20
* @dev Wrappers around ERC-20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
/**
* @dev An operation with an ERC-20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
// bubble errors
if iszero(success) {
let ptr := mload(0x40)
returndatacopy(ptr, 0, returndatasize())
revert(ptr, returndatasize())
}
returnSize := returndatasize()
returnValue := mload(0)
}
if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
bool success;
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
returnSize := returndatasize()
returnValue := mload(0)
}
return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
}
}
// File: ERC20WelcomeTokens.sol
pragma solidity >=0.6.12 <0.9.0;
/// @custom:security-contact info@pocketfi.finance
contract ERC20WelcomeTokens {
using SafeERC20 for IERC20;
address private immutable owner;
IERC20 private immutable token;
uint256 private immutable supply = 500000000000000000;
uint256 private amount = 5000000000000;
uint256 private distributed = 0;
constructor(IERC20 token_) {
token = token_;
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner, "You are not authorized to proceed");
_;
}
// MARK: Owner methods
function setAmount(uint256 _amount) public onlyOwner {
amount = _amount;
}
function withdraw() public onlyOwner {
require(token.balanceOf(address(this)) > 0, "There is not balance to continue. Try again later.");
require(token.transfer(owner, token.balanceOf(address(this))) ,"An unexpected error has occurred. Try again later.");
}
// MARK: Public methods
function getInitialSupply() external pure returns (uint256) {
return supply;
}
function getRemainingSupply() external view returns (uint256) {
return token.balanceOf(address(this));
}
function getWelcomeAmount() external view returns (uint256) {
return amount;
}
// MARK: Send welcome tokens
function sendWelcomeTokens(address address_) public onlyOwner returns (bool) {
require(token.balanceOf(address(this)) >= amount, "Vendor has not enough balance to continue. Try again later.");
require(token.transfer(address_, amount), "An unexpected error has occurred. Try again later.");
distributed += amount;
return true;
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC20","name":"token_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"getInitialSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getRemainingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWelcomeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"sendWelcomeTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60e06040526706f05b59d3b2000060c05265048c273950005f908155600155348015610029575f5ffd5b5060405161089c38038061089c8339810160408190526100489161005d565b6001600160a01b031660a0523360805261008a565b5f6020828403121561006d575f5ffd5b81516001600160a01b0381168114610083575f5ffd5b9392505050565b60805160a05160c0516107b96100e35f395f609901525f818161019c0152818161028a0152818161040f0152818161051d01526105db01525f818160f301528181610148015281816102bb01526103bb01526107b95ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c8063271f88b4146100645780633ccfd60b146100795780635347b0de1461008157806381a4a6d814610097578063aa4ea35a146100bd578063e4b7fb73146100e0575b5f5ffd5b610077610072366004610651565b6100e8565b005b61007761013d565b5f545b6040519081526020015b60405180910390f35b7f0000000000000000000000000000000000000000000000000000000000000000610084565b6100d06100cb366004610668565b6103af565b604051901515815260200161008e565b6100846105c4565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101395760405162461bcd60e51b815260040161013090610695565b60405180910390fd5b5f55565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101855760405162461bcd60e51b815260040161013090610695565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156101e9573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061020d91906106d6565b116102755760405162461bcd60e51b815260206004820152603260248201527f5468657265206973206e6f742062616c616e636520746f20636f6e74696e756560448201527117102a393c9030b3b0b4b7103630ba32b91760711b6064820152608401610130565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb907f00000000000000000000000000000000000000000000000000000000000000009083906370a0823190602401602060405180830381865afa158015610301573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061032591906106d6565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af115801561036d573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061039191906106ed565b6103ad5760405162461bcd60e51b81526004016101309061070c565b565b5f336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103f85760405162461bcd60e51b815260040161013090610695565b5f546040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561045c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061048091906106d6565b10156104f45760405162461bcd60e51b815260206004820152603b60248201527f56656e646f7220686173206e6f7420656e6f7567682062616c616e636520746f60448201527f20636f6e74696e75652e2054727920616761696e206c617465722e00000000006064820152608401610130565b5f5460405163a9059cbb60e01b81526001600160a01b03848116600483015260248201929092527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015610565573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061058991906106ed565b6105a55760405162461bcd60e51b81526004016101309061070c565b5f5460015f8282546105b7919061075e565b9091555060019392505050565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610628573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061064c91906106d6565b905090565b5f60208284031215610661575f5ffd5b5035919050565b5f60208284031215610678575f5ffd5b81356001600160a01b038116811461068e575f5ffd5b9392505050565b60208082526021908201527f596f7520617265206e6f7420617574686f72697a656420746f2070726f6365656040820152601960fa1b606082015260800190565b5f602082840312156106e6575f5ffd5b5051919050565b5f602082840312156106fd575f5ffd5b8151801515811461068e575f5ffd5b60208082526032908201527f416e20756e6578706563746564206572726f7220686173206f6363757272656460408201527117102a393c9030b3b0b4b7103630ba32b91760711b606082015260800190565b8082018082111561077d57634e487b7160e01b5f52601160045260245ffd5b9291505056fea26469706673582212205ee6902e55fb57e8fbacc202e6d0134ae8078efedf8ba8c66c7316a2550445ee64736f6c634300081c00330000000000000000000000003f0c2870931e343773bec0ea56243de0dd470c28
Deployed Bytecode
0x608060405234801561000f575f5ffd5b5060043610610060575f3560e01c8063271f88b4146100645780633ccfd60b146100795780635347b0de1461008157806381a4a6d814610097578063aa4ea35a146100bd578063e4b7fb73146100e0575b5f5ffd5b610077610072366004610651565b6100e8565b005b61007761013d565b5f545b6040519081526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000006f05b59d3b20000610084565b6100d06100cb366004610668565b6103af565b604051901515815260200161008e565b6100846105c4565b336001600160a01b037f000000000000000000000000bdbf4ea21132cbea02bc7eeaf4da6e4f7975ac4816146101395760405162461bcd60e51b815260040161013090610695565b60405180910390fd5b5f55565b336001600160a01b037f000000000000000000000000bdbf4ea21132cbea02bc7eeaf4da6e4f7975ac4816146101855760405162461bcd60e51b815260040161013090610695565b6040516370a0823160e01b81523060048201525f907f0000000000000000000000003f0c2870931e343773bec0ea56243de0dd470c286001600160a01b0316906370a0823190602401602060405180830381865afa1580156101e9573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061020d91906106d6565b116102755760405162461bcd60e51b815260206004820152603260248201527f5468657265206973206e6f742062616c616e636520746f20636f6e74696e756560448201527117102a393c9030b3b0b4b7103630ba32b91760711b6064820152608401610130565b6040516370a0823160e01b81523060048201527f0000000000000000000000003f0c2870931e343773bec0ea56243de0dd470c286001600160a01b03169063a9059cbb907f000000000000000000000000bdbf4ea21132cbea02bc7eeaf4da6e4f7975ac489083906370a0823190602401602060405180830381865afa158015610301573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061032591906106d6565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af115801561036d573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061039191906106ed565b6103ad5760405162461bcd60e51b81526004016101309061070c565b565b5f336001600160a01b037f000000000000000000000000bdbf4ea21132cbea02bc7eeaf4da6e4f7975ac4816146103f85760405162461bcd60e51b815260040161013090610695565b5f546040516370a0823160e01b81523060048201527f0000000000000000000000003f0c2870931e343773bec0ea56243de0dd470c286001600160a01b0316906370a0823190602401602060405180830381865afa15801561045c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061048091906106d6565b10156104f45760405162461bcd60e51b815260206004820152603b60248201527f56656e646f7220686173206e6f7420656e6f7567682062616c616e636520746f60448201527f20636f6e74696e75652e2054727920616761696e206c617465722e00000000006064820152608401610130565b5f5460405163a9059cbb60e01b81526001600160a01b03848116600483015260248201929092527f0000000000000000000000003f0c2870931e343773bec0ea56243de0dd470c289091169063a9059cbb906044016020604051808303815f875af1158015610565573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061058991906106ed565b6105a55760405162461bcd60e51b81526004016101309061070c565b5f5460015f8282546105b7919061075e565b9091555060019392505050565b6040516370a0823160e01b81523060048201525f907f0000000000000000000000003f0c2870931e343773bec0ea56243de0dd470c286001600160a01b0316906370a0823190602401602060405180830381865afa158015610628573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061064c91906106d6565b905090565b5f60208284031215610661575f5ffd5b5035919050565b5f60208284031215610678575f5ffd5b81356001600160a01b038116811461068e575f5ffd5b9392505050565b60208082526021908201527f596f7520617265206e6f7420617574686f72697a656420746f2070726f6365656040820152601960fa1b606082015260800190565b5f602082840312156106e6575f5ffd5b5051919050565b5f602082840312156106fd575f5ffd5b8151801515811461068e575f5ffd5b60208082526032908201527f416e20756e6578706563746564206572726f7220686173206f6363757272656460408201527117102a393c9030b3b0b4b7103630ba32b91760711b606082015260800190565b8082018082111561077d57634e487b7160e01b5f52601160045260245ffd5b9291505056fea26469706673582212205ee6902e55fb57e8fbacc202e6d0134ae8078efedf8ba8c66c7316a2550445ee64736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003f0c2870931e343773bec0ea56243de0dd470c28
-----Decoded View---------------
Arg [0] : token_ (address): 0x3F0C2870931e343773BEc0EA56243DE0DD470C28
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003f0c2870931e343773bec0ea56243de0dd470c28
Deployed Bytecode Sourcemap
25436:1743:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25994:97;;;;;;:::i;:::-;;:::i;:::-;;26099:284;;;:::i;26660:92::-;26711:7;26738:6;26660:92;;;345:25:1;;;333:2;318:18;26660:92:0;;;;;;;;26426;26504:6;26426:92;;26800:376;;;;;;:::i;:::-;;:::i;:::-;;;837:14:1;;830:22;812:41;;800:2;785:18;26800:376:0;672:187:1;26530:118:0;;;:::i;25994:97::-;25879:10;-1:-1:-1;;;;;25893:5:0;25879:19;;25871:65;;;;-1:-1:-1;;;25871:65:0;;;;;;;:::i;:::-;;;;;;;;;26067:6:::1;:16:::0;25994:97::o;26099:284::-;25879:10;-1:-1:-1;;;;;25893:5:0;25879:19;;25871:65;;;;-1:-1:-1;;;25871:65:0;;;;;;;:::i;:::-;26157:30:::1;::::0;-1:-1:-1;;;26157:30:0;;26181:4:::1;26157:30;::::0;::::1;1412:51:1::0;26190:1:0::1;::::0;26157:5:::1;-1:-1:-1::0;;;;;26157:15:0::1;::::0;::::1;::::0;1385:18:1;;26157:30:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:34;26149:97;;;::::0;-1:-1:-1;;;26149:97:0;;1865:2:1;26149:97:0::1;::::0;::::1;1847:21:1::0;1904:2;1884:18;;;1877:30;1943:34;1923:18;;;1916:62;-1:-1:-1;;;1994:18:1;;;1987:48;2052:19;;26149:97:0::1;1663:414:1::0;26149:97:0::1;26289:30;::::0;-1:-1:-1;;;26289:30:0;;26313:4:::1;26289:30;::::0;::::1;1412:51:1::0;26267:5:0::1;-1:-1:-1::0;;;;;26267:14:0::1;::::0;::::1;::::0;26282:5:::1;::::0;26267:14;;26289:15:::1;::::0;1385:18:1;;26289:30:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26267:53;::::0;-1:-1:-1;;;;;;26267:53:0::1;::::0;;;;;;-1:-1:-1;;;;;2274:32:1;;;26267:53:0::1;::::0;::::1;2256:51:1::0;2323:18;;;2316:34;2229:18;;26267:53:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26259:116;;;;-1:-1:-1::0;;;26259:116:0::1;;;;;;;:::i;:::-;26099:284::o:0;26800:376::-;26871:4;25879:10;-1:-1:-1;;;;;25893:5:0;25879:19;;25871:65;;;;-1:-1:-1;;;25871:65:0;;;;;;;:::i;:::-;26932:6:::1;::::0;26898:30:::1;::::0;-1:-1:-1;;;26898:30:0;;26922:4:::1;26898:30;::::0;::::1;1412:51:1::0;26898:5:0::1;-1:-1:-1::0;;;;;26898:15:0::1;::::0;::::1;::::0;1385:18:1;;26898:30:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40;;26890:112;;;::::0;-1:-1:-1;;;26890:112:0;;3264:2:1;26890:112:0::1;::::0;::::1;3246:21:1::0;3303:2;3283:18;;;3276:30;3342:34;3322:18;;;3315:62;3413:29;3393:18;;;3386:57;3460:19;;26890:112:0::1;3062:423:1::0;26890:112:0::1;27048:6;::::0;27023:32:::1;::::0;-1:-1:-1;;;27023:32:0;;-1:-1:-1;;;;;2274:32:1;;;27023::0::1;::::0;::::1;2256:51:1::0;2323:18;;;2316:34;;;;27023:5:0::1;:14:::0;;::::1;::::0;::::1;::::0;2229:18:1;;27023:32:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;27015:95;;;;-1:-1:-1::0;;;27015:95:0::1;;;;;;;:::i;:::-;27138:6;;27123:11;;:21;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;27164:4:0::1;::::0;26800:376;-1:-1:-1;;;26800:376:0:o;26530:118::-;26610:30;;-1:-1:-1;;;26610:30:0;;26634:4;26610:30;;;1412:51:1;26583:7:0;;26610:5;-1:-1:-1;;;;;26610:15:0;;;;1385:18:1;;26610:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26603:37;;26530:118;:::o;14:180:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:1;;14:180;-1:-1:-1;14:180:1:o;381:286::-;440:6;493:2;481:9;472:7;468:23;464:32;461:52;;;509:1;506;499:12;461:52;535:23;;-1:-1:-1;;;;;587:31:1;;577:42;;567:70;;633:1;630;623:12;567:70;656:5;381:286;-1:-1:-1;;;381:286:1:o;864:397::-;1066:2;1048:21;;;1105:2;1085:18;;;1078:30;1144:34;1139:2;1124:18;;1117:62;-1:-1:-1;;;1210:2:1;1195:18;;1188:31;1251:3;1236:19;;864:397::o;1474:184::-;1544:6;1597:2;1585:9;1576:7;1572:23;1568:32;1565:52;;;1613:1;1610;1603:12;1565:52;-1:-1:-1;1636:16:1;;1474:184;-1:-1:-1;1474:184:1:o;2361:277::-;2428:6;2481:2;2469:9;2460:7;2456:23;2452:32;2449:52;;;2497:1;2494;2487:12;2449:52;2529:9;2523:16;2582:5;2575:13;2568:21;2561:5;2558:32;2548:60;;2604:1;2601;2594:12;2643:414;2845:2;2827:21;;;2884:2;2864:18;;;2857:30;2923:34;2918:2;2903:18;;2896:62;-1:-1:-1;;;2989:2:1;2974:18;;2967:48;3047:3;3032:19;;2643:414::o;3490:222::-;3555:9;;;3576:10;;;3573:133;;;3628:10;3623:3;3619:20;3616:1;3609:31;3663:4;3660:1;3653:15;3691:4;3688:1;3681:15;3573:133;3490:222;;;;:::o
Swarm Source
ipfs://5ee6902e55fb57e8fbacc202e6d0134ae8078efedf8ba8c66c7316a2550445ee
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.