You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CONTRACT ABI
Contract ABI is a representation of a StarkNet contract. It is formatted as a JSON and describes the functions and the structs of the contracts.
You can get it via –
starknet-compile contract.cairo
--output contract_compiled.json
--abi contract_abi.json
or by executing get_code in the StarkNet CLI.
CONTRACT ABI
Contract ABI is a representation of a StarkNet contract. It is formatted as a JSON and describes the functions and the structs of the contracts.
You can get it via –
starknet-compile contract.cairo
--output contract_compiled.json
--abi contract_abi.json
or by executing get_code in the StarkNet CLI.
EXAMPLE ABI
[
{
"members": [
{
"name": "x",
"offset": 0,
"type": "felt"
},
{
"name": "y",
"offset": 1,
"type": "felt"
}
],
"name": "Point",
"size": 2,
"type": "struct"
},
{
"inputs": [
{
"name": "a_len",
"type": "felt"
},
{
"name": "a",
"type": "felt*"
}
],
"name": "constructor",
"outputs": [],
"type": "constructor"
},
{
"inputs": [
{
"name": "a_len",
"type": "felt"
},
{
"name": "a",
"type": "felt*"
},
{
"name": "b_len",
"type": "felt"
},
{
"name": "b",
"type": "felt*"
}
],
"name": "input_arrays",
"outputs": [],
"type": "function"
},
{
"inputs": [
{
"name": "array_len",
"type": "felt"
},
{
"name": "array",
"type": "felt*"
}
],
"name": "output_arrays",
"outputs": [
{
"name": "array_len",
"type": "felt"
},
{
"name": "array",
"type": "felt*"
}
],
"type": "function"
},
{
"inputs": [
{
"name": "points",
"type": "(Point, Point)"
}
],
"name": "input_output_struct",
"outputs": [
{
"name": "res",
"type": "Point"
}
],
"type": "function"
}
]
The text was updated successfully, but these errors were encountered: