- Background
- API key
- Full Node HTTP API
- Address Utilities
- Transactions
- Accounts
- Account Resources
- Query The Network
- Smart Contract
- Voting & SRs
- Proposals
- Pending pool
- Address Utilities
- Full Node Solidity HTTP API
- Transactions
- Blocks
- Account Resources
- Node & Chain
- Smart Contracts
- Voting & SRs
- Full Node JSON-RPC API
- Overview
- buildTransaction
- eth
- eth_accounts
- eth_blockNumber
- eth_call
- eth_chainId
- eth_coinbase
- eth_estimateGas
- eth_gasPrice
- eth_getBalance
- eth_getBlockByHash
- eth_getBlockByNumber
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getCode
- eth_getStorageAt
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getTransactionByHash
- eth_getTransactionReceipt
- eth_getWork
- eth_protocolVersion
- eth_syncing
- eth_newFilter
- eth_newBlockFilter
- eth_getFilterChanges
- eth_getFilterLogs
- eth_uninstallFilter
- eth_getLogs
- net
- web3
- PolluxWeb
- address
- createAccount
- createRandom
- fromAscii
- fromDecimal
- fromMnemonic
- fromUtf8
- getEventByTransactionID
- getEventResult
- isAddress
- isConnected
- setHeader
- setDefaultBlock
- setPrivateKey
- setAddress
- sha3
- toAscii
- toBigNumber
- toDecimal
- toHex
- toRAM
- toUtf8
- BigNumber
- polluxweb.trx
- getAccount
- getAccountResources
- getApprovedList
- getAvailableUnfreezeCount
- getBalance
- getBandwidth
- getBlock
- getBlockByHash
- getBlockByNumber
- getBlockRange
- getBlockTransactionCount
- getBrokerage
- getCanDelegatedMaxSize
- getCanWithdrawUnfreezeAmount
- getChainParameters
- getConfirmedTransaction
- getContract
- getCurrentBlock
- getDelegatedResourceV2
- getDelegatedResourceAccountIndexV2
- getExchangeByID
- getNodeInfo
- getReward
- getTokenByID
- getTokenFromID
- getTokenListByName
- getTokensIssuedByAddress
- getTransaction
- getTransactionFromBlock
- getTransactionInfo
- getUnconfirmedBalance
- getUnconfirmedBrokerage
- getUnconfirmedReward
- listExchanges
- listExchangesPaginated
- listNodes
- listProposals
- listSuperRepresentatives
- listTokens
- sendRawTransaction
- sendHexTransaction
- sendToken
- sendTransaction
- sign
- signMessageV1
- signMessageV2
- timeUntilNextVoteCycle
- multiSign
- verifyMessage
- verifyMessageV2
- _signTypedData
- verifyTypedData
- polluxweb.transactionBuilder
- addUpdateData
- applyForSR
- cancelUnfreezeBalanceV2
- createAccount
- createAsset
- createProposal
- createSmartContract
- createToken
- delegateResource
- deleteProposal
- estimateEnergy
- extendExpiration
- freezeBalance
- freezeBalanceV2
- injectExchangeTokens
- purchaseAsset
- purchaseToken
- sendAsset
- sendToken
- sendTrx
- tradeExchangeTokens
- triggerConfirmedConstantContract
- triggerConstantContract
- triggerSmartContract
- undelegateResource
- unfreezeBalance
- unfreezeBalanceV2
- updateSetting
- updateAccountPermissions
- updateAsset
- updateBrokerage
- updateEnergyLimit
- updateToken
- vote
- voteProposal
- withdrawBlockRewards
- withdrawExchangeTokens
- withdrawExpireUnfreeze
- poxweb.contract
- polluxweb.utils
- Pollux CLI
TriggerSmartContract
POST
/wallet/triggersmartcontract
ABI rules
Example: Parameter and return value encoding and decoding.
Transaction object - JSON object: Unsigned transaction, please refer to the Transaction chapter for the fields contained in it. Since the transaction type is TriggerSmartContract, the fields contained in raw_data.contract[0].parameter.value in the transaction are as follows:
Field | Type | Description |
---|---|---|
owner_address | string | Account address |
contract_address | string | Contract address |
call_value | int64 | The amount of TRX passed into the contract |
data | string | Operating parameters |
call_token_value | int64 | The amount of TRC-10 transferred into the contract |
token_id | int64 | TRC-10 token id |
Request
Body Params application/json
object {0}
Example
{
"owner_address": "PHqgRM8giN6Nr9DgA1FybUjKFwd79cxhyp",
"contract_address": "PFHUpUNpmPVTYziBWCMk7kopiTzx9mX56r",
"function_selector": "transfer(address,uint256)",
"parameter": "00000000000000000000004115208EF33A926919ED270E2FA61367B2DA3753DA0000000000000000000000000000000000000000000000000000000000000032",
"fee_limit": 1000000000,
"call_value": 0,
"visible": true
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/wallet/triggersmartcontract' \
--header 'Content-Type: application/json' \
--data-raw '{
"owner_address": "PHqgRM8giN6Nr9DgA1FybUjKFwd79cxhyp",
"contract_address": "PFHUpUNpmPVTYziBWCMk7kopiTzx9mX56r",
"function_selector": "transfer(address,uint256)",
"parameter": "00000000000000000000004115208EF33A926919ED270E2FA61367B2DA3753DA0000000000000000000000000000000000000000000000000000000000000032",
"fee_limit": 1000000000,
"call_value": 0,
"visible": true
}'
Responses
🟢200Success
application/json
Body
object {0}
Examples
{
"result": {
"result": true
},
"transaction": {
"visible": true,
"txID": "f9c67602b533782fd4d5f3db59e93c378b6035435d2d2bf03526e7eb9ce944c1",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"data": "a9059cbb00000000000000000000004115208ef33a926919ed270e2fa61367b2da3753da0000000000000000000000000000000000000000000000000000000000000032",
"owner_address": "PHqgRM8giN6Nr9DgA1FybUjKFwd79cxhyp",
"contract_address": "PFHUpUNpmPVTYziBWCMk7kopiTzx9mX56r"
},
"type_url": "type.googleapis.com/protocol.TriggerSmartContract"
},
"type": "TriggerSmartContract"
}
],
"ref_block_bytes": "4698",
"ref_block_hash": "c4787344e1436c4e",
"expiration": 1737541815000,
"fee_limit": 1000000000,
"timestamp": 1737541756738
},
"raw_data_hex": "0a0246982208c4787344e1436c4e40d895c0ecc8325aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e12154142a1e39aefa49290f2b3f9ed688d7cecf86cd6e02244a9059cbb00000000000000000000004115208ef33a926919ed270e2fa61367b2da3753da000000000000000000000000000000000000000000000000000000000000003270c2cebcecc83290018094ebdc03"
}
}