Instruction
Last updated
Was this helpful?
Last updated
Was this helpful?
Unlike Truffle being an hardcoded environment where the configuration sticked to only Ethereum, Houston separated configuration and account layer from migration component in order to handle situation for an environment where contracts has to be deployed to multiple blockchains but shares webassembly + JSON ABI schema for developing them.
Instruction
is the higher order component which returns a component with network option, ABI methods, and default test account wallets to be run in migration scripts. Instruction makes Houston versatile developing smart contract on every blockchain which uses rust as smart contract.
For example, to deploy a smart contract in multiple networks in Truffle, one must create multiple projects in which the network configuration is fixed to only one network with truffle-config.js
. Developers also need to understand each blockchain's client SDK to interact with the smart contract on each network. On the other hand, Houston just needs to import instruction library to setup and interact with the contract. Developers just need to understand high-level apis of instruction.
To get a preset configuration for curated networks write:
You can declare your own network configuration from the class Instruction
in a separate code and use it for deploying your smart contracts:
To interact with an existing contract which is already deployed in the network, a contract address and corresponding ABI json files are required. ABI json files are retrieved from Instruction
by specifying contract name in the project.