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

VM: Update run-solidity-contract example #1104

Merged
merged 1 commit into from
Feb 12, 2021
Merged

Conversation

ryanio
Copy link
Contributor

@ryanio ryanio commented Feb 12, 2021

This PR:

  • replaces ethereumjs-abi (deprecated) with @ethersproject/abi (closes VM: Update run-solidty example to use Ethers ABI Encoder #1098)
  • upgrades solc version
    • fixes some new warnings for contract:
      • upgrades solidity version
      • adds SPDX-License-Identifier
      • removes visibility identifier from constructor (public is default)

To test, cd into packages/vm/examples/run-solidity-contract and run npm i && npm run example

The output should look like this:

> run-solidity-contract@ example /Users/rg/dev/ethereumjs-monorepo/packages/vm/examples/run-solidity-contract
> ts-node index.ts

Account: 0xbe862ad9abfe6f22bcb087716c7d89a26051f74c
Set account a balance of 1 ETH
Compiling...
Compiled the contract
Deploying the contract...
Contract address: 0x61de9dc6f6cff1df2809480882cfd3c2364b28f7
Greeting: Hello, World!
Changing greeting...
Greeting: Hola, Mundo!
Everything run correctly!

  * replace ethereumjs-abi with @ethersproject/abi
  * upgrade solc version
@codecov
Copy link

codecov bot commented Feb 12, 2021

Codecov Report

Merging #1104 (6f9d570) into master (139d90e) will increase coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

Flag Coverage Δ
block 81.40% <ø> (+0.14%) ⬆️
blockchain 83.44% <ø> (-0.08%) ⬇️
client 86.85% <ø> (+0.20%) ⬆️
common 86.34% <ø> (ø)
devp2p 84.25% <ø> (ø)
ethash 82.08% <ø> (ø)
tx 91.93% <ø> (-0.13%) ⬇️
vm 82.32% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@alcuadrado
Copy link
Member

Great that you updated this! I send people to this example from time to time.

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Works like a charm, very cool! 😄

@ryanio ryanio merged commit 93ae8f5 into master Feb 12, 2021
@ryanio ryanio deleted the update-solidity-example branch February 12, 2021 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VM: Update run-solidty example to use Ethers ABI Encoder
3 participants