{"id":22350127,"url":"https://github.com/gcp-development/erc20","last_synced_at":"2026-05-03T19:33:37.165Z","repository":{"id":142830113,"uuid":"561737874","full_name":"gcp-development/erc20","owner":"gcp-development","description":"ERC-20 Token Standard","archived":false,"fork":false,"pushed_at":"2023-06-02T15:17:14.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T11:32:14.030Z","etag":null,"topics":["polkadot","rust","smart-contracts","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"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/gcp-development.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":"2022-11-04T11:31:24.000Z","updated_at":"2022-12-12T11:21:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7a7e05e-8262-4ddd-8cf2-fd8b02531372","html_url":"https://github.com/gcp-development/erc20","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gcp-development/erc20","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcp-development%2Ferc20","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcp-development%2Ferc20/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcp-development%2Ferc20/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcp-development%2Ferc20/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gcp-development","download_url":"https://codeload.github.com/gcp-development/erc20/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcp-development%2Ferc20/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32582765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["polkadot","rust","smart-contracts","wasm","webassembly"],"created_at":"2024-12-04T11:10:19.381Z","updated_at":"2026-05-03T19:33:37.149Z","avatar_url":"https://github.com/gcp-development.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# erc20\nERC-20 Token Standard\n\nIt's assumed that these software are installed and running:\n\n\u003cul\u003e\n  \u003cli\u003e\u003ca href=\"https://www.rust-lang.org/tools/install\" target=\"_blank\"\u003eRust\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://rust-lang.github.io/rustup/installation/index.html#installing-nightly\" target=\"_blank\"\u003enightly\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"https://crates.io/crates/cargo-contract\" target=\"_blank\"\u003ecargo contract\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\nThis project was developed using the [Intellij Community](https://www.jetbrains.com/idea/download/#section=linux) with the [Rust plugin](https://www.jetbrains.com/rust/).\n\n\u003chr\u003e\n\n## Table of Contents\u003cbr\u003e\n- [Environment](https://github.com/gcp-development/erc20/blob/main/README.md#environment)\n- [Test cases](https://github.com/gcp-development/erc20/blob/main/README.md#test-cases)\n- [Create an account](https://github.com/gcp-development/erc20/blob/main/README.md#create-an-account)\n- [Build](https://github.com/gcp-development/erc20/blob/main/README.md#build)\n- [Deploy via command-line](https://github.com/gcp-development/erc20/blob/main/README.md#deploy-via-command-line)\n- [Deploy via browser](https://github.com/gcp-development/erc20/blob/main/README.md#deploy-via-browser)\n\n\u003chr\u003e\n\n### Environment\n\n[ink! CLI version](https://use.ink/getting-started/setup#ink-cli).\n\n```bash\ncargo contract --version\n```\n\n![image](https://github.com/gcp-development/erc20/assets/76512851/97773ed9-ea13-4fdc-b011-b860e7617993)\n\nThe current [toolchain](https://rust-lang.github.io/rustup-components-history/) setup is as follows:\n\n```bash\nrustup toolchain install nightly-2023-02-09\n```\n\n```bash\nrustup component add rust-src --toolchain nightly-2023-02-09-x86_64-unknown-linux-gnu\n```\n\n```bash\nrustup override set nightly-2023-02-09\n```\n\nNote: There is a current [bug](https://github.com/paritytech/cargo-contract/issues/1058) in cargo-contract, building contracts with rust nightly 1.70.0 or higher. That's why we have to use the rustc [v1.69.0](https://blog.rust-lang.org/2023/04/20/Rust-1.69.0.html).\n\nThe directory will be assigned with a Rust toolchain with [rustup override](https://rust-lang.github.io/rustup/overrides.html#directory-overrides).\n\n```bash\nrustup show\n```\n![image](https://github.com/gcp-development/erc20/assets/76512851/ea146adb-9414-4b17-8c52-200994740bf7)\n\nNote:The nightly-2023-02-09 is set by the [rust-toolchain.toml](https://github.com/gcp-development/erc20/blob/main/rust-toolchain.toml) file.\n\n\u003chr\u003e\n\n### Test cases\n\nRun the test cases for the  contract\n```bash\ncargo test\n```\n\n![image](https://github.com/gcp-development/erc20/assets/76512851/18d2368e-aed9-45c5-9808-5eedf15cbcbe)\n\n\u003chr\u003e\n\n### Build\n\nBuild the contract\n```bash\ncargo contract build\n```\n\n![image](https://github.com/gcp-development/erc20/assets/76512851/be915f99-795c-408f-b531-c4068036c606)\n\nIn the target folder we should have these files:\n```bash\ntarget\n  └─ ink\n    └─ erc20.contract\n    └─ erc20.wasm\n    └─ metadata.json\n```\nA Wasm binary(erc20.wasm), a metadata file (metadata.json/which contains the contract's [ABI](https://use.ink/basics/metadata#abi)) and the contract file(erc20.contract/which we will deploy to our chain).\n\n![image](https://github.com/gcp-development/erc20/assets/76512851/5c445cea-4146-45a9-91d7-70e05bcba0a5)\n\n\u003chr\u003e\n\n### Create an account\n\nCreate an [Polkdot account](https://wiki.polkadot.network/docs/learn-account-generation#polkadot-js-browser-extension).\n\n![image](https://github.com/gcp-development/erc20/assets/76512851/b5bb692f-010f-4fb5-8bea-414dc1cb33ae)\n\nNote:For this example the [firefox polkadot-js-extension](https://addons.mozilla.org/en-GB/firefox/addon/polkadot-js-extension/) was used.\n\n\u003chr\u003e\n\n### Deploy via command-line\n\nDeploy the contract.\n```bash\ncargo contract upload --suri \"account twelve words\"\n```\n\nInstantiate the contract.\n```bash\ncargo contract instantiate --suri … --constructor new --args 1\n```\nNote:cargo-contract [commands](https://github.com/paritytech/cargo-contract/blob/master/docs/extrinsics.md#commands)\n\n\u003chr\u003e\n\n### Deploy via browser\n\nDeploy the contract to [Rococo](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-contracts-rpc.polkadot.io#/contracts)([testnet](https://use.ink/testnet) for Polkadot)\n\n![image](https://github.com/gcp-development/erc20/assets/76512851/10f94c5c-a1de-4a3d-859c-af7f364ec841)\n\n![image](https://github.com/gcp-development/erc20/assets/76512851/9a0849aa-9c3a-41d7-8dc8-4e635b1a3eb3)\n\n![image](https://github.com/gcp-development/erc20/assets/76512851/40428f28-20a4-4f16-a663-3822784c3f75)\n\n![image](https://github.com/gcp-development/erc20/assets/76512851/3387ab88-6ef1-4cb8-92fb-86a19e2b3d0d)\n\n![image](https://github.com/gcp-development/erc20/assets/76512851/ce70c818-6590-4a4a-827e-9a8172bf6f62)\n\n\u003chr\u003e\n\nReferences:\u003cbr/\u003e\n[ink!](https://use.ink/4.0.0-alpha.1/)\u003cbr/\u003e\n[Rust and WebAssembly](https://rustwasm.github.io/docs/book/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcp-development%2Ferc20","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcp-development%2Ferc20","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcp-development%2Ferc20/lists"}