{"id":27066038,"url":"https://github.com/balancednetwork/balanced-rust-contracts","last_synced_at":"2025-04-05T18:34:46.995Z","repository":{"id":169319044,"uuid":"637866564","full_name":"balancednetwork/balanced-rust-contracts","owner":"balancednetwork","description":"Rust contracts for xCall integrations","archived":false,"fork":false,"pushed_at":"2024-10-28T05:29:03.000Z","size":497,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-28T08:50:53.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/balancednetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-05-08T15:18:56.000Z","updated_at":"2024-10-28T05:29:07.000Z","dependencies_parsed_at":"2024-03-14T07:27:43.472Z","dependency_job_id":"353be536-6747-4377-b8e7-83e7a096f167","html_url":"https://github.com/balancednetwork/balanced-rust-contracts","commit_stats":null,"previous_names":["balancednetwork/balanced-rust-contracts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balancednetwork%2Fbalanced-rust-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balancednetwork%2Fbalanced-rust-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balancednetwork%2Fbalanced-rust-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balancednetwork%2Fbalanced-rust-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balancednetwork","download_url":"https://codeload.github.com/balancednetwork/balanced-rust-contracts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247384927,"owners_count":20930557,"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":[],"created_at":"2025-04-05T18:34:46.889Z","updated_at":"2025-04-05T18:34:46.989Z","avatar_url":"https://github.com/balancednetwork.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# balanced-rust-contracts\n[![Rust Cov][rust-cov-badge]][rust-cov-link]\n\n[rust-cov-link]: https://app.codecov.io/gh/balancednetwork/balanced-rust-contracts/tree/main/contracts\n[rust-cov-badge]: https://codecov.io/gh/balancednetwork/balanced-rust-contracts/branch/main/graph/badge.svg?flag=rust\n\nRust contracts for Balanced xCall integrations\n## General Build\nTo build the contract and verify built wasm file run following script:\n\n`./scripts/generate_wasm.sh`\n\n\n## Chain Specific Build\nTo build the contract for specific chain with its own features, enable the feature as default by modifying `Cargo.toml`.\n\n### Chain Injective\nFor injective chain we enable feature `injective` in all projects and subprojects by modifying feature section as follows:\n```\n[features]\ndefault=[\"injective\"]\n```\n#### Additional Steps Injective\n- Call method `SetAdapter` on this contract to set adapter contract.\n```\ninjectived tx wasm execute ${TOKEN_CONTRACT} '{\"set_adapter\":{\"registry_contract\":\"${REGISTRY_CONTRACT}\"}}' --from ${WALLET} --keyring-backend test --node https://injective-testnet-rpc.publicnode.com:443 --chain-id injective-888 --gas-prices 500000000inj --gas auto --gas-adjustment 1.5 -y --output json\n```\n- Register this contract to CW20Adapter contract by calling  `RegisterCW20` on adapter contract.\n```\ninjectived tx wasm execute ${REGISTRY_CONTRACT} '{\"register_cw20_contract\":{\"addr\":\"${TOKEN_CONTRACT}\"}}' --from ${WALLET} --keyring-backend test --amount 1000000000000000000inj --node https://injective-testnet-rpc.publicnode.com:443 --chain-id injective-888 --gas-prices 500000000inj --gas auto --gas-adjustment 1.5 -y --output json\n```\n- Update metadata on CW20Adapter by calling `UpdateMetadata`.\n```\ninjectived tx wasm execute ${REGISTRY_CONTRACT} '{\"update_metadata\":{\"addr\":\"${TOKEN_CONTRACT}\"}}' --from ${WALLET} --keyring-backend test --amount 1000000000000000000inj --node https://injective-testnet-rpc.publicnode.com:443 --chain-id injective-888 --gas-prices 500000000inj --gas auto --gas-adjustment 1.5 -y --output json\n\n```\nAfter properly setup we should be able to query balance transferred to user as denom token balance as follows:\n```\ninjectived query bank spendable-balance ${USER_ACCOUNT} factory/${REGISTRY_CONTRACT}/${TOKEN_CONTRACT} --node https://injective-testnet-rpc.publicnode.com:443 --chain-id injective-888\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalancednetwork%2Fbalanced-rust-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalancednetwork%2Fbalanced-rust-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalancednetwork%2Fbalanced-rust-contracts/lists"}