Skip to content

Support value in deployContract function - #822

Merged
jxom merged 4 commits into
wevm:mainfrom
RielJ:main
Jul 1, 2023
Merged

jxom merged 4 commits into
wevm:mainfrom
RielJ:main

Conversation

@RielJ

@RielJ RielJ commented Jun 30, 2023 •

Copy link
Copy Markdown
Contributor

This allows having a value in the parameters of deployContract function.


PR-Codex overview

Focus of the PR:

Add ability to send value to a contract when deploying it.

Detailed summary:

  • Added the ability to pass a value parameter to the deployContract function in the wallet/deployContract.ts file.
  • Updated the SendTransactionParameters type in the deployContract.ts file to include the value parameter.
  • Added a new test in the deployContract.test.ts file to test sending value to a contract.
  • Imported the payableContractConfig object in the deployContract.test.ts file.
  • Imported the getBalance function in the deployContract.test.ts file.
  • Updated the test to set the balance of the test client's account.
  • Updated the test to deploy the contract with a specified value.
  • Added an assertion to check that the balance of the test client's account is less than the specified value after deploying the contract.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot

changeset-bot Bot commented Jun 30, 2023 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b58aecb

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 30, 2023

Copy link
Copy Markdown

@RielJ is attempting to deploy a commit to the wagmi Team on Vercel.

A member of the Team first needs to authorize it.

@RielJ

RielJ commented Jun 30, 2023

Copy link
Copy Markdown
Contributor Author

This potentially solves this discussion.

@tmm tmm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Mind adding a changeset (pnpm changeset)?

@vercel

vercel Bot commented Jun 30, 2023 •

Copy link
Copy Markdown

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

Name Status Preview Updated (UTC)
viem ✅ Ready (Inspect) Visit Preview Jun 30, 2023 8:18pm

@codecov

codecov Bot commented Jun 30, 2023 •

Copy link
Copy Markdown

Codecov Report

Merging #822 (97d0e79) into main (ee93ca4) will decrease coverage by 4.63%.
The diff coverage is 100.00%.

❗ Current head 97d0e79 differs from pull request most recent head b58aecb. Consider uploading reports for the commit b58aecb to get more accurate results

@@            Coverage Diff             @@
##             main     #822      +/-   ##
==========================================
- Coverage   99.78%   95.15%   -4.63%     
==========================================
  Files         255      252       -3     
  Lines       24460    24293     -167     
  Branches     2171     1864     -307     
==========================================
- Hits        24407    23117    -1290     
- Misses         50     1165    +1115     
- Partials        3       11       +8     
Impacted Files Coverage Δ
src/actions/wallet/deployContract.ts 100.00% <100.00%> (ø)

... and 51 files with indirect coverage changes

@RielJ

RielJ commented Jun 30, 2023

Copy link
Copy Markdown
Contributor Author

@tmm hello, I amended the changeset to the previous commit, can you check it out if it's fine?.

@jxom
jxom merged commit 9a1e42b into wevm:main Jul 1, 2023
@github-actions github-actions Bot mentioned this pull request Jul 1, 2023
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.

3 participants