Litho
  • Lithosphere
  • Abstract
  • Design Concept
  • Design Objectives
  • Smart Contracts & Decentralized Finance (DeFi)
  • Positioning
  • Lithosphere Architecture and Technology
  • Myriad Distributed Key Management (MDKM)
  • Threshold signature
  • Litho Coin
  • LAX – Algorithmic Stablecoin
  • Consensus Mechanism
  • Cross-Chain Integration
  • Cross-Chain Transactions
  • Deep Neural Networks (DNN)
  • LEP100 Multi-chain Token Standard
  • Validators
  • Linear-communication BFT Consensus
  • Myriad Distributed Key Management
  • LEP100 Token Standard
  • Why should your DeFi project use the LEP100 Token Standard?
  • LEP100 Token Features
  • Verification Nodes
  • Locked Account Generation Scheme
    • Introduction
    • General Nodes
    • Design Description
    • Scheme Generation
    • Advantages
      • Easy Integration and Efficient Data Storage
      • Smart Contract Token Transaction Anonymity
      • Fully Decentralized without Third-Party Participation
      • Secure and stable
      • One-Time Account System
      • Ring Signature Scheme
      • Cryptography Based Security Guarantee
      • Smart Contracts
        • Contract multi-triggering mechanism Diversity of triggering conditions
        • Enhancements and compatibility
        • Contract enclosed call
        • Contract development
        • Timing and trigger conditions
        • Rapid development and interface
        • To use multiple triggers to realize complex financial functions
  • Community operation plan
  • Project promotion method
  • A movement to Promote Blockchain Technology
  • The Standardization of Blockchain Interfaces Movement
  • Lithosphere Applications
  • Current Lithosphere Features
    • Lithosphere Products
    • Lithosphere Project Governance
    • Funding for the project
  • Roadmap
  • Conclusion
  • Disclaimer
  • Glossary
Powered by GitBook
On this page
  1. Locked Account Generation Scheme
  2. Advantages
  3. Smart Contracts

Contract enclosed call

The above improvements to current smart contracts will eventually allow smart contracts on Lithosphere to define relationships and interaction rules based on various conditions, among various values and participants, in time and space, allowing smart contracts on Lithosphere to build DeFi applications.

On Lithosphere, a smart contract may not only change account status and data, but it can also call another smart contract during execution if certain criteria are satisfied.

The following activities must be completed to implement Smart Contract A’s call to Smart Contract B:

(1)Create an enclosed call smart contract.

A preset condition judgment and a preset condition rule for invoking the smart contract B are added to the code of smart contract A, and the parameter of the target smart contract address index is generated. The data input when smart contract A is triggered, as well as the outcome of the data computation, provides the foundation for the condition judgment. If the predefined criteria are met, the node will download and execute smart contract B.

The call condition is divided into two parts: rules and time. Rules are pre-programmed computation routines in a smart contract. Time conditions can be a pre-defined condition in a smart contract that is triggered when the smart contract is executed or a condition that checks the state of a smart contract regularly.

(2)The procedure for making an enclosed call.

i.When the smart contract A is activated, it will determine whether or not it is required to execute the smart contract B based on the preset calling circumstances.

ii.When the calling circumstances are satisfied, the preset calculation function is called, and the result is used as the smart contract B’s input.

iii.The node that performed the smart contract A downloads the smart contract B to the local computing environment, inputs the data determined in the preceding step as the smart contract B’s input data and starts executing the smart contract B.

The procedures outlined above can be used to execute smart contract A’s call to contract B. We call the logic link between them an enclosed call of a smart contract because smart contract B is based on the state of smart contract A as the trigger and input data.

Smart contracts not only make decisions based on their business logic, but they may also invoke other smart contracts based on predefined criteria. It is therefore simple to create network-like call interactions between distinct smart contracts, establishing the value interaction across connected financial apps and thus allowing the creation of complicated applications. As a consequence, sophisticated financial services, such as a loan application based on future cash flow, maybe developed using enclosed smart contract calls. The Lithosphere platform can achieve complicated financial activities thanks to these features and the multi-trigger mechanism, which will be explained in the section on multi-trigger mechanisms.

PreviousEnhancements and compatibilityNextContract development

Last updated 3 years ago