Skip to content

Commit

Permalink
dev: add sepolia to the list of testnets (kkrt-labs#1051)
Browse files Browse the repository at this point in the history
<!--- Please provide a general summary of your changes in the title
above -->

<!-- Give an estimate of the time you spent on this PR in terms of work
days.
Did you spend 0.5 days on this PR or rather 2 days?  -->

Time spent on this PR: 0.5 day

## Pull request type

<!-- Please try to limit your pull request to one type,
submit multiple pull requests if needed. -->

Please check the type of change your PR introduces:

- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?
Missing sepolia to the list of testnets
<!-- Please describe the current behavior that you are modifying,
or link to a relevant issue. -->

Resolves #NA

## What is the new behavior?
Add sepolia to the list of testnets.

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/kkrt-labs/kakarot/1051)
<!-- Reviewable:end -->
  • Loading branch information
greged93 authored Mar 29, 2024
1 parent 21a51d4 commit da76e0e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
13 changes: 11 additions & 2 deletions kakarot_scripts/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,22 @@
"devnet": False,
"chain_id": StarknetChainId.MAINNET,
},
"testnet": {
"name": "testnet",
"goerli": {
"name": "starknet-goerli",
"explorer_url": "https://testnet.starkscan.co",
"rpc_url": f"https://starknet-goerli.infura.io/v3/{os.getenv('INFURA_KEY')}",
"devnet": False,
"chain_id": StarknetChainId.GOERLI,
},
"sepolia": {
"name": "starknet-sepolia",
"explorer_url": "https://sepolia.starkscan.co/",
"rpc_url": f"https://starknet-sepolia.infura.io/v3/{os.getenv('INFURA_KEY')}",
"devnet": False,
"chain_id": StarknetChainId.SEPOLIA_TESTNET,
"check_interval": 5,
"max_wait": 30,
},
"starknet-devnet": {
"name": "starknet-devnet",
"explorer_url": "",
Expand Down
1 change: 1 addition & 0 deletions kakarot_scripts/utils/kakarot.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ async def _wrapper(self, *args, **kwargs):
async def _contract_exists(address: int) -> bool:
try:
await RPC_CLIENT.get_class_hash_at(address)
logger.info(f"ℹ️ Contract at address {hex(address)} already exists")
return True
except ClientError:
return False
Expand Down
2 changes: 1 addition & 1 deletion kakarot_scripts/utils/starknet.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async def get_starknet_account(
"Client failed with code 40: Contract error." in message
or "Client failed with code 40: Requested entry point was not found."
in message
or "Client failed with code 21: Invalid message selector." in message
or "Invalid message selector." in message
or "StarknetErrorCode.ENTRY_POINT_NOT_FOUND_IN_CONTRACT" in message
or ("code 40" in message and "not found in contract" in message)
):
Expand Down

0 comments on commit da76e0e

Please sign in to comment.