Skip to content

Commit

Permalink
Handle ERROR cells in parent graph computation (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter authored Oct 23, 2023
1 parent 6ac3961 commit ca20b41
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion packages/starksheet-solidity/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ eth_rpc_url = "anvil"
[profile.docker]
eth_rpc_url = "docker"

[profile.linea]
eth_rpc_url = "linea"

[rpc_endpoints]
mainnet = "https://mainnet.infura.io/v3/${INFURA_KEY}"
linea = "https://linea-mainnet.infura.io/v3/${INFURA_KEY}"
Expand All @@ -33,4 +36,5 @@ kakarot = "http://127.0.0.1:3030"
docker = "${RPC_URL}"

[etherscan]
goerli = { key = "${ETHERSCAN_API_KEY}" }
goerli = { key = "${GOERLI_EXPLORER_KEY}" }
linea = { key = "${LINEA_EXPLORER_KEY}" }
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ function ComputedCell({ cell }: ComputedCellProps) {
const id = useMemo(() => cell.id, [cell]);
const [cellSettings, setCellSettings] = useLocalStorage(
`${selectedSheetAddress}.${id}`,
{}
{},
);
const selected = useMemo(() => id === selectedCell, [selectedCell, id]);
const isInvoke = useMemo(() => {
if (cell.error) {
return false;
}

if (
!!cell.abi &&
((Object.hasOwn(cell.abi, "state_mutability") &&
Expand All @@ -59,7 +63,7 @@ function ComputedCell({ cell }: ComputedCellProps) {
((Object.hasOwn(_cell.abi, "state_mutability") &&
_cell.abi?.state_mutability === "external") ||
(!Object.hasOwn(_cell.abi, "state_mutability") &&
_cell.abi.stateMutability === undefined))
_cell.abi.stateMutability === undefined)),
);
}, [cell, currentCells, id, buildParents]);

Expand Down

0 comments on commit ca20b41

Please sign in to comment.