Smart Contract

learn more

Frequently Asking Questions

What is a smart contract?
At the level of crypto-currencies, a smart contract is a computer program that is stored on a blockchain and specifies contractual terms, along with possessing the means to enforce those terms.
Can Ethereum/Tron smart contracts run on Counterparty?
Yes. Counterparty supports the same smart contract functionality that Ethereum/Tron does. There are a few minor tweaks (e.g. hardcoded addresses needing to change) but any Solidity or Serpent smart contract from Ethereum/Tron should be able to work on Counterparty with very little or no modification.
What languages can I use to write a smart contract?
We support both Solidity and Serpent.
How does it work at a high level?
You write the smart contract code (using Solidity or Serpent) and compile it to a more compact form (bytecode)
Counterparty will create and broadcast a publish transaction to embed this contract code into the Bitcoin blockchain. This is done in a way that is spendable and doesn’t “pollute” the blockchain
Once published, the smart contract “lives” at an address, which looks like a regular Bitcoin address, but starts with a C
You can then use Counterparty to create and broadcast an execute transaction to call a specific function or method in the smart contract code
Once an execution transaction is broadcast and confirmed by a Bitcoin miner, every running Counterparty node will receive this request, and execute that method. As the smart contract code executes, it modifies the contract state, which is stored in the Counterparty database. Since each Counterparty node has the same contract code (guaranteed by Bitcoin) as well as the same EVM code, and the code is all deterministic, these state changes are the same for every node
Others can also send Counterparty assets to the smart contract, which will store them and can use them in future execute calls. This is useful for things like funding contracts, for instance
Essentially, we see that the publishing of smart contracts and the command to kick off the execution of a specific function or method in a contract are made as actual transactions on the Bitcoin blockchain. Thus, these two operations are limited by Bitcoin’s ~10 minute blocktimes. However, once an execution of smart contract code is kicked off, it generally runs as fast as the node can process it
Can smart contracts work with Bitcoin?
While Counterparty smart contracts can interact with any Counterparty asset, they cannot control or send Bitcoin. Using BTC Relay, they can peer into the Bitcoin blockchain and perform actions based on if a Bitcoin transaction exists and is valid.
pricing

Cost of Services

Bronze

Free setup
$ 1200
SmartContract
Website
Referral rewards
multi-language
Technical support
Tron (TRX)
Secure Domain
Server
SSL
Launch in 3 days

silver

Free setup
$ 999
SmartContract
Website
Referral rewards
Technical support
Tron (TRX)
Secure Domain
Server
SSL
Launch in 3 days

Gold

Free setup
$ 899
SmartContract
Website
Referral rewards
Technical support
Tron (TRX)
Secure Domain
Server
SSL
Launch in 3 days