added

Support for Solana Smart Contracts calls

Release date

Friday, December 2, 2022

Release type

Informational – No action or changes necessary from platforms.

Summary

Zero Hash is excited to expand our support for smart contract calls to include Solana. Previously, Zero Hash supported withdrawals to smart contracts on Ethereum, Polygon, and all EVM-compatible chains.

Action required

No additional action is required. If platforms would like to begin using this feature then they can find further details in the Smart Contracts FAQ.

Endpoints impacted

Withdrawals to smart contracts are invoked via the input_data field when creating a withdrawal request via POST /withdrawals/requests endpoint.

For EVM-compatible chains, the input_data field takes an ABI generated value.

For Solana, the input_data field must be a stringified JSON in the following format:

{  
  \"contract_call_accounts\":[  
   {	\"account\": \"73tMMfb2Y5u848jHX6kr7koH73uZABKc8KnTqfNRno7n\",
  		\"is_signer\": false,
			\"is_writeable\": true
		}
	],  
   \"contract_call_data\": \"E93ebh\"  
}

A sample call including the above format for the input_data field would look like the following:

{
"address":"73tMMfb2Y5u848jHX6kr7koH73uZABKc8KnTqfNRno7n",
"participant_code":"E93ebh",
"amount":".002",
"asset":"SOL",
"account_group":"188IMJ",
"client_withdrawal_request_id":"smart_contract_example_withdrawal_sol",
"input_data":
"{"contract_call_accounts":[{"account": "73tMMfb2Y5u848jHX6kr7koH73uZABKc8KnTqfNRno7n","is_signer": false,"is_writeable": true}], "contract_call_data": "E93ebh"}"
}

Relevant Documentation

Smart Contracts at Zero Hash