upgrade_contract
Upgrade a NEAR contract by deploying new WASM code, with optional post-upgrade migration. Requires signer ownership of the contract.
Instructions
Upgrade an existing contract with new WASM code. The contract must be owned by the signer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | NEAR network (default: testnet) | |
| wasm_path | No | Path to the new compiled WASM file | |
| contract_id | Yes | The NEAR account ID of the contract to upgrade | |
| private_key | No | Optional: Private key for signing | |
| wasm_base64 | No | Alternative: Base64-encoded new WASM bytes | |
| migrate_args | No | Optional: Arguments for migration method | |
| migrate_method | No | Optional: Migration method to call after upgrade (e.g., "migrate") |