Using Truffle with Gnosis
Truffle is a development environment used for smart contract compiling, deploying, testing and debugging.
Follow the Truffle documentation for general installation and overview.
Config Truffle for Gnosis
Update the config with Gnosis credentials
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// for more about customizing your Truffle configuration!
networks: {
gnosis: {
provider: function() {
return new HDWalletProvider(
process.env.MNEMONIC,
"https://rpc.gnosischain.com")
},
network_id: 100,
gas: 500000,
gasPrice: 1000000000
},
chiado: {
provider: function() {
return new HDWalletProvider(
process.env.MNEMONIC,
"https://rpc.chiadochain.net")
},
network_id: 10200,
gas: 500000,
gasPrice: 1000000000
},
}
};
Compile your Gnosis contract
Default Compile
- Chiado Testnet
- Gnosis Mainnet
truffle compile --network chiado
truffle compile --network gnosis
Compile with Options
- Chiado Testnet
- Gnosis Mainnet
truffle compile [--list <filter>] [--all] [--network chiado] [--quiet]
truffle compile [--list <filter>] [--all] [--network gnosis] [--quiet]
Deploy your Contract
- Chiado Testnet
- Gnosis Mainnet
truffle migrate --network chiado
truffle migrate --network gnosis
View your deployed contract any of the explorers.
Visit our Tools page for other support.
Verify Contract
Verify with Truffle by using Truffle Plugin Verify
Visit our Contract Verification Page for more documentation on verification tools.
Additional Truffle Documentation
- Additional Truffle command documentation is located here.