Skip to content

A tool used to create ABI templates for x86 smart contract interactions

Notifications You must be signed in to change notification settings

qtumproject/simple-abi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qtum Simple ABI

This project is a CLI made for the purpose of generating non Solidity smart contracts via templates. Current supported languages are C with more to come.

Example:

In order to create our smart contracts we need to create a .abi file. We'll create our own called Coins.abi. Coins.abi looks like the following:

# the name of the contract class/interface
:name=Coins
# addCoins is a function with inputs for number of coins received, a from address and a to address
# the output returned is the sum of coins
numCoins:uint64 to:uniaddress from:uniaddress addCoins:fn -> sumCoins:uint64

After that we call our CLI command from the same directory as Coins.abi. We call:

simpleabi --abi Coins.abi --decode --encode

This will generate a pair of files for decoding contract interactions ('CoinsDispatcher.c', 'CoinsDispatcher.h') and a pair of files for encodinng contract ('CoinsABI.c', 'CoinsABI.h') interactions specifically designed to interact with the qtum library.

About

A tool used to create ABI templates for x86 smart contract interactions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published