ABI variants
ABI variants
ABI variants
The new ABI generator tool uses C++11 or GNU style attributes to mark actions and tables.
Contract Development Toolkit (CDT) is a C/C++ toolchain targeting WebAssembly (WASM) and a set of tools to facilitate development of smart contracts written in C/C++ that are meant to be deployed to a Wire blockchain.
- cdt-abidiff
- ABI Variants
The cdt-abidiff tool is used to check differences between two ABI files.
To manually compile the source code, use cdt-cc and cdt-ld as if it were clang and lld. All the includes and options specific to Wire Sysio and CDT are baked in.
To manually compile the source code, use cdt-cpp and cdt-ld as if it were clang and lld. All the includes and options specific to Wire Sysio and CDT are baked in.
This tool is used to generate a skeleton smart contract and directory structure.
The cdt-ld tool is a the custom web assembly linker for Wire Sysio framework smart contracts.
CDT is a toolchain for WebAssembly (Wasm) and a set of tools to facilitate contract writing for the Wire framework. In addition to being a general-purpose WebAssembly toolchain, Wire-specific optimizations are available to support building Wire smart contracts. This new toolchain is built around Clang 7, which means that CDT has most of the current optimizations and analyses from LLVM.
Overview
Step-by-step guide to creating a company contract using Wire CDT
Overview
As of v3.0 crypto host functions were extended to include
Modifying a deployed multi-index table structure may be done by selecting one of the different strategies outlined below:
In order to be able to debug your smart contract, you will need to setup a local nodeop node. This local nodeop node can be run as separate private testnet or as an extension of a public testnet. This local node also needs to be run with the contracts-console option on, either --contracts-console via the command line or contracts-console = true via the config.ini file and/or by setting up logging on your running node and checking the output logs.
Contracts can use uint64t error codes as an alternative (and shorter) means of signaling error conditions, as opposed to string error messages. However, Wire Sysio and CDT reserve certain ranges of the uint64t value space for their own purposes. Contract developers must be aware of the following ranges and restrictions:
The diagram below serves as a comprehensive roadmap, detailing the sequential steps required to effectively utilize the documentation provided. For optimal understanding and efficiency, it’s important to follow the order of the steps, beggining with this article, contunuing with setting up your local environment and progressing through the smart development contracts section.
- Understanding ABI Files
Install Wire Sysio and Wire CDT, and start a local node.
For installation instructions, please see Wire CDT README.md .
- Advanced features of the newest version of the ABI will require manual construction of the ABI, and odd and advanced C++ patterns could capsize the generator's type deductions. So having a good knowledge of how to write an ABI should be an essential piece of knowledge of a smart contract writer.
When implementing Wire smart contracts and when storing data in a Wire blockchain, it is important to follow the established conventions for naming accounts, actions, tables, etc.
As of v1.5.0 native compilation can be performed and a new set of libraries to facilitate native testing and native "scratch pad" compilation. cdt-cc, cdt-cpp and cdt-ld now support building "smart contracts" and unit tests natively for quick tests to help facilitate faster development (note the default implementations of a lot of the Antelope intrinsics (aka host functions) are currently asserts that state they are unavailable, these are user definable.)
Basic Recommendations
You can find the implementation of sysio::binaryextension here.
When sending an action to the blockchain you get the error below
Introduction