Skip to content

Add custom erc20 contract to the EVM.#53

Merged
mfornet merged 4 commits into
erc20-precompilesfrom
erc20-solidity
May 6, 2021
Merged

Add custom erc20 contract to the EVM.#53
mfornet merged 4 commits into
erc20-precompilesfrom
erc20-solidity

Conversation

@mfornet
Copy link
Copy Markdown
Contributor

@mfornet mfornet commented May 5, 2021

To compile the EVM it is required to compile ERC20 first if this change is used. Do this using the following steps:

cd eth-contracts
yarn
yarn compile

This will generate relevant binary in:
eth-contracts/res/EvmErc20.bin

To compile the EVM it is required to compile ERC20 first if this change
is used. Do this using the following steps:

cd eth-contracts
yarn
yarn compile

This will generate relevant binary in:
`eth-contracts/res/EvmErc20.bin`
@mfornet mfornet requested review from artob and sept-en May 5, 2021 01:25
@artob
Copy link
Copy Markdown
Contributor

artob commented May 5, 2021

@mfornet Don't introduce new top-level directories, put eth-contracts under either src or etc.

@artob artob requested a review from joshuajbouw May 5, 2021 07:21
@mfornet
Copy link
Copy Markdown
Contributor Author

mfornet commented May 5, 2021

@mfornet Don't introduce new top-level directories, put eth-contracts under either src or etc.

Sounds good to me. Actually I was thinking if we should even keep this solidity contract here or in separate repository and only pull binary.

I figured out it is better to have it here, since it is a small contract designed for be deployed as template by the evm.

Note that this includes those bytes in the evm binary, so the size will increase considerably.

@joshuajbouw
Copy link
Copy Markdown
Contributor

Looks like CI needs to be updated to accommodate this?

@joshuajbouw
Copy link
Copy Markdown
Contributor

joshuajbouw commented May 5, 2021

@mfornet Don't introduce new top-level directories, put eth-contracts under either src or etc.

I wouldn't put it under src as those are separate compiles, etc sounds better to me.

Comment thread src/lib.rs Outdated
@mfornet mfornet requested a review from joshuajbouw May 5, 2021 11:12
@joshuajbouw
Copy link
Copy Markdown
Contributor

Check tests

@joshuajbouw
Copy link
Copy Markdown
Contributor

And lints :D

@birchmd
Copy link
Copy Markdown
Member

birchmd commented May 5, 2021

I created an issue for myself to make use of this contract in the benchmarks after it is merged instead of the generic ERC20. We might as well measure the implementation we are actually going to use.

@artob artob added the C-enhancement Category: New feature or request label May 5, 2021
@artob
Copy link
Copy Markdown
Contributor

artob commented May 5, 2021

@mfornet Looking forward to merging this. Please reassign to me once CI is showing green and it's ready to go.

@mfornet
Copy link
Copy Markdown
Contributor Author

mfornet commented May 5, 2021

@mfornet Looking forward to merging this. Please reassign to me once CI is showing green and it's ready to go.

@artob notice I'm merging this into #51 which is not ready.

@mfornet mfornet assigned artob and unassigned mfornet May 5, 2021
@artob
Copy link
Copy Markdown
Contributor

artob commented May 6, 2021

And lints :D

Let's be clear that these precompiles are blockers for implementing and validating the connectors and hence blockers the release, and nice-to-haves like lints are a low priority right now.

Copy link
Copy Markdown
Contributor

@joshuajbouw joshuajbouw left a comment

Choose a reason for hiding this comment

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

Looks good.

@mfornet mfornet merged commit 98bce50 into erc20-precompiles May 6, 2021
@mfornet mfornet deleted the erc20-solidity branch May 6, 2021 15:10
mfornet added a commit that referenced this pull request May 6, 2021
* Add custom erc20 contract to the EVM.

To compile the EVM it is required to compile ERC20 first if this change
is used. Do this using the following steps:

cd eth-contracts
yarn
yarn compile

This will generate relevant binary in:
`eth-contracts/res/EvmErc20.bin`

* Move eth contract to etc and update Makefile

* Fix CI

* Add lint
mfornet added a commit that referenced this pull request May 6, 2021
* Add custom erc20 contract to the EVM.

To compile the EVM it is required to compile ERC20 first if this change
is used. Do this using the following steps:

cd eth-contracts
yarn
yarn compile

This will generate relevant binary in:
`eth-contracts/res/EvmErc20.bin`

* Move eth contract to etc and update Makefile

* Fix CI

* Add lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement Category: New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants