This API allows to add an EVM coin from the MPC.
return: success or error response.
-------- Request Example -------------
addEVMCoin(
evm_coin={
"ActivationCode": null,
"ChainId": 44787,
"EipType": 0,
"GasLimit": "21000",
"MaxFeeLimit": "10000000000",
"Name": "Celo Testnet",
"NodeUrl": "https://alfajores-forno.celo-testnet.org",
"Symbol": "CELO",
"SystemMaxFee": "0",
"ValueInFiat": "1"
},
request_extra_data={
"MessageNumber": 2,
"SessionId": "6603931f-d359-46fa-a386-6473c4259cc7"
}
)
--------------- Response Example--------------------------
{
"FunctionData": {
"StatusCode": 0,
"StatusCodeDescription": "EVM coin added successfully"
},
"Meta": {
"AccessToken": "6276...79fe",
"Destination": "0453...9d56",
"Source": "fc581...42f3",
"Time": "2025-02-10 13:05:23.729"
}
}
Error Responses
| Error Type | Http Code | GK8 error code | Reason / Description | Example Response |
|---|
| Backend Response | 400 | 1 | Request exceeds allowed coin limit | "StatusCode": 1 |
| Backend Response | 400 | 2 | Invalid EVM coin name | "StatusCode": 2 |
| Backend Response | 400 | 3 | EVM coin name already assigned | "StatusCode": 3 |
| Backend Response | 400 | 4 | Invalid EVM coin symbol | "StatusCode": 4 |
| Backend Response | 400 | 5 | EVM coin symbol already assigned | "StatusCode": 5 |
| Backend Response | 400 | 6 | Invalid chain ID | "StatusCode": 6 |
| Backend Response | 400 | 7 | Chain ID already assigned | "StatusCode": 7 |
| Backend Response | 400 | 8 | Invalid EIP type | "StatusCode": 8 |
| Backend Response | 400 | 9 | Invalid node URL | "StatusCode": 9 |
| Backend Response | 400 | 10 | Invalid EVM coin value in Fiat | "StatusCode": 10 |
| Backend Response | 400 | 11 | Incorrect gas limit set for this EVM | "StatusCode": 11 |
| Backend Response | 400 | 12 | Invalid EVM coin max fee limit | "StatusCode": 12 |
| Backend Response | 400 | 13 | Invalid EVM coin internal transaction fee | "StatusCode": 13 |
| Backend Response | 400 | 14 | Incorrect activation code | "StatusCode": 14 |
| Backend Response | 400 | 15 | No activation code provided for a non preset EVM | "StatusCode": 15 |
| Backend Response | 400 | 16 | Invalid EVM deviation type | "StatusCode": 16 |
| Backend Response | 400 | 17 | L1 symbol must be provided | "StatusCode": 17 |
| Backend Response | 400 | 18 | L1 symbol does not exist | "StatusCode": 18 |
| Backend Response | 400 | 19 | EVM is deactivated in the cold machine | "StatusCode": 19 |
evm_coinobject<p>an 'EvmCoin' object (EvmCoin class is defined in apiclient/MpcDriven/EvmCoin.py)</p>
request_extra_dataobject<p>additional data for the administrative request (currently used only for administrative requests)</p>
acceptstringGenerated from available response content types
200success
curl --request POST \
--url '/addEvmCoin?evm_coin=%22None%22&request_extra_data=%22None%22' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"FunctionData": {
"EvmCoin": {
"ChainId": "44787",
"GasLimit": "21000",
"MaxFeeLimit": "10000000000",
"Name": "Celo Testnet",
"NodeUrl": "https://alfajores-forno.celo-testnet.org",
"Symbol": "CELO",
"SystemMaxFee": "0",
"ValueInFiat": "1"
},
"RequestExtraData": {
"MessageNumber": 2,
"SessionId": "87517b9d-22c5-4ecd-9a97-de63be8fc5ab"
}
},
"Meta": {
"FunctionName": "addEvmCoin",
"RandomData": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
"Destination": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea",
"Time": "2021-02-07T18:37:46.948Z",
"Source": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99",
"AccessToken": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
}
}'