KYOTO DEVELOPER DOCUMENTATION
  • 🏗️Build on KYOTO
    • KYOTO Testnet Token
    • Network Details
    • Developer Tools
    • Metamask Wallet
    • Build
      • With Hardhat
      • With Truffle
      • With Remix
      • With thirdweb
    • Transactions
    • Connecting and interacting via Ethers.js
    • How to verify a smart contract?
    • Smart Contract Best Practices
    • KYOTO for Ethereum Developers
Powered by GitBook
On this page
  1. Build on KYOTO
  2. Build

With Truffle

How to deploy a smart contract to the KYOTO network using Truffle.

PreviousWith HardhatNextWith Remix

Last updated 1 year ago

To implement this, create a .gitignore file in your root directory and populate it with the code provided below. This will ensure that the specified files are ignored and not included in any Git commits or pushes.

# Ignore mnemonic and sensitive files
mnemonic.txt
secrets.json
credentials.ini

# Ignore build artifacts
build/
dist/
node_modules/

# Ignore IDE and editor files
.vscode/
.idea/
*.sublime-project
*.sublime-workspace

# Ignore system files
.DS_Store
Thumbs.db

# Add any other files or directories you want to ignore

By including this .gitignore file, you can safely exclude sensitive files, build artifacts, IDE/editor files, and other specified files from version control. This helps maintain the security and privacy of your KYOTO application development.

Deploy

To deploy the generated artifact to our network, you must configure Truffle accordingly. Create a new file in the migrations directory called 2_deploy_contracts.js.

Populate 2_deploy_contracts.js with:

var helloWorld = artifacts.require("./HelloWorld.sol");
module.exports = function(deployer) {
        deployer.deploy(helloWorld);
};

By running the command truffle deploy you can observe the execution of your migration script. Eventually, Truffle will provide you with the address where the contract account has been created.

Further Links

​​

​​

🏗️
Solidity Documentation
Truffle Documentation