Exchanges the supported stablecoin tokens to Based Credits tokens at 1:1 ratio
cURL
curl --request POST \ --url https://mainnet.base.org/contracts/exchanger/exchangeToCredits \ --header 'Content-Type: application/json' \ --data ' { "amount": "1000000000000000000" } '
{ "transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "blockNumber": 12345678, "gasUsed": "21000", "events": [ { "name": "<string>", "args": {} } ] }
Amount of tokens to exchange (in wei/smallest unit)
"1000000000000000000"
Exchange successful
Transaction hash
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
Block number where transaction was mined
12345678
Gas used for the transaction
"21000"
Show child attributes
Event name
Event arguments
Was this page helpful?