AIXChain Blockchain Document
  • INTRODUCTION
    • Getting started with smart contract development
    • Build a Decentralized Library
  • AIXC AND ARC TOKEN
    • ARC
      • ARX Transfer
      • Query ARX balance
    • ARC-10
      • Issue ARC-10 token
      • Participate ARC-10
      • ARC-10 Transfer
      • Query ARC-10 balance
      • ARC-10 Transfer in Smart Contracts
    • ARC-20
      • Protocol Interface
      • Contract Example
      • Issuing ARC-20 tokens tutorial
    • ARC-721
      • Protocol Interface
      • Contract Example
  • ACCOUNT MODEL
  • BUILD NODE
    • How to setup a Super node to produce Blocks
      • Recommended configuration & Environment
      • Example cloud services
      • Deployment guide
    • Super Representative
      • How to become a SR
      • Super Representatives Election
      • How to change witness name
  • HTTP API
    • Introduction
    • API Signature and Broadcast Flow
    • API List
      • Full Node API Overview
      • Address Utilities
        • GenerateAddress
        • CreateAddress
        • ValidateAddress
      • Accounts
        • CreateAccount
        • GetAccount
        • UpdateAccount
        • AccountPermissionUpdate
        • GetAccountBalance
      • Account Resources
        • GetAccountResource
        • GetAccountNet
        • FreezeBalance
        • UnfreezeBalance
        • GetDelegatedResource
        • GetDelegatedResourceAccountIndex
      • Query the Network
        • GetBlockByNum
        • GetBlockById
        • GetBlockByLatestNum
        • GetBlockByLimitNext
        • GetNowBlock
        • GetTransactionById
        • GetTransactionInfoById
        • GetTransactionInfoByBlockNum
        • ListNodes
        • GetNodeInfo
        • GetChainParameters
        • GetBlockBalance
      • ARC10 Token
        • GetAssetIssueByAccount
        • GetAssetIssueById
        • GetAssetIssueList
        • GetPaginatedAssetIssueList
        • TransferAsset
        • CreateAssetIssue
        • UnfreezeAsset
        • UpdateAsset
      • Transactions
        • GetContract
        • GetTransactionSign
        • BroadcastTransaction
        • BroadcastHex
        • EasyTransfer
        • EasyTransferByPrivate
        • CreateTransaction
      • Voting & SRs
        • ListWitnesses
        • CreateWitness
        • UpdateWitness
        • GetBrokerage
        • UpdateBrokerage
        • VoteWitnessAccount
        • GetReward
        • WithdrawBalance
        • GetNextMaintenanceTime
      • Smart Contracts
        • TriggerSmartContract
        • DeployContract
        • UpdateSetting
        • UpdateEnergyLimit
        • ClearAbi
        • GetContract
        • TriggerConstantContract
      • Proposals
      • Solidity Node API
    • RPC List
  • AIXCHAIN CLI
  • Aixchain SDK
    • Quickstart
    • Address and Signature
    • Sending Transaction
    • Smart Contract
  • Faucet Aixchain
  • Wallets
Powered by GitBook
On this page
  1. HTTP API
  2. API List
  3. Smart Contracts

UpdateSetting

http://172.104.51.182:16667/wallet/updatesetting

PreviousDeployContractNextUpdateEnergyLimit

Last updated 29 days ago

Update the consume_user_resource_percent parameter of a smart contract

BODY PARAMS {

contract_address string

owner_address string

consume_user_resource_percent int32

visible boolean (Optional)

permission_id int32 (Optional)

}

Note:

  • owner address is transaction creator address, in hex string format.

  • contract address is the address of the contract to be modified, in hex string format.

  • consume_user_resource_percent is consume user's resource percentage. It should be an integer between [0, 100]. if 0, means it does not consume user's resource until the developer's resource has been used up

  • permission_id for multi-signature

  • visible: whehter the address is in base58check format.

Example:

curl --request POST --url --header 'Accept: application/json' --header 'Content-Type: application/json' --data '{ "owner_address": "AFzFXoQCgUeoApjejKM9B46NgFGHXvUyKz", "contract_address": "AV27cVbuGmTv9q6qgtPxsLUkuG9ohUUVPd", "consume_user_resource_percent":10, "visible": true }

Input:

{

"owner_address": "AFzFXoQCgUeoApjejKM9B46NgFGHXvUyKz", "contract_address": "AV27cVbuGmTv9q6qgtPxsLUkuG9ohUUVPd", "consume_user_resource_percent":10, "visible": true

}

Response:

{

"visible": true, "txID": "94d5f099c4382421c3576502e9c0e22a71ee51c3122bdf79dfc835f028d0acf9", "raw_data": { "contract": [ { "parameter": { "value": { "consume_user_resource_percent": 10, "owner_address": "AFzFXoQCgUeoApjejKM9B46NgFGHXvUyKz", "contract_address": "AV27cVbuGmTv9q6qgtPxsLUkuG9ohUUVPd" }, "type_url": "type.googleapis.com/protocol.UpdateSettingContract" }, "type": "UpdateSettingContract" } ], "ref_block_bytes": "7652", "ref_block_hash": "f7ccc87584da42f7", "expiration": 1639985361000, "timestamp": 1639985303289 }, "raw_data_hex": "0a0276522208f7ccc87584da42f740e8e0fab5dd2f5a6a082112660a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e55706461746553657474696e67436f6e747261637412300a15414203485a535a4072c9fbfaaddfe2a010ad0bcdb0121541d0f723a417a54e5629d865e05db8a45b79f0a9c3180a70f99df7b5dd2f"

}

=> Continue you call gettransactionsign API then call broadcasttransaction API

We will the final result: The transaction created success on AIXChain network. {

"result": true, "txid": "94d5f099c4382421c3576502e9c0e22a71ee51c3122bdf79dfc835f028d0acf9"

}

http://172.104.51.182:16667/wallet/updatesetting