{"id":19295392,"url":"https://github.com/jsit/solidity-example","last_synced_at":"2026-06-17T19:32:02.622Z","repository":{"id":71935070,"uuid":"405428174","full_name":"jsit/solidity-example","owner":"jsit","description":null,"archived":false,"fork":false,"pushed_at":"2021-09-11T19:58:41.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-24T00:41:19.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-11T16:29:56.000Z","updated_at":"2021-09-12T15:46:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd25e736-cdaa-40dc-bfb0-07e1c38a5fde","html_url":"https://github.com/jsit/solidity-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jsit/solidity-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsit%2Fsolidity-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsit%2Fsolidity-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsit%2Fsolidity-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsit%2Fsolidity-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsit","download_url":"https://codeload.github.com/jsit/solidity-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsit%2Fsolidity-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34463552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:43:20.162Z","updated_at":"2026-06-17T19:32:02.609Z","avatar_url":"https://github.com/jsit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An Extremely Simple Solidity Contract Development Workflow\n\n## Running a Solidity Contract on Truffle\n\n### If starting from scratch\n\n1. Install truffle: `npm install -g truffle`\n\n1. Create a new truffle project\n\n\t1. In an empty directory run: `truffle init`\n\n1. In `truffle-config.js`, uncomment the `development` network and change its port to `9545` (the port used for `truffle develop`)\n\n1. Write a new contract in `./contracts`, something like\n`./contracts/WriteAndRead.sol`\n\n1. Add a new migration file for deployment at `./migrations/2_deploy_contracts.js`:\n\n\t```js\n\tvar WriteAndRead = artifacts.require(\"WriteAndRead\");\n\n\tmodule.exports = function(deployer) {\n\t\tdeployer.deploy(WriteAndRead);\n\t};\n\t```\n\n### After doing the above, or if you've just cloned this repo and installed truffle\n\n1. Run `truffle develop` to start the local blockchain and enter the truffle console\n\n1. In another shell, run `truffle migrate --network development` to compile and deploy your contract onto your local blockchain. **Note:** This _has_ to be done after the local blockchain is already running\n\n1. From within the truffle console, do something like `let instance = await WriteAndRead.deployed()`\n\n1. Run one of your contract's transactions with something like\n`instance.writeUint(1234)`\n\n1. Run one of your contract's calls with something like `instance.getUint()`\n\n1. Type `.exit` to leave the truffle console\n\n## References:\n\nThese links are of varying quality but I probably got a tidbit out of each of\nthem since I have them all open in tabs right now:\n\n- https://stackoverflow.com/questions/57076509/how-to-pass-a-string-to-a-setter-function-in-solidity\n- https://www.tutorialspoint.com/solidity/solidity_strings.htm\n- https://docs.soliditylang.org/en/v0.8.7/types.html\n- https://www.trufflesuite.com/docs/truffle/getting-started/interacting-with-your-contracts\n- https://www.trufflesuite.com/tutorial\n- https://medium.com/solidify/how-to-setup-your-local-solidity-development-environment-c4c8195810f3\n- https://ethereum.stackexchange.com/questions/73756/error-helloworld-has-not-been-deployed-to-detected-network-network-artifact-mi\n- https://trailheadtechnology.com/solidity-development-setting-up-environment/\n- https://www.quicknode.com/guides/web3-sdks/how-to-setup-local-development-environment-for-solidity\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsit%2Fsolidity-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsit%2Fsolidity-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsit%2Fsolidity-example/lists"}