### Install cross-rs for cross-compilation Source: https://github.com/ickb/contracts/blob/master/scripts/README.md This command installs the `cross` tool using Cargo, specifying a particular Git repository and revision. `cross` is essential for cross-compilation, ensuring builds are reproducible across different environments. ```bash cargo install cross --git https://github.com/cross-rs/cross --rev=6982b6c --locked ``` -------------------------------- ### Install ckb-capsule for CKB contract development Source: https://github.com/ickb/contracts/blob/master/scripts/README.md This command installs the `ckb-capsule` tool using Cargo, pointing to its Git repository and a specific revision. `ckb-capsule` is a crucial tool for building and managing CKB contracts. ```bash cargo install ckb-capsule --git https://github.com/nervosnetwork/capsule --rev=04fd58c --locked ``` -------------------------------- ### Deploying CKB Contracts using ckb-cli Source: https://github.com/ickb/contracts/blob/master/scripts/deployment/Readme.md This snippet provides the bash commands to deploy CKB contracts. It first removes any existing deployment transaction file, sets the CKB testnet API URL, then generates the deployment transactions based on a configuration file and migrations, signs them, and finally applies the generated transactions. ```bash rm deploy-tx.json; export API_URL="https://testnet.ckb.dev"; ckb-cli deploy gen-txs --deployment-config ./deployment.toml --migration-dir ./migrations --from-address ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqt39x0xz5k9qy90ah9v8880j29a72qmrtqrduh0m --sign-now --info-file deploy-tx.json ckb-cli deploy apply-txs --info-file ./deploy-tx.json --migration-dir ./migrations ``` -------------------------------- ### Build CKB contracts in release mode with Capsule Source: https://github.com/ickb/contracts/blob/master/scripts/README.md This command uses the `capsule` tool to build the CKB contracts in release mode. Building in release mode optimizes the compiled output for production use, reducing size and improving performance. ```bash capsule build --release ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.