/getTxContractCallDataSignedByMpc
An API for retrieving the detailed information about the smart contract call data. This API, like any API that ends with "SignedByMpc" is secured by the ENTIRE MPC, meaning that the request is processes by all the cosigners, and the SDK verifies the response from a majority of them, at the same time. So it is protected from an attack that could compromise the API server.
-------------------- Request -------------------- ''' getTxContractCallDataSignedByMpc( function_name="withdraw", evm_network="ETH", contract_address="0xb64f1204ecf2d38e91c235c0d326e5ec8fd0897d", parameters_fields_types_and_values=[["uint256", "999999"]] ) '''
-------------------- Response -------------------- Response Example (Minimum): ''' { "FunctionData": { "DecodedFields": [ "AbsoluteName": "amount", "Meaning": "Token being withdrawn.", "Name": "amount", "SolidityType": "uint256", "Type": "amount", "Value": { "AbsoluteName": "amount", "ContractAddress": "0xb64f1204ecf2d38e91c235c0d326e5ec8fd0897d", "Decimals": 16, "DisplayAmount": "0.0000000000999999", "FiatValue": null, "IsInSystem": false, "Symbol": "BEERBEAR" } } ], "Meaning": "Withdraws a specific amount of tokens or assets", "Name": "withdraw", "Rational": "A simple ERC-20 or vault withdrawal function. The caller receives the tokens." }, "Meta": { "AccessToken": "469b...b592", "Destination": "0421...e936", "Source": "99bf...6444", "Time": "2025-05-11 15:49
.197" } } '''Response Example (Maximum): ''' { "FunctionData": [ { "DecodedFields": [ { "AbsoluteName": "order", "Meaning": "", "Name": "order", "SolidityType": "(uint8,uint256,uint256,address,address,address,uint256,uint256)", "Type": "complex", "Value": [ { "AbsoluteName": "order.type", "Meaning": "Mint order type.", "Name": "type", "SolidityType": "uint8", "Type": "raw", "Value": "4" } ] }, { "AbsoluteName": "routes", "Meaning": "Route for the swap.", "Name": "routes", "SolidityType": "(address[],uint256[])", "Type": "complex", "Value": [ "AbsoluteName": "routes.addresses", "Meaning": "Addresses in the swap route", "Name": "addresses", "SolidityType": "address[]", "Type": "complex", "Value": [ { "AbsoluteName": "routes.addresses.1", "Meaning": "Token address in the route.", "Name": "", "SolidityType": "address", "Type": "address", "Value": "0xb64f1204ecf2d38e91c235c0d326e5ec8fd0897d" } ] }, { "AbsoluteName": "signature", "Meaning": "The signature sent to the contract.", "Name": "signature", "SolidityType": "(uint8,bytes)", "Type": "complex", "Value": [ { "AbsoluteName": "signature.signature_type", "Meaning": "The signature type.", "Name": "signature_type", "SolidityType": "uint8", "Type": "raw", "Value": "4" } ] } ], "Meaning": "Mints token.", "Name": "mint", "Rational": "Part of a mint/redeem pair for yield-bearing or option-like tokens." } ], "Meta": { "AccessToken": "469b...b592", "Destination": "0421...e936", "Source": "99bf...6444", "Time": "2025-05-11 15:49
.197" } }Response structure 2
- FunctionData: Contains decoded information about one or more smart contract function calls.
- Name: The name of the decoded smart contract function (e.g., "mint").
- Meaning: A short description of what the function does (e.g., "Mints token.").
- Rational: Explanation of the function’s purpose or logical role (e.g., "Part of a mint/redeem pair for yield-bearing or option-like tokens.").
- DecodedFields: A list of decoded fields representing the input parameters and their interpreted values.
- AbsoluteName: The fully qualified name of the parameter
- Meaning: Description of what the field represents (e.g., "Order details", "Swap route", "Signature data").
- Name: The local Solidity variable name (e.g., "decimals", "name")
- SolidityType: The Solidity data type (e.g., "uint256", "address[]", "(uint8,bytes)").
- Type: Indicates whether the field is a raw value, address, amount, or complex (a nested object or tuple).
- Value: The actual decoded value. The structure depends on Type:
- For Type = "raw" → the value is a string or primitive (e.g., "123456789").
- For Type = "address" → the value is a blockchain address (e.g., "0xb64f1204...").
- For Type = "amount" → the value is a nested JSON object containing token-related details.
- AbsoluteName: Fully qualified identifier of the amount field, including external inner name (e.g., "order.token_type.decimals", "routes", "signature").
- ContractAddress: The token contract address.
- Decimals: Number of decimals used by the token.
- DisplayAmount: Human-readable representation of the token amount.
- FiatValue: Fiat equivalent value (nullable).
- IsInSystem: Boolean indicating if the token is supported within the system.
- Symbol: Token symbol (e.g., "USDC", "BEERBEER").
- For Type = "complex" → the value is an array of nested DecodedField objects representing structured tuples. DecodedFields Examples:
- order: Represents the token minting order data.
- type (uint8): The mint order type.
- expiry (uint256): Expiration timestamp of the order.
- nonce (uint256): Order nonce (unique identifier).
- benefactor (address): Address of the payer or collateral provider.
- beneficiary (address): Address that receives the minted token.
- collateral_token_address (address): Address of the token used as collateral.
- collateral_amount (amount): Token used as collateral.
- ContractAddress: "0xb64f1204..."
- Decimals: 16
- DisplayAmount: "0.0000000123456789"
- Symbol: "BEERBEER"
- usde_amount (amount): Amount of USDE being minted.
- ContractAddress: "0x8c5476bfd..."
- Decimals: 6
- DisplayAmount: "123.456789"
- Symbol: "USDC"
- routes: Represents the swap route configuration for token conversions.
- addresses (address[]): List of token contract addresses used in the swap route.
- ratios (uint256[]): Numeric ratios defining token weights or proportions in the swap path.
- signature: Represents the digital signature data used for transaction verification.
- signature_type (uint8): Numeric value representing the signature scheme.
- signature_bytes (bytes): Encoded cryptographic signature passed to the contract. '''
curl --request POST \
--url '/getTxContractCallDataSignedByMpc?function_name=withdraw&evm_network=ETH&contract_address=0xb64f1204ecf2d38e91c235c0d326e5ec8fd0897d¶meters_fields_types_and_values=[[%22uint256%22%2C%22999999%22]]' \
--header 'accept: application/json'