
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
artkdev-locking
Advanced tools
[](https://app.travis-ci.com/artkdev2020/ArtKDev-Locking) [](h
Mainnet contract: link
Testnet contract: link
The main idea of the ArtKDev-Locking contract is to keep ERC-20 tokens foolproofly.
npm install
truffle run coverage
truffle dashboard
truffle migrate --network dashboard
ATTENTION! The default whitelist address is zero
If you want to set a new whitelist address, you should use a SetWhiteListAddress() function.
function SetWhiteListAddress(address _newAddress) external;
Testnet tx: link
ATTENTION! Locked-pools can uses three manual whitelists. One of them is a whitelist for tokens that are exempt from paying fees.
If you want to set a new token fee whitelist id, you should use a SetTokenFeeWhiteListId() function.
function SetTokenFeeWhiteListId(uint256 _newId) external;
Testnet tx: link
ATTENTION! If someone is trying to lock tokens that damage the contract, we can create a whitelist of tokens that can only be used to create a locked pool.
If you want to set a new token filter whitelist id, you should use a SetTokenFilterWhiteListId() function.
function SetTokenFilterWhiteListId(uint256 _newId) external
Testnet tx: link
ATTENTION! Setting a whitelist ID for users who are exempt from paying fees.
If you want to set a new user whitelist id, you should use a SetUserWhiteListId() function.
function SetUserWhiteListId(uint256 _newId) external;
Testnet tx: link
ATTENTION! There is a restriction on the implementation of mass locked pools.
If you want to set a new max transation pools' limit, you should use a SetMaxTransactionPoolsLimit() function.
function SetMaxTransactionPoolsLimit(uint256 _newLimit) external;
Testnet tx: link
ATTENTION! The token filter is disabled by default settings.
If you want to swap a token filter condition, you should use a SwapTokenFilter() function.
function SwapTokenFilter() external
Testnet tx: link
ATTENTION! After using PoolTransfer, a new locked-pool of tokens is created based on the previous one, but with a new owner.
If you want to transfer a pool ownership, you should use a TransferPool() function.
function TransferPool(address _newOwner, uint256 _poolId) external;
Testnet tx: link
ATTENTION! When you splitting a pool, it creates a new pool with splitted amount, in the original pool, the amount is reduced by the amount of the new pool.
If you want to split a pool, you should use a SplitPoolAmount() function.
function SplitPoolAmount(
address _newOwner,
uint256 _poolId,
uint256 _newAmount
) external returns(uint256);
Testnet tx: link
ATTENTION! Using the ApproveAllowance function, we can allocate an amount for non-owner addresses to split the pool.
If you want to approve an allowance, you should use a ApproveAllowance() function.
function ApproveAllowance(
address _user,
uint256 _poolId,
uint256 _amount
) external;
Testnet tx: link
ATTENTION! The number of locked tokens must be approved by the contract of the token before use.
CreateNewPool() function allows us to create a new pool for locking tokens. If it is needed you have to pay some fee for creation.
function CreateNewPool(
address _owner, // owner of tokens
address _token, // locking token address
uint256 _startTime, // time when pool will be started
uint256 _finishTime, // time until pool will have been worked
uint256 _amount // amount of tokens to sell in the pool
) external payable returns(uint256);
Testnet tx: link
ATTENTION! The number of locked tokens must be approved by the contract of the token before usage.
CreatePoolsAmount() function allows us to create an array of the pools for locking tokens.
function CreatePoolsAmount(
address _token,
address[] calldata _owner,
uint256[] calldata _startTime,
uint256[] calldata _finishTime,
uint256[] calldata _amount
) external payable;
Testnet tx: link
ATTENTION! The number of locked tokens must be approved by the contract of the token before usage.
CreatePoolsAmountTimes() function allows us to create an array of the pools for locking tokens.
function CreatePoolsAmountTimes(
address _token,
address[] calldata _owner,
uint256[] calldata _startTime,
uint256[] calldata _finishTime,
uint256[] calldata _amount
) external payable;
Testnet tx: link
ATTENTION! You can find the pool IDs by specifying the token addresses.
function GetMyPoolsIdsByToken(address _owner, address[] memory _tokens)
external
view
returns (uint256[] memory);
ATTENTION! Each element of the Pool array will return:
uint256 StartTime, uint256 FinishTime, uint256 StartAmount, uint256 DebitedAmount, address Owner, address Token
If you want to get a pool data, you should you a GetPoolsData() function.
function GetPoolsData(uint256[] memory _ids)
external
view
returns (Pool[] memory)
ATTENTION! If _token returns true, we don't need to pay a fee to create the pool.
If you want to check whether is a token without a fee, you should you a isTokenWithoutFee() function.
function isTokenWithoutFee(address _token) public view returns(bool);
ATTENTION! If false is returned, the token cannot be used in a locked pool.
If you want to check whether is a token in a whitelist, you should you a IsTokenWhiteListed() function.
function IsTokenWhiteListed(address _token) public view returns(bool);
ATTENTION! Returns true if _user have an allocation in a whitelist.
If you want to check does whether a user have to pay a commission, you should you a IsUserWithoutFee() function.
function IsUserWithoutFee(address _user) public view returns(bool);
ATTENTION! There is a way how to get a pool data.
function PoolsMap(uint256 _id)
public
view
returns (
address, // owner
address // token
uint256, // startTime
uint256, // finishTime
uint256, // amount
uint256 // debitedAmount
);
ATTENTION! The function returns an array of all your pools' IDs.
function GetAllMyPoolsIds(address _owner) external view returns (uint256[] memory);
ATTENTION! Returns your pools only with a balance.
function GetMyPoolsIds(address _owner) external view returns (uint256[] memory);
ATTENTION! The WithdrawTokens() function allows you to withdraw tokens if a pool is over, if there are still in the pool.
function WithdrawTokens(uint256 _poolId) external returns (bool);
Testnet tx: link
Using this function you can check how many tokens can be unlocked in a pool.
function GetWithdrawableAmount(uint256 _poolId) public view returns(uint256);
ATTENTION! When splitting a pool, the existing allowance for a user in the pool will be reduced by the specified amount.
function SplitPoolAmountFrom(
address _address,
uint256 _poolId,
uint256 _amount
) external returns(uint256);
Testnet tx: link
There is a way how to get a pool allowance.
function Allowance(uint256 _poolId, address _address) public view returns(uint256);
ArtKDev's contracts is released under the MIT License.
FAQs
[](https://app.travis-ci.com/artkdev2020/ArtKDev-Locking) [](h
We found that artkdev-locking demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.