{"id":26469835,"url":"https://github.com/ocdbytes/aptos_move","last_synced_at":"2026-01-04T21:05:23.418Z","repository":{"id":113749379,"uuid":"609025567","full_name":"ocdbytes/APTOS_MOVE","owner":"ocdbytes","description":"Move Programming Language | Aptos Blockchain | Move Contract Deployment (APTOS - DEVNET, TESTNET) | Move Modules \u0026 Tests | Interaction | Non EVM","archived":false,"fork":false,"pushed_at":"2023-03-07T23:44:41.000Z","size":723,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-14T10:46:07.640Z","etag":null,"topics":["aptos","aptos-move","move","non-evm"],"latest_commit_sha":null,"homepage":"","language":"Move","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/ocdbytes.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}},"created_at":"2023-03-03T08:10:24.000Z","updated_at":"2023-03-07T23:48:57.000Z","dependencies_parsed_at":"2023-03-21T23:20:53.240Z","dependency_job_id":null,"html_url":"https://github.com/ocdbytes/APTOS_MOVE","commit_stats":null,"previous_names":["ocdbytes/aptos_move"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocdbytes%2FAPTOS_MOVE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocdbytes%2FAPTOS_MOVE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocdbytes%2FAPTOS_MOVE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocdbytes%2FAPTOS_MOVE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocdbytes","download_url":"https://codeload.github.com/ocdbytes/APTOS_MOVE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244470251,"owners_count":20457908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aptos","aptos-move","move","non-evm"],"created_at":"2025-03-19T17:09:33.820Z","updated_at":"2026-01-04T21:05:18.388Z","avatar_url":"https://github.com/ocdbytes.png","language":"Move","readme":"# APTOS-MOVE\n\nAptos \u0026 Move integration:\n\n- Setup\n  - Init\n  - Config\n  - Compile\n  - Test\n- Deployment\n  - Init\n  - Funding the Wallet\n  - Compile \u0026 test\n  - Publishing\n- Interaction\n\n## MODULES\n\n- Aptos Basics (Global Counter)\n- Aptos Coin\n\n---\n\n## SETUP\n\n### Initialize\n\n```sh\naptos move init\n```\n\n### Config file\n\n```toml\n[package]\nname = 'counter_mod'\nversion = '1.0.0'\n[dependencies.AptosFramework]\ngit = 'https://github.com/aptos-labs/aptos-core.git'\nrev = 'main'\nsubdir = 'aptos-move/framework/aptos-framework'\n[addresses]\npublisher= \"0x42\"\n```\n\n### Compiling\n\n```sh\naptos move compile --bytecode-version 6\n# bytecode version : 6\n# If not gives rust compilation error\n```\n\n### Testing\n\n```sh\naptos move test --bytecode-version 6\n```\n\n## Deployment\n\n### Initialization\n\nTo initialize an account on the aptos blockchain dev net. This will generate a `config.yaml` in `.aptos` folder and the config will look something like this.\n\n```yaml\n---\nprofiles:\n  default:\n    private_key: \"\u003cPRIVATE_KEY\u003e\"\n    public_key: \"\u003cPUBLIC_KEY\u003e\"\n    account: 015f8870f86159f196f178981c7e8a66a5171108586b73fdce98fece81505f4a\n    rest_url: \"https://fullnode.devnet.aptoslabs.com\"\n    faucet_url: \"https://faucet.devnet.aptoslabs.com\"\n\n```\n\n```sh\naptos init\n\n---\n\nAptos CLI is now set up for account 015f8870f86159f196f178981c7e8a66a5171108586b73fdce98fece81505f4a as profile default!  Run `aptos --help` for more information about commands\n{\n  \"Result\": \"Success\"\n}\n```\n\n### Funding the Wallet\n\n```sh\naptos account fund-with-faucet --account default\n```\n\n### Compiling \u0026 Testing\n\n```sh\naptos move compile --bytecode-version 6 --named-addresses publisher=default\n\n# OUTPUT\n\nCompiling, may take a little while to download git dependencies...\nUPDATING GIT DEPENDENCY https://github.com/aptos-labs/aptos-core.git\nINCLUDING DEPENDENCY AptosFramework\nINCLUDING DEPENDENCY AptosStdlib\nINCLUDING DEPENDENCY MoveStdlib\nBUILDING counter_mod\n{\n  \"Result\": [\n    \"015f8870f86159f196f178981c7e8a66a5171108586b73fdce98fece81505f4a::counter\"\n  ]\n}\n\n---\n\naptos move test --bytecode-version 6 --named-addresses publisher=default\n\n# OUTPUT\n\nINCLUDING DEPENDENCY AptosFramework\nINCLUDING DEPENDENCY AptosStdlib\nINCLUDING DEPENDENCY MoveStdlib\nBUILDING counter_mod\nRunning Move unit tests\n[ PASS    ] 0x15f8870f86159f196f178981c7e8a66a5171108586b73fdce98fece81505f4a::counter_test::test_if_it_init\n[ PASS    ] 0x15f8870f86159f196f178981c7e8a66a5171108586b73fdce98fece81505f4a::counter_test::test_increase_count_1\nTest result: OK. Total tests: 2; passed: 2; failed: 0\n{\n  \"Result\": \"Success\"\n}\n\n```\n\n### Publishing the Module\n\n```sh\naptos move publish --bytecode-version 6 --named-addresses publisher=default\n\n# OUTPUT\n\nCompiling, may take a little while to download git dependencies...\nUPDATING GIT DEPENDENCY https://github.com/aptos-labs/aptos-core.git\nINCLUDING DEPENDENCY AptosFramework\nINCLUDING DEPENDENCY AptosStdlib\nINCLUDING DEPENDENCY MoveStdlib\nBUILDING counter_mod\npackage size 1357 bytes\nDo you want to submit a transaction for a range of [126400 - 189600] Octas at a gas unit price of 100 Octas? [yes/no] \u003e\ny\n{\n  \"Result\": {\n    \"transaction_hash\": \"0x95f8244b7e0da3dca296d7b3b8d8303643f8985bb5612dbc7f3d2011b772eae6\",\n    \"gas_used\": 1264,\n    \"gas_unit_price\": 100,\n    \"sender\": \"015f8870f86159f196f178981c7e8a66a5171108586b73fdce98fece81505f4a\",\n    \"sequence_number\": 0,\n    \"success\": true,\n    \"timestamp_us\": 1678230421614233,\n    \"version\": 3218334,\n    \"vm_status\": \"Executed successfully\"\n  }\n}\n\n```\n\n## Interaction\n\nTo interact with the aptos modules\n\n```sh\naptos move run \\\n∙ --function-id 'default::counter::bump'\n\n# OUTPUT\n\n{\n  \"Result\": {\n    \"transaction_hash\": \"0x819a2ea021a206cd57ccafec356db8257f5343388a8ebc5670cbd92aa9a235a4\",\n    \"gas_used\": 503,\n    \"gas_unit_price\": 100,\n    \"sender\": \"015f8870f86159f196f178981c7e8a66a5171108586b73fdce98fece81505f4a\",\n    \"sequence_number\": 1,\n    \"success\": true,\n    \"timestamp_us\": 1678231552403299,\n    \"version\": 3226174,\n    \"vm_status\": \"Executed successfully\"\n  }\n}\n\n---\n\n# to read the struct at particular account\n# curl https://fullnode.devnet.aptoslabs.com/v1/accounts/\u003cAccount\u003e/resource/0x\u003cAccount\u003e::\u003cModule_name\u003e::\u003cFunction_name\u003e\n\ncurl https://fullnode.devnet.aptoslabs.com/v1/accounts/015f8870f86159f196f178981c7e8a66a5171108586b73fdce98fece81505f4a/resource/0x015f8870f86159f196f178981c7e8a66a5171108586b73fdce98fece81505f4a::counter::CountHolder\n\n# OUTPUT\n\n{\n    \"type\":\"0x15f8870f86159f196f178981c7e8a66a5171108586b73fdce98fece81505f4a::counter::CountHolder\",\n    \"data\":{\n        \"count\":\"0\"\n    }\n}\n\n# to get change in events :\n# curl https://fullnode.devnet.aptoslabs.com/v1/accounts/\u003cAccount\u003e/resource/0x\u003cAccount\u003e::\u003cModule_name\u003e::\u003cFunction_name\u003e/message_change_events\n\n```\n\n## Structs\n\n- `copy`: Allows values of types with this ability to be copied.\n- `drop`: Allows values of types with this ability to be popped/dropped.\n- `store`: Allows values of types with this ability to exist inside a struct in global storage.\n- `key`: Allows the type to serve as a key for global storage operations.\n\n## Specs\n\nThe prover basically tells us that we need to explicitly specify the condition under which the function `balance_of` will abort, which is caused by calling the function `borrow_global` when `owner` does not own the resource `Balance\u003cCoinType\u003e`.\n\n```move\nspec balance_of {\n    pragma aborts_if_is_strict;\n    aborts_if !exists\u003cBalance\u003cCoinType\u003e\u003e(owner);\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focdbytes%2Faptos_move","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focdbytes%2Faptos_move","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focdbytes%2Faptos_move/lists"}