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

chore: test cases for smart contracts #119

Merged
merged 2 commits into from
Feb 8, 2024
Merged

Conversation

nakul1010
Copy link
Contributor

@nakul1010 nakul1010 commented Dec 18, 2023

The PR makes the following changes

  • Add test cases of light relay.
  • Add missing test cases for the ordinals marketplace
  • Add test cases for bitcoin utils

Closes #90

@nakul1010 nakul1010 self-assigned this Dec 18, 2023
Copy link

vercel bot commented Dec 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bob ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2024 11:32am

@nakul1010 nakul1010 force-pushed the nakul/chore_testcases branch from 3393846 to f2ef372 Compare December 18, 2023 07:09
@nakul1010 nakul1010 changed the title (WIP)chore: test cases for relay. chore: test cases for relay. Dec 18, 2023
@nakul1010 nakul1010 changed the title chore: test cases for relay. chore: test cases for relay Dec 18, 2023
@nakul1010 nakul1010 changed the title chore: test cases for relay (WIP) chore: test cases for relay Dec 21, 2023
@nakul1010 nakul1010 changed the title (WIP) chore: test cases for relay chore: test cases for relay Dec 21, 2023
@nakul1010 nakul1010 removed the request for review from peterslany December 21, 2023 08:43
@nakul1010 nakul1010 changed the base branch from master to nakul/fix_contract_docs_git_src December 21, 2023 08:43
@nakul1010 nakul1010 changed the base branch from nakul/fix_contract_docs_git_src to master December 21, 2023 08:43
@nakul1010 nakul1010 changed the title chore: test cases for relay (WIP)chore: test cases for smart contracts Jan 2, 2024
@nakul1010 nakul1010 changed the title (WIP)chore: test cases for smart contracts chore: test cases for smart contracts Jan 2, 2024
hex"16001493adab0a7a8cb7675db135c9c97e81942025c2c9"
)
);
// [FAIL. Reason: EvmError: OutOfGas] (gas: 9223372036854754743)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

during debugging found out that, this happens because the outputLength calculations emit a huge value since the wrong output is given.
Therefore the assembly calculation here exhausts the gas.
Not sure want to handle this, as the estimated gas field will show a huge value if the inputs are wrong.

foundry.toml Outdated Show resolved Hide resolved
test/BitcoinTx.t.sol Outdated Show resolved Hide resolved
test/BitcoinTx.t.sol Outdated Show resolved Hide resolved
Copy link
Contributor

@gregdhill gregdhill left a comment

Choose a reason for hiding this comment

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

Good job @nakul1010!

@nakul1010 nakul1010 force-pushed the nakul/chore_testcases branch from 45faf2d to d9c4ff5 Compare February 8, 2024 11:26
…akul/chore_testcases

# Conflicts:
#	test/LightRelay.t.sol
#	test/swap/Ord_Marketplace.t.sol
@nakul1010 nakul1010 merged commit 431e389 into master Feb 8, 2024
3 checks passed
@nakul1010 nakul1010 deleted the nakul/chore_testcases branch February 8, 2024 11:35
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.

Finalize contracts and add more examples
2 participants