initialize_contract
Call an initialization method on a deployed NEAR contract to set its initial state. Required after deployment for contracts that need setup.
Instructions
Call an initialization method on a deployed contract. Most contracts require this after deployment.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"contract_id": "<contract_id>",
"method_name": "<method_name>"
},
"name": "initialize_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gas | No | Optional: Gas limit in TGas (default: 100) | |
| args | No | Initialization arguments as JSON object | |
| deposit | No | Optional: NEAR amount to attach (in NEAR, e.g., "1.5") | |
| network | No | NEAR network (default: testnet) | |
| contract_id | Yes | The NEAR account ID of the deployed contract | |
| method_name | Yes | Name of the init method (commonly "new" or "init") | |
| private_key | No | Optional: Private key for signing |