Guidelines
- Introduction
- Installation
- Quick Start
Guides
- Introductions
- Build local test node
- Smart Contract - ABI Files
- Smart Contract——JS Contract
- Deploy Contracts
- Test Contract
- Develop DApp Client
Smart Contracts
- Contract Introduction
- ABI File
- Database
- Account Authority
-
Call In-contract
- Notification
System Contracts
- Resources
- Account
- Permission
Token Contracts
- Transfer
- Token
- Token Exchange
- Contract Sub-Wallet
Node Guide
- Node Introduction
- Add to nodes network
- Node Data Persistence
Access Guide
- FO 接入安全指南
Call In-contract
Usually we use the client to invoke the contract under the chain to implement our operation. If we want to invoke other contract’s methods in the contract, we need to use the trans module to implement the internal invocation.
For example, user fibostest123 defines the following contract functions.
1 | exports.hi = name => { |
Then the user fibostest456 can call the hi function of the fibostest123 contract in the following way.
1 | exports.hello = user => { |
There is no need to verify permissions in the hi function of the user fibostest123contract, so we can use the send_context_free_inline function to exempt authorized invocation of contract methods.
1 | exports.hello = user => { |
The most common scenario for internal invocation is to invoke a Token contract for transfer operations within a contract.
1 | exports.helloworld = (from, to, quantity, memo) => { |
Like so we can transfer fund by calling the helloworld function.
