call_old_weight

Call v334 → current #0

Legacy call interface using old weight format (deprecated).

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: developers

The Big Picture

When Substrate changed weight representation, old call signatures became incompatible. This preserves the old interface for tools that haven't updated. Functionally identical to Contracts.call, just with legacy weight parameters.

Use Cases

  • Support old tools/libraries not updated to new weight format
  • Backward compatibility during transition periods

From Chain Metadata

Deprecated version if [`Self::call`] for use in an in-storage `Call`.

Input Parameters

#NameTypeDescription
0
dest
MultiAddress dest (MultiAddress)
1
value
Compact<u64> CptValue in RAO (÷10⁹ for TAO) (RAO -> TAO (/ 10^9))
2
gas_limit
Compact<u64> Cptgas_limit (Compact<u64>) (SCALE compact -> integer)
3
storage_deposit_limit
Option storage_deposit_limit (Option)
4
data
Vec<u8> Vecdata (Vec<u8>)

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Same as Contracts.call
  • Used for backward compatibility with old tooling

Effects

Storage Modified

Postconditions

  • Same as Contracts.call

Side Effects

  • Same as Contracts.call

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Build call_old_weight call
const dest = 0 as any /* MultiAddress */;
const value = 0;
const gas_limit = 0;
const storage_deposit_limit = 0 as any /* Option */;
const data = 0;

const call = api.tx[stringCamelCase("Contracts")][stringCamelCase("call_old_weight")](
  dest,
  value,
  gas_limit,
  storage_deposit_limit,
  data
);

Runtime Info

Pallet Index
29
Call Index
0
First Version
v334
Current Version
v393