The complete Smart Contract development CLI
npm i -g @titan-suite/cli
module.exports = {
defaultBlockchain: "aion",
blockchains: {
aion: {
networks: {
development: {
host: "http://TITAN.DEV.NODE",
defaultAccount: "",
password: ""
},
mainnet: {
host:
"http://api.nodesmith.io/v1/aion/mainnet/jsonrpc?apiKey=API_KEY",
defaultAccount: "",
password: ""
},
testnet: {
host:
"https://api.nodesmith.io/v1/aion/testnet/jsonrpc?apiKey=API_KEY",
defaultAccount: "",
password: ""
}
}
},
ethereum: {
networks: {
development: {
host: "http://127.0.0.1:8545",
defaultAccount: "",
password: ""
}
}
}
}
};
titan --help
You can also run titan <command> --help
for more details about the command
titan compile
Compile a Solidity smart contract
titan compile path/to/contracts/Example.sol
titan compile -n SpecificContract path/to/contracts/ManyContracts.sol
titan compile -d path/to/contracts/Example.sol
./build/bots/<contractName>.json
titan console
Interact with an AION node with an injected aion-web3
instance
titan console
titan create
Create a new contract or test file
titan create contract Test
titan deploy
Deploy a smart contract to an AION node
titan deploy path/to/contracts/Example.sol
titan deploy -n Test path/to/contracts/Example.sol
titan deploy -p 5 path/to/contracts/Example.sol
./build/bots/<contractName>.json
titan exec
Run Javascript files within your project
titan exec path/to/script
titan init
Generate an empty Titan project
titan init
titan init <name>
titan lint
Lint a smart contract
titan lint path/to/contracts/Example.sol
titan lint path/to/contracts/**/*.sol
titan migrate
Create a migration file:
// migrations/simple_migration.js
const Simple = require("../build/bolts/Simple.json");
module.exports = async deployer => {
deployer
.deploy(Simple)
.then(address => {
console.log(address);
})
.catch(e => {
console.error(e);
});
};
titan migrate path/to/migration.js
titan networks
titan test
Run unit tests
titan test path/to/test/testExample.js
titan unlock
Unlock an account
You may be prompted to enter an AION address and/or password
titan unlock
titan unlock -a <0x..>
titan unlock -a <0x...> -p <pwd>
titan unpack
Start a new project with a pre-built dApp
titan unpack
titan unpack <name>
titanrc.js
as specified aboveyarn test
Join us on Gitter