updateSetting

创建一个未签名的交易,用于更新合约的用户资源占比。

用法

visionWeb.transactionBuilder.updateSetting(
  contractAddress,
  consumeUserResourcePercent,
  ownerAddress,
  options
);

入参

参数描述类型默认值
contractAddress合约地址string-
consumeUserResourcePercent合约的用户资源占比number-
ownerAddress交易创建者的地址string默认账户地址
options可选参数,具体参数见下方object-

options 参数

参数描述类型默认值
permissionId设置多重签名时使用number-

返回值

object,创建的 transaction 对象。

示例

visionWeb.transactionBuilder.updateSetting("46f151d2b560d0f0a983cdbfc85fff392bb8874258",20);
> {
  result: { result: true },
  transaction: {
    visible: false,
    txID: '14cf36a1d5ac266381077badbbd5c2f236e85ff3747d668bed8a6ac3162a031f',
    raw_data: {
      contract: [Array],
      ref_block_bytes: 'e410',
      ref_block_hash: '69d60a0a02794def',
      expiration: 1608476262000,
      fee_limit: 20000000,
      timestamp: 1608476203137
    },
    raw_data_hex: '0a02e410220869d60a0a02794def40f0fc9f85e82e5a8e01081f1289010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412540a1541401a8da8a7fc86f0087f8c62e630d10df10a963b121541e032de6da4f2afa69ddcc4ada40f782c7b0f019e22242e1a7d4d00000000000000000000000000000000000000000000000000000000000000647081b19c85e82e900180dac409'
  }
}