# Basic steps for making simple project with truffle **Published by:** [N00b21337](https://paragraph.com/@n00b21337/) **Published on:** 2023-01-11 **URL:** https://paragraph.com/@n00b21337/basic-steps-for-making-simple-project-with-truffle ## Content Code smart contract with remix or some other tool, copy .sol to local environmentStart truffle console and local chain with "truffle develop"If you placed your contract in proper directory and made migration script, you can deploy it to local blockchain with "migrate --reset" commandCompile your smart contracts with "truffle compile"Copy smart contract ABI from compiled .json and instantiate web3 object in your web2 file (.html)Instantiate smart contract instanceCall Smart Contract function(method)// ABI var helloWorldABI = [ { "constant": true, "inputs": [], "name": "hello", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "pure", "type": "function" } ]; var helloWorldAddress = '0xb9A0D8302d4d77309088F9a1f81AD9D471780f44'; // Instantiated web3 object var web3 = new Web3('http://localhost:9545'); // Instantiated smart contract var helloWorld = new web3.eth.Contract(helloWorldABI, helloWorldAddress); // Smart contract function called with vanilla JS document.addEventListener('DOMContentLoaded', () => { helloWorld.methods.hello().call() .then(result => { document.getElementById('hello').innerHTML = result; }); }); ## Publication Information - [N00b21337](https://paragraph.com/@n00b21337/): Publication homepage - [All Posts](https://paragraph.com/@n00b21337/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@n00b21337): Subscribe to updates - [Twitter](https://twitter.com/0xCardinalError): Follow on Twitter