MYKEY Docs
中文English
English
English
  • Introduction
  • Sign in with MYKEY
    • Verify signature at backend server
    • More detailed tech and process of MYKEY login
  • Integrate with MYKEY
    • Multiple ways to integration with MYKEY
    • Mobile Dapp with H5 pages
      • ETH
      • EOS
      • JS Extensions
    • Integration via MYKEY Android SDK
      • Preconditions
      • Initiate SDK
      • Authorize
      • Sign
      • Transfer
      • Call contracts
    • Integration via MYKEY iOS SDK
      • Preconditions
      • Initiate SDK
      • Authorize
      • Sign
      • Transfer
      • Call contracts
    • Web application with scanning qrcode
    • SimpleWallet Protocol Compatible
    • Deeplink Protocol
  • Dive into MYKEY
    • Dive into MYKEY account
    • Classes and methods
      • Android Classes
      • iOS Classes
    • Error Code
    • Identify MYKEY deposit transaction
      • ETH deposit
      • EOS deposit
    • MYKEY Whitepaper
  • KEY ID
    • KEYID ETH Contracts introduction
      • Account Module
      • Account Storage Module
      • Logic Management Module
      • Logic Module
    • Account recovery mechanism
    • KEYID contract upgrade process
    • KEYID contract upgrade records
      • ETH
        • KEY ID Ethereum Contracts Upgrade Pending Time Adjustment
        • KEY ID Ethereum logic contract module upgrade announcement
        • KEY ID Ethereum Contracts Upgrade Pending Time Adjustment
        • KEY ID Ethereum AccountLogic/DualsigsLogic Contracts Upgrade
        • KEY ID Ethereum DappLogic Contract Upgrade
  • Development Resources
    • Ethereum
    • EOS
  • Join Us
    • DApp submit
    • Developers Community
Powered by GitBook
On this page
  • AccountLogic.sol
  • DualsigsLogic.sol
  • TransferLogic.sol
  • DappLogic.sol

Was this helpful?

  1. KEY ID
  2. KEYID ETH Contracts introduction

Logic Module

Logic Module contains logic contracts, which implements specific operations like replacing keys, freezing account, transferring asset and calling external contract etc. In every logic contract, there is an entry method(function enter()) which validates signature. So the entry method must be called first before executing any operation. Currently, there are 4 logic contracts in Logic Module: AccountLogic, DualsigsLogic, TransferLogic and DappLogic.

AccountLogic.sol

Description: implement logic of account management function changeAdminKey(): change admin key (with delay) function triggerChangeAdminKey(): trigger changing admin key function changeAdminKeyByBackup(): change admin key (proposed by emergency contact, with delay) function triggerChangeAdminkeyByBackup(): trigger changing admin key proposed by emergency contact function addOperationKey(): add an operation key function changeAllOperationKeys(): change all operation keys (with delay) function triggerChangeAllOperationKeys(): trigger changing all operation keys function freeze(): freeze account function unfreeze(): unfreeze account (with delay) function triggerUnfreeze(): trigger unfreezing account function removeBackup(): remove an emergency contact (with delay) function cancelDelay(): cancel delayed operation function cancelAddBackup(): cancel adding emergency contact function cancelRemoveBackup(): cancel removing emergency contact function proposeAsBackup(): propose a proposal as an emergency contact function approveProposal(): approve a proposal function executeProposal(): execute a proposal

DualsigsLogic.sol

Description: implement logic of dual signatures function changeAdminKeyWithoutDelay(): change admin key immediately function changeAllOperationKeysWithoutDelay(): change all operation keys immediately function unfreezeWithoutDelay(): unfreeze account immediately function addBackup(): add an emergency contact function proposeByBoth(): user proposes a proposal together with an emergency contact function executeProposal(): execute a proposal

TransferLogic.sol

Description: implement logic of transferring asset function transferEth(): transfer ETH function transferErc20(): transfer ERC20 token function transferApprovedErc20(): transfer approved ERC20 token function transferNft(): transfer Non-fungible token function transferApprovedNft(): transfer approved Non-fungible token

DappLogic.sol

Description: implement logic of interacting with external contracts function callContract(): call external contract function callMultiContract(): call multiple external contracts atomically

PreviousLogic Management ModuleNextAccount recovery mechanism

Last updated 5 years ago

Was this helpful?