Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: remove reduntant assigment of test_environment variable #568

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

bajpai244
Copy link
Contributor

Resolves: #567

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Testing

What is the new behavior?

  • removes reduntant re-assignment of test_environment variable.

Does this introduce a breaking change?

  • Yes
  • No

@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Patch coverage: 83.43% and project coverage change: +49.61% 🎉

Comparison is base (71506a8) 23.17% compared to head (5bc4bde) 72.78%.
Report is 222 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #568       +/-   ##
===========================================
+ Coverage   23.17%   72.78%   +49.61%     
===========================================
  Files           9       45       +36     
  Lines        1247     4061     +2814     
===========================================
+ Hits          289     2956     +2667     
- Misses        958     1105      +147     
Files Changed Coverage Δ
crates/core/src/mock/serde.rs 0.00% <0.00%> (ø)
crates/core/src/models/transaction.rs 93.63% <ø> (ø)
crates/core/src/models/transaction_receipt.rs 97.02% <ø> (ø)
crates/eth-rpc/src/api/alchemy_api.rs 100.00% <ø> (ø)
crates/eth-rpc/src/api/eth_api.rs 100.00% <ø> (ø)
crates/eth-rpc/src/api/net_api.rs 100.00% <ø> (ø)
crates/eth-rpc/src/api/web3_api.rs 100.00% <ø> (ø)
crates/eth-rpc/src/config.rs 100.00% <ø> (ø)
crates/eth-rpc/src/lib.rs 93.33% <ø> (ø)
crates/eth-rpc/src/main.rs 0.00% <ø> (ø)
... and 29 more

... and 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Eikix Eikix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Eikix Eikix added this pull request to the merge queue Sep 14, 2023
Merged via the queue into kkrt-labs:main with commit 2292c1b Sep 14, 2023
9 checks passed
anukkrit149 pushed a commit to karnotxyz/kakarot-rpc that referenced this pull request Aug 9, 2024
…-labs#569)

Fix the address to be hex inside the fund_address function when the
input is of type int and the network is devnet.



## Pull request type: fix

Please check the type of change your PR introduces:

- [x] Bugfix
- [ ] 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?

Upon investigating kkrt-labs#568 , I found that the following function calls are
involved:
- deploy_and_fund_evm_address 
- fund_address

When we investigate fund_address, the following code snippet is where
the error comes from:

```python
 address = int(address, 16) if isinstance(address, str) else address
    amount = amount * 1e18
    if NETWORK == "devnet":
        response = requests.post(
            f"{GATEWAY_CLIENT.net}/mint", json={"address": address, "amount": amount}
        )
        if response.status_code != 200:
            logger.error(f"Cannot mint token to {address}: {response.text}")
        logger.info(f"{amount / 1e18} ETH minted to {address}")
```

the address is expected to be a hex string, and since it is not we get
the error described in kkrt-labs#568.

Resolves <kkrt-labs/kakarot#568>

## What is the new behavior?

In the new behavior, if the type is *int*, then we call **hex()** to it,
to convert it into a hex string.

Co-authored-by: Harsh Bajpai <harshbajpai@Harshs-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid reassignment of test_environment when we deploy evm contracts
2 participants