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

imp(contracts): Add contracts directory and compilation script #24

Merged
merged 27 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2d0025e
add wallets types
MalteHerrmann Aug 2, 2024
b38681a
add changelog entry
MalteHerrmann Aug 2, 2024
974b38b
use example chain ID in wallet tests
MalteHerrmann Aug 2, 2024
38442cc
add crypto package
MalteHerrmann Aug 2, 2024
3541a4d
regenerate protos
MalteHerrmann Aug 2, 2024
2ac53ca
add changelog entry
MalteHerrmann Aug 2, 2024
d12c2a3
change mention of Ethermint
MalteHerrmann Aug 2, 2024
5018c0b
adjust package imports
MalteHerrmann Aug 2, 2024
b770d55
add encoding package
MalteHerrmann Aug 2, 2024
2459447
replace import paths for encoding
MalteHerrmann Aug 2, 2024
464216d
adjust changelog
MalteHerrmann Aug 2, 2024
0928771
add rpc and kv indexer types
MalteHerrmann Aug 2, 2024
8e8303d
add changelog entry
MalteHerrmann Aug 2, 2024
81ba954
add testutil tx subpackage
MalteHerrmann Aug 4, 2024
071d933
adjust import paths and address linters
MalteHerrmann Aug 4, 2024
1eca56d
add server implementation and adjust import paths
MalteHerrmann Aug 4, 2024
0150dbc
remove unnecessary legacy import
MalteHerrmann Aug 4, 2024
88e9785
run gofumpt
MalteHerrmann Aug 4, 2024
9645496
add changelog entry
MalteHerrmann Aug 4, 2024
b465072
sort some more imports
MalteHerrmann Aug 4, 2024
217bb7d
add client, cmd and version packages
MalteHerrmann Aug 4, 2024
eee02ec
add changelog entry
MalteHerrmann Aug 4, 2024
ccc87ba
add contracts directory plus utils and compilation script
MalteHerrmann Aug 4, 2024
f3e8921
add changelog entry
MalteHerrmann Aug 4, 2024
89057fc
adjust import path
MalteHerrmann Aug 4, 2024
979cc81
Merge branch 'main' into add-contracts
MalteHerrmann Aug 6, 2024
9ea91e9
address isort linter
MalteHerrmann Aug 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This changelog was created using the `clu` binary

### Improvements

- (contracts) [#24](https://github.com/evmos/os/pull/24) Add contracts directory and compilation script.
- (cli) [#23](https://github.com/evmos/os/pull/23) Add client, cmd and version packages.
- (server) [#22](https://github.com/evmos/os/pull/22) Add server implementation.
- (rpc) [#21](https://github.com/evmos/os/pull/21) Add RPC and indexer types.
Expand Down
8 changes: 8 additions & 0 deletions contracts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Compiled contracts
artifacts/

# Cached files
cache/

# Node modules
node_modules/
30 changes: 30 additions & 0 deletions contracts/erc20.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright Tharsis Labs Ltd.(Evmos)
// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE)

package contracts

import (
_ "embed"

evmtypes "github.com/evmos/evmos/v19/x/evm/types"
contractutils "github.com/evmos/os/contracts/utils"
)

var (
// ERC20MinterBurnerDecimalsJSON are the compiled bytes of the ERC20MinterBurnerDecimalsContract
//
//go:embed solidity/ERC20MinterBurnerDecimals.json
ERC20MinterBurnerDecimalsJSON []byte

// ERC20MinterBurnerDecimalsContract is the compiled erc20 contract
ERC20MinterBurnerDecimalsContract evmtypes.CompiledContract
)

func init() {
var err error
if ERC20MinterBurnerDecimalsContract, err = contractutils.ConvertHardhatBytesToCompiledContract(
ERC20MinterBurnerDecimalsJSON,
); err != nil {
panic(err)
}
}
7 changes: 7 additions & 0 deletions contracts/hardhat.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: '0.8.19',
paths: {
sources: './solidity'
}
}
Loading
Loading