crypto-ducatus-wallet-core
Version:
A multi-currency support library for address derivation, private key creation, and transaction creation
397 lines (396 loc) • 12 kB
text/typescript
export default [
{
inputs: [
{ internalType: 'contract IERC20', name: '_tokenAddress', type: 'address' },
{ internalType: 'address', name: '_feeAddress', type: 'address' },
{ internalType: 'uint128', name: '_numOfThisBlockchain', type: 'uint128' },
{ internalType: 'uint128[]', name: '_numsOfOtherBlockchains', type: 'uint128[]' },
{ internalType: 'uint256', name: '_minTokenAmount', type: 'uint256' },
{ internalType: 'uint256', name: '_maxGasPrice', type: 'uint256' }
],
stateMutability: 'nonpayable',
type: 'constructor'
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'address', name: 'account', type: 'address' }],
name: 'Paused',
type: 'event'
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' },
{ indexed: true, internalType: 'bytes32', name: 'previousAdminRole', type: 'bytes32' },
{ indexed: true, internalType: 'bytes32', name: 'newAdminRole', type: 'bytes32' }
],
name: 'RoleAdminChanged',
type: 'event'
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' },
{ indexed: true, internalType: 'address', name: 'account', type: 'address' },
{ indexed: true, internalType: 'address', name: 'sender', type: 'address' }
],
name: 'RoleGranted',
type: 'event'
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' },
{ indexed: true, internalType: 'address', name: 'account', type: 'address' },
{ indexed: true, internalType: 'address', name: 'sender', type: 'address' }
],
name: 'RoleRevoked',
type: 'event'
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'user', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'amountWithoutFee', type: 'uint256' },
{ indexed: false, internalType: 'bytes32', name: 'originalTxHash', type: 'bytes32' }
],
name: 'TransferFromOtherBlockchain',
type: 'event'
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'uint128', name: 'blockchain', type: 'uint128' },
{ indexed: false, internalType: 'address', name: 'user', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
{ indexed: false, internalType: 'string', name: 'newAddress', type: 'string' }
],
name: 'TransferToOtherBlockchain',
type: 'event'
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'address', name: 'account', type: 'address' }],
name: 'Unpaused',
type: 'event'
},
{
inputs: [],
name: 'DEFAULT_ADMIN_ROLE',
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'MANAGER_ROLE',
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'OWNER_ROLE',
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'uint128', name: 'numOfOtherBlockchain', type: 'uint128' }],
name: 'addOtherBlockchain',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [],
name: 'burnEnabled',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'burnMultiplier',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'address', name: 'newFeeAddress', type: 'address' }],
name: 'changeFeeAddress',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{ internalType: 'uint128', name: 'oldNumOfOtherBlockchain', type: 'uint128' },
{ internalType: 'uint128', name: 'newNumOfOtherBlockchain', type: 'uint128' }
],
name: 'changeOtherBlockchain',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{ inputs: [], name: 'continueExecution', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{
inputs: [{ internalType: 'uint128', name: '', type: 'uint128' }],
name: 'existingOtherBlockchain',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'feeAddress',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'uint128', name: '', type: 'uint128' }],
name: 'feeAmountOfBlockchain',
outputs: [{ internalType: 'uint128', name: '', type: 'uint128' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'uint128', name: 'blockchain', type: 'uint128' }],
name: 'getOtherBlockchainAvailableByNum',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'bytes32', name: 'role', type: 'bytes32' }],
name: 'getRoleAdmin',
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{ internalType: 'bytes32', name: 'role', type: 'bytes32' },
{ internalType: 'uint256', name: 'index', type: 'uint256' }
],
name: 'getRoleMember',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'bytes32', name: 'role', type: 'bytes32' }],
name: 'getRoleMemberCount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{ internalType: 'bytes32', name: 'role', type: 'bytes32' },
{ internalType: 'address', name: 'account', type: 'address' }
],
name: 'grantRole',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{ internalType: 'bytes32', name: 'role', type: 'bytes32' },
{ internalType: 'address', name: 'account', type: 'address' }
],
name: 'hasRole',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'isManager',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'isOwner',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'bytes32', name: 'originalTxHash', type: 'bytes32' }],
name: 'isProcessedTransaction',
outputs: [{ internalType: 'bool', name: 'processed', type: 'bool' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'maxGasPrice',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'minTokenAmount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [],
name: 'numOfThisBlockchain',
outputs: [{ internalType: 'uint128', name: '', type: 'uint128' }],
stateMutability: 'view',
type: 'function'
},
{ inputs: [], name: 'pauseExecution', outputs: [], stateMutability: 'nonpayable', type: 'function' },
{
inputs: [],
name: 'paused',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
name: 'processedTransactions',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [{ internalType: 'uint128', name: 'numOfOtherBlockchain', type: 'uint128' }],
name: 'removeOtherBlockchain',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{ internalType: 'bytes32', name: 'role', type: 'bytes32' },
{ internalType: 'address', name: 'account', type: 'address' }
],
name: 'renounceRole',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{ internalType: 'bytes32', name: 'role', type: 'bytes32' },
{ internalType: 'address', name: 'account', type: 'address' }
],
name: 'revokeRole',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [{ internalType: 'bool', name: '_burnEnabled', type: 'bool' }],
name: 'setBurnEnabled',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [{ internalType: 'uint256', name: '_burnMultiplier', type: 'uint256' }],
name: 'setBurnMultiplier',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{ internalType: 'uint128', name: 'blockchainNum', type: 'uint128' },
{ internalType: 'uint128', name: 'feeAmount', type: 'uint128' }
],
name: 'setFeeAmountOfBlockchain',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [{ internalType: 'uint256', name: '_maxGasPrice', type: 'uint256' }],
name: 'setMaxGasPrice',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [{ internalType: 'uint256', name: '_minTokenAmount', type: 'uint256' }],
name: 'setMinTokenAmount',
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: 'tokenAddress',
outputs: [{ internalType: 'contract IERC20', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function'
},
{
inputs: [
{ internalType: 'address', name: 'newOwner', type: 'address' },
{ internalType: 'address', name: 'newManager', type: 'address' }
],
name: 'transferOwnerAndSetManager',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{
internalType: 'uint128',
name: 'blockchain',
type: 'uint128'
},
{
internalType: 'string',
name: 'newAddress',
type: 'string'
}
],
name: 'transferToOtherBlockchain',
outputs: [],
stateMutability: 'payable',
type: 'function',
payable: true
},
{
inputs: [
{ internalType: 'address', name: 'user', type: 'address' },
{ internalType: 'uint256', name: 'amountWithFee', type: 'uint256' },
{ internalType: 'bytes32', name: 'originalTxHash', type: 'bytes32' }
],
name: 'transferToUserWithFee',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
},
{
inputs: [
{ internalType: 'address', name: 'user', type: 'address' },
{ internalType: 'uint256', name: 'amount', type: 'uint256' }
],
name: 'transferToUserWithoutFee',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
}
];