文件 1 的 20:AccountLocker.sol
pragma solidity 0.8.1;
import "./TaskExecutor.sol";
abstract contract AccountLocker is TaskExecutor {
mapping (address => uint256) private _lockedAccounts;
event LockTsChanged(address account, uint256 lockTimestamp);
function updateLockTs(
uint256 taskId,
address[] memory accounts,
uint256[] memory lockTss
) external
tryExecuteTaskAfterwards(taskId)
{
require(accounts.length == lockTss.length, "AccountLocker: inputs have incorrect lengths");
require(accounts.length > 0, "AccountLocker: empty inputs");
for (uint256 i = 0; i < accounts.length; i++) {
_updateLockTs(accounts[i], lockTss[i]);
}
}
function _getLockTs(address account) internal view returns (uint256) {
return _lockedAccounts[account];
}
function _updateLockTs(address account, uint256 lockTs) internal {
uint256 oldLockTs = _lockedAccounts[account];
_lockedAccounts[account] = lockTs;
if (oldLockTs != lockTs) {
emit LockTsChanged(account, lockTs);
}
}
function _isLocked(address account) internal view returns (bool) {
uint256 lockTs = _getLockTs(account);
return lockTs > 0 && block.timestamp <= lockTs;
}
}
文件 2 的 20:BatchTransferEnabled.sol
pragma solidity 0.8.1;
import "./AccountLocker.sol";
abstract contract BatchTransferEnabled is AccountLocker {
function doBatchTransferWithLock(
uint256 taskId,
address[] memory tos,
uint256[] memory amounts,
uint256[] memory lockTss
) external
tryExecuteTaskAfterwards(taskId)
{
_doBatchTransferWithLock(tos, amounts, lockTss);
}
function _batchTransferSingle(address source, address to, uint256 amount) internal virtual;
function _doBatchTransferWithLock(
address[] memory tos,
uint256[] memory amounts,
uint256[] memory lockTss
) private {
require(_getTaskManager() != address(0), "BatchTransferEnabled: batch transfer source is not set");
require(tos.length == amounts.length, "BatchTransferEnabled: inputs have incorrect lengths");
require(tos.length == lockTss.length, "BatchTransferEnabled: inputs have incorrect lengths");
require(tos.length > 0, "BatchTransferEnabled: empty inputs");
for (uint256 i = 0; i < tos.length; i++) {
require(tos[i] != address(0), "BatchTransferEnabled: target with zero address");
require(tos[i] != _getTaskManager(), "BatchTransferEnabled: invalid target");
if (amounts[i] > 0) {
_batchTransferSingle(_getTaskManager(), tos[i], amounts[i]);
}
if (lockTss[i] > 0) {
_updateLockTs(tos[i], lockTss[i]);
}
}
}
}
文件 3 的 20:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 4 的 20:ERC1155Vault.sol
pragma solidity 0.8.1;
import "@openzeppelin/contracts/interfaces/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
abstract contract ERC1155Vault is IERC1155Receiver {
event ERC1155Transferred(address tokenContract, address to, uint256 tokenId, uint256 amount);
event ERC1155ApprovedForAll(address tokenContract, address operator, bool approved);
function supportsInterface(bytes4 interfaceId) external view virtual override returns (bool) {
return interfaceId == type(IERC1155Receiver).interfaceId;
}
function onERC1155Received(
address ,
address ,
uint256 ,
uint256 ,
bytes calldata
) external pure override returns (bytes4) {
return bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
}
function onERC1155BatchReceived(
address ,
address ,
uint256[] calldata ,
uint256[] calldata ,
bytes calldata
) external pure override returns (bytes4) {
return bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"));
}
function _ERC1155Transfer(
address tokenContract,
address to,
uint256 tokenId,
uint256 amount
) internal {
require(tokenContract != address(0), "ERC1155Vault: zero token address");
require(to != address(0), "ERC1155Vault: cannot transfer to zero");
IERC1155(tokenContract).safeTransferFrom(address(this), to, tokenId, amount, "");
emit ERC1155Transferred(tokenContract, to, tokenId, amount);
}
function _ERC1155SetApprovalForAll(
address tokenContract,
address operator,
bool approved
) internal {
require(tokenContract != address(0), "ERC1155Vault: zero token address");
require(operator != address(0), "ERC1155Vault: zero address for operator");
IERC1155(tokenContract).setApprovalForAll(operator, approved);
emit ERC1155ApprovedForAll(tokenContract, operator, approved);
}
}
文件 5 的 20:ERC20.sol
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function decimals() public view virtual override returns (uint8) {
return 18;
}
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, _allowances[owner][spender] + addedValue);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = _allowances[owner][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
_balances[to] += amount;
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
文件 6 的 20:ERC20Vault.sol
pragma solidity 0.8.1;
import "@openzeppelin/contracts/interfaces/IERC20.sol";
abstract contract ERC20Vault {
event ERC20Transferred(address tokenContract, address to, uint256 amount);
event ERC20Approved(address tokenContract, address spender, uint256 amount);
function _ERC20Transfer(
address tokenContract,
address to,
uint256 amount
) internal {
require(tokenContract != address(0), "ERC20Vault: zero token address");
require(to != address(0), "ERC20Vault: cannot transfer to zero");
require(amount > 0, "ERC20Vault: amount is zero");
require(amount <= IERC20(tokenContract).balanceOf(address(this)),
"ERC20Vault: transfer more than balance");
IERC20(tokenContract).transfer(to, amount);
emit ERC20Transferred(tokenContract, to, amount);
}
function _ERC20Approve(
address tokenContract,
address spender,
uint256 amount
) internal {
require(tokenContract != address(0), "ERC20Vault: zero token address");
require(spender != address(0), "ERC20Vault: zero address for spender");
IERC20(tokenContract).approve(spender, amount);
emit ERC20Approved(tokenContract, spender, amount);
}
}
文件 7 的 20:ERC721Vault.sol
pragma solidity 0.8.1;
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
abstract contract ERC721Vault is IERC721Receiver {
event ERC721Transferred(address tokenContract, address to, uint256 tokenId);
event ERC721Approved(address tokenContract, address to, uint256 tokenId);
event ERC721ApprovedForAll(address tokenContract, address operator, bool approved);
function onERC721Received(
address ,
address ,
uint256 ,
bytes calldata
) external pure override returns (bytes4) {
return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));
}
function _ERC721Transfer(
address tokenContract,
address to,
uint256 tokenId
) internal {
require(tokenContract != address(0), "ERC721Vault: zero token address");
require(to != address(0), "ERC721Vault: cannot transfer to zero");
IERC721(tokenContract).safeTransferFrom(address(this), to, tokenId, "");
emit ERC721Transferred(tokenContract, to, tokenId);
}
function _ERC721Approve(
address tokenContract,
address operator,
uint256 tokenId
) internal {
require(tokenContract != address(0), "ERC721Vault: zero token address");
IERC721(tokenContract).approve(operator, tokenId);
emit ERC721Approved(tokenContract, operator, tokenId);
}
function _ERC721SetApprovalForAll(
address tokenContract,
address operator,
bool approved
) internal {
require(tokenContract != address(0), "ERC721Vault: zero token address");
require(operator != address(0), "ERC721Vault: zero address for operator");
IERC721(tokenContract).setApprovalForAll(operator, approved);
emit ERC721ApprovedForAll(tokenContract, operator, approved);
}
}
文件 8 的 20:IERC1155.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC1155 is IERC165 {
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
event URI(string value, uint256 indexed id);
function balanceOf(address account, uint256 id) external view returns (uint256);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external;
function isApprovedForAll(address account, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
}
文件 9 的 20:IERC1155Receiver.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC1155Receiver is IERC165 {
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external returns (bytes4);
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external returns (bytes4);
}
文件 10 的 20:IERC165.sol
pragma solidity ^0.8.0;
import "../utils/introspection/IERC165.sol";
文件 11 的 20:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
文件 12 的 20:IERC20Metadata.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
文件 13 的 20:IERC721.sol
pragma solidity ^0.8.0;
import "../token/ERC721/IERC721.sol";
文件 14 的 20:IERC721Receiver.sol
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
文件 15 的 20:ITaskExecutor.sol
pragma solidity 0.8.1;
interface ITaskExecutor {
event TaskExecuted(address finalizer, address executor, uint256 taskId);
function executeTask(address executor, uint256 taskId) external;
function executeAdminTask(address executor, uint256 taskId) external;
}
文件 16 的 20:QLINDO.sol
pragma solidity 0.8.1;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "./arteq-tech/contracts/abstract/task-managed/AccountLocker.sol";
import "./arteq-tech/contracts/abstract/task-managed/BatchTransferEnabled.sol";
import "./arteq-tech/contracts/abstract/task-managed/TaskManagedERC20VaultEnabled.sol";
import "./arteq-tech/contracts/abstract/task-managed/TaskManagedERC721VaultEnabled.sol";
import "./arteq-tech/contracts/abstract/task-managed/TaskManagedERC1155VaultEnabled.sol";
contract QLINDO is
ERC20,
AccountLocker,
BatchTransferEnabled,
TaskManagedERC20VaultEnabled,
TaskManagedERC721VaultEnabled,
TaskManagedERC1155VaultEnabled
{
constructor(address taskManager)
ERC20("Qlindo Realestate Investment Token", "QLINDO")
{
require(taskManager != address(0), "QLINDO: zero address set for task manager");
_setTaskManager(taskManager);
_mint(_getTaskManager(), 10 * 10 ** 9);
}
function decimals() public view virtual override returns (uint8) {
return 0;
}
function _beforeTokenTransfer(
address from,
address ,
uint256
) internal virtual override {
require(!_isLocked(from), "QLINDO: account cannot transfer tokens");
}
function _batchTransferSingle(
address source,
address to,
uint256 amount
) internal virtual override {
_transfer(source, to, amount);
}
receive() external payable {
revert("QLINDO: cannot accept ether");
}
fallback() external payable {
revert("QLINDO: cannot accept ether");
}
}
文件 17 的 20:TaskExecutor.sol
pragma solidity 0.8.1;
import "@openzeppelin/contracts/interfaces/IERC165.sol";
import "../../interfaces/ITaskExecutor.sol";
abstract contract TaskExecutor {
address private _taskManager;
event TaskManagerChanged(address newTaskManager);
modifier tryExecuteTaskAfterwards(uint256 taskId) {
require(_taskManager != address(0), "TaskExecutor: task manager is not set");
_;
ITaskExecutor(_taskManager).executeTask(msg.sender, taskId);
}
function getTaskManager() external view returns (address) {
return _getTaskManager();
}
function setTaskManager(
uint256 adminTaskId,
address newTaskManager
) external {
address oldTaskManager = _taskManager;
_setTaskManager(newTaskManager);
if (oldTaskManager != address(0)) {
ITaskExecutor(oldTaskManager).executeAdminTask(msg.sender, adminTaskId);
}
}
function _getTaskManager() internal view returns (address) {
return _taskManager;
}
function _setTaskManager(address newTaskManager) internal {
require(newTaskManager != address(0), "TaskExecutor: zero address cannot be set");
require(IERC165(newTaskManager).supportsInterface(type(ITaskExecutor).interfaceId),
"TaskExecutor: invalid contract");
_taskManager = newTaskManager;
emit TaskManagerChanged(_taskManager);
}
}
文件 18 的 20:TaskManagedERC1155VaultEnabled.sol
pragma solidity 0.8.1;
import "../ERC1155Vault.sol";
import "./TaskExecutor.sol";
abstract contract TaskManagedERC1155VaultEnabled is TaskExecutor, ERC1155Vault {
function ERC1155Transfer(
uint256 taskId,
address tokenContract,
address to,
uint256 tokenId,
uint256 amount
) external
tryExecuteTaskAfterwards(taskId)
{
_ERC1155Transfer(tokenContract, to, tokenId, amount);
}
function ERC1155SetApprovalForAll(
uint256 taskId,
address tokenContract,
address operator,
bool approved
) external
tryExecuteTaskAfterwards(taskId)
{
_ERC1155SetApprovalForAll(tokenContract, operator, approved);
}
}
文件 19 的 20:TaskManagedERC20VaultEnabled.sol
pragma solidity 0.8.1;
import "../ERC20Vault.sol";
import "./TaskExecutor.sol";
abstract contract TaskManagedERC20VaultEnabled is TaskExecutor, ERC20Vault {
function ERC20Transfer(
uint256 taskId,
address tokenContract,
address to,
uint256 amount
) external
tryExecuteTaskAfterwards(taskId)
{
_ERC20Transfer(tokenContract, to, amount);
}
function ERC20Approve(
uint256 taskId,
address tokenContract,
address spender,
uint256 amount
) external
tryExecuteTaskAfterwards(taskId)
{
_ERC20Approve(tokenContract, spender, amount);
}
}
文件 20 的 20:TaskManagedERC721VaultEnabled.sol
pragma solidity 0.8.1;
import "../ERC721Vault.sol";
import "./TaskExecutor.sol";
abstract contract TaskManagedERC721VaultEnabled is TaskExecutor, ERC721Vault {
function ERC721Transfer(
uint256 taskId,
address tokenContract,
address to,
uint256 tokenId
) external
tryExecuteTaskAfterwards(taskId)
{
_ERC721Transfer(tokenContract, to, tokenId);
}
function ERC721Approve(
uint256 taskId,
address tokenContract,
address operator,
uint256 tokenId
) external
tryExecuteTaskAfterwards(taskId)
{
_ERC721Approve(tokenContract, operator, tokenId);
}
function ERC721SetApprovalForAll(
uint256 taskId,
address tokenContract,
address operator,
bool approved
) external
tryExecuteTaskAfterwards(taskId)
{
_ERC721SetApprovalForAll(tokenContract, operator, approved);
}
}
{
"compilationTarget": {
"contracts/QLINDO.sol": "QLINDO"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 2000
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"taskManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ERC1155ApprovedForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC1155Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721Approved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ERC721ApprovedForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"lockTimestamp","type":"uint256"}],"name":"LockTsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTaskManager","type":"address"}],"name":"TaskManagerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"uint256","name":"taskId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"ERC1155SetApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"taskId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC1155Transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"taskId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"taskId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"taskId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721Approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"taskId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"ERC721SetApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"taskId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721Transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"taskId","type":"uint256"},{"internalType":"address[]","name":"tos","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"lockTss","type":"uint256[]"}],"name":"doBatchTransferWithLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTaskManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"adminTaskId","type":"uint256"},{"internalType":"address","name":"newTaskManager","type":"address"}],"name":"setTaskManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"taskId","type":"uint256"},{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"lockTss","type":"uint256[]"}],"name":"updateLockTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]