Skip to main content

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

truffle compile --network chiado

Compile with Options

truffle compile [--list <filter>] [--all] [--network chiado] [--quiet]

Deploy your Contract

truffle migrate --network chiado

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.