The contract installed on the Forge chain node allows developers to temporarily disable or enable it if necessary, such as disabling it immediately after discovering contract vulnerabilities, which can reduce losses.

View contract list

carried out forge contract:ls You can view a list of all installed contracts.

Disable a contract

You can enable the contract according to the contract's name or DID. If the contract is in the disabled state, the disable operation cannot be performed. The disabled contract will receive the corresponding transaction when it is sent through the SDK. unsupported_tx mistake.

carried out forge contract:deactivate transfer

Then look at the Transaction sent:

Get the following results:

Verify the contract status again, forge contract:ls | grep transferIn paused status:

Activate a contract

You can enable the contract based on the name or DID of the contract. If the contract is in the running state, the enabling operation cannot be performed. Only the running contract can send the corresponding transaction through the SDK.

carried out forge contract:activate transfer You can reactivate the transfer contract you just disabled:

Verify contract status again forge contract:ls | grep transferIn running status: