You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tip: 32
title: TRC-32 Clear the ABI of contract
author: llwslc<[email protected]>
discussions to: https://github.com/tronprotocol/TIPs/issues/32
category: TRC
status: in process
created: 2019-4-3
Abstract
This TIP specifies a new api, which clears the ABI of contract.
Motivation
The contract does not need ABI anymore after the introduction of triggerConstantContract api.
Step 3. Call api: wallet/broadcasttransaction to broadcast the transaction
curl -X POST http://127.0.0.1:8090/wallet/broadcasttransaction -d '{"signature":["0e7e750226f01096f2f4aa0c2d03ad17d7ff57277ac3b655ecd692e3d9bd9bb822426dc779f046d79eedf23bb2534f8fa2c2fab8e48900e66d61af6f3262546c01"],"txID":"b33337e74de5ca8f6155003b588ae8a4d6580432d41a86d9086a244fb2960ab2","raw_data":{"contract":[{"parameter":{"value":{"owner_address":"415a523b449890854c8fc460ab602df9f31fe4293f","contract_address":"416162aff58d27a5fbd15b2f8f7ef752b2f4256086"},"type_url":"type.googleapis.com/protocol.ClearABIContract"},"type":"ClearABIContract"}],"ref_block_bytes":"0c19","ref_block_hash":"4b4f1264c3f9d924","expiration":1558685682000,"timestamp":1558685622423},"raw_data_hex":"0a020c1922084b4f1264c3f9d92440d092a0c7ae2d5a630830125f0a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e436c656172414249436f6e7472616374122e0a15415a523b449890854c8fc460ab602df9f31fe4293f1215416162aff58d27a5fbd15b2f8f7ef752b2f42560867097c19cc7ae2d"}'
Return:
{"result": true}
The clearContractABI can clear the ABI of contract at the address if the account is the owner of the contract.
In case the account is not the owner of contract will throw an exception.
Backwards Compatibility
triggerContract a function will push transactions on Blockchain after clear the ABI of contract.
See TriggerConstantContract for a more detailed discussion.
Test Cases
The clearContractABI caller is the owner of contract will clear the ABI of contract at the address.
The clearContractABI caller is not the owner of contract will throw an exception.
The clearContractABI of non-existent address will throw an exception.
The text was updated successfully, but these errors were encountered:
Abstract
This TIP specifies a new api, which clears the ABI of contract.
Motivation
The contract does not need ABI anymore after the introduction of triggerConstantContract api.
Specification
A new api,
clearContractABI
, is introduced.The
clearContractABI
parameters are shown as follows:Http interface example:
Step 1. Call api: wallet/clearabi to build the transaction
Return:
Step 2. Call api: wallet/gettransactionsign to sign (use the private key of the transparent address)
Return:
Step 3. Call api: wallet/broadcasttransaction to broadcast the transaction
Return:
The
clearContractABI
can clear the ABI of contract at the address if the account is the owner of the contract.In case the account is not the owner of contract will throw an exception.
Backwards Compatibility
triggerContract
a function will push transactions on Blockchain after clear the ABI of contract.See TriggerConstantContract for a more detailed discussion.
Test Cases
clearContractABI
caller is the owner of contract will clear the ABI of contract at the address.clearContractABI
caller is not the owner of contract will throw an exception.clearContractABI
of non-existent address will throw an exception.The text was updated successfully, but these errors were encountered: