{"id":27021232,"url":"https://github.com/jonas089/raptor-abi","last_synced_at":"2025-06-12T19:07:07.804Z","repository":{"id":110874072,"uuid":"605099337","full_name":"jonas089/raptor-abi","owner":"jonas089","description":"Proc-macro Compiler for Contracts","archived":false,"fork":false,"pushed_at":"2024-01-10T13:40:51.000Z","size":193447,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-04T19:46:29.373Z","etag":null,"topics":["metadata","proc-macro","smart-contract"],"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/jonas089.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-02-22T12:51:39.000Z","updated_at":"2024-09-02T15:48:43.000Z","dependencies_parsed_at":"2023-11-21T17:03:48.553Z","dependency_job_id":null,"html_url":"https://github.com/jonas089/raptor-abi","commit_stats":null,"previous_names":["jonas089/abi-rs","jonas089/rust-contract-abi","jonas089/raptor-abi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonas089/raptor-abi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonas089%2Fraptor-abi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonas089%2Fraptor-abi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonas089%2Fraptor-abi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonas089%2Fraptor-abi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonas089","download_url":"https://codeload.github.com/jonas089/raptor-abi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonas089%2Fraptor-abi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259519826,"owners_count":22870371,"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":["metadata","proc-macro","smart-contract"],"created_at":"2025-04-04T19:43:11.549Z","updated_at":"2025-06-12T19:07:07.771Z","avatar_url":"https://github.com/jonas089.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raptor contract ABI\n\n\u003cimg src=\"https://github.com/jonas089/raptor-abi/blob/master/resources/logo.webp\" alt=\"Alt text\" title=\"Logo\" width=\"500\" height=\"500\"/\u003e\n\n## Supported casper_types\n- Bool\n- I32\n- I64\n- U8\n- U32\n- U64\n- U128\n- U256\n- U512\n- Unit\n- String\n- Key\n- URef\n- PublicKey\n\n- Any\n\n```\n\n██╗███╗░░██╗██╗░░██╗██╗\n██║████╗░██║██║░██╔╝██║\n██║██╔██╗██║█████═╝░██║\n██║██║╚████║██╔═██╗░╚═╝\n██║██║░╚███║██║░╚██╗██╗\n╚═╝╚═╝░░╚══╝╚═╝░░╚═╝╚═╝\n```\na smart contract ABI generator for Polkadot\n\nRaptor-abi is essentially a compact implementation of Ink for Casper smart contracts.\n\nAs of today, Claptrap supports metadata generation at build-time for **Entry Point** definitions.\n\n## src/ink.rs\nArtificial example contract that demonstrates the implementation of **Entry Points** using Claptrap macros.\n\n## code_generator\nProcedural macro definitions for contract ABI generation inspired by Ink!.\n\n## helpers\nDeadcode Type definitions and filehandlers.\n\n## test.sh\nCompile ink.rs =\u003e output.json\n\ntest.sh deletes the target folder (if present) because otherwise the ink contract is not built from source =\u003e no or empty output.json.\n\n## Direct comparison\nNative Casper:\n```rust\nEntryPoint::new(\"test\", vec![...], CLType::Unit, EntryPointAccess::Public, EntryPointType::Contract);\n```\nRaptor:\n```rust\n#[derive(Default)]\n#[derive(InkCasperMacro)]\nstruct NewEntryPointArgs1{\n    sender: Key,\n    recipient: Key,\n    amount: U64,\n    id_first:U256,\n    text: String\n}\nlet ep = NewEntryPointArgs1::default();\nlet ep_parameters = ep.get_params();\nlet entry_point = EntryPoint::new(\"test\", ep_parameters.clone(), CLType::Unit, EntryPointAccess::Public, EntryPointType::Contract);\n```\nThe additional syntax is required as Claptrap parses the struct at compile time using a proc macro to generate valuable metadata for the contract.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonas089%2Fraptor-abi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonas089%2Fraptor-abi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonas089%2Fraptor-abi/lists"}