diff --git a/api/service/staking/service.go b/api/service/staking/service.go index 42acd142d..b6cc132ea 100644 --- a/api/service/staking/service.go +++ b/api/service/staking/service.go @@ -19,9 +19,9 @@ import ( proto_common "github.com/harmony-one/harmony/api/proto" "github.com/harmony-one/harmony/api/proto/message" msg_pb "github.com/harmony-one/harmony/api/proto/message" + "github.com/harmony-one/harmony/common/denominations" "github.com/harmony-one/harmony/contracts" "github.com/harmony-one/harmony/core" - "github.com/harmony-one/harmony/core/denominations" "github.com/harmony-one/harmony/core/types" hmykey "github.com/harmony-one/harmony/internal/keystore" "github.com/harmony-one/harmony/internal/utils" diff --git a/cmd/client/txgen/main.go b/cmd/client/txgen/main.go index 296be5666..575257339 100644 --- a/cmd/client/txgen/main.go +++ b/cmd/client/txgen/main.go @@ -22,7 +22,7 @@ import ( "github.com/harmony-one/harmony/api/client" proto_node "github.com/harmony-one/harmony/api/proto/node" - "github.com/harmony-one/harmony/core/denominations" + "github.com/harmony-one/harmony/common/denominations" "github.com/harmony-one/harmony/core/types" "github.com/harmony-one/harmony/crypto/bls" nodeconfig "github.com/harmony-one/harmony/internal/configs/node" diff --git a/common/denominations/denominations.go b/common/denominations/denominations.go new file mode 100644 index 000000000..37f2557c0 --- /dev/null +++ b/common/denominations/denominations.go @@ -0,0 +1,8 @@ +package denominations + +//ONE Units +const ( + Wei = 1 + GWei = 1e9 + One = 1e18 +) diff --git a/consensus/consensus.go b/consensus/consensus.go index 06d0d10e4..18ceb8fd0 100644 --- a/consensus/consensus.go +++ b/consensus/consensus.go @@ -9,9 +9,9 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/log" "github.com/harmony-one/bls/ffi/go/bls" + "github.com/harmony-one/harmony/common/denominations" consensus_engine "github.com/harmony-one/harmony/consensus/engine" "github.com/harmony-one/harmony/contracts/structs" - "github.com/harmony-one/harmony/core/denominations" "github.com/harmony-one/harmony/core/state" "github.com/harmony-one/harmony/core/types" bls_cosi "github.com/harmony-one/harmony/crypto/bls" diff --git a/core/tx_pool_test.go b/core/tx_pool_test.go index 48b2ae684..c0583791b 100644 --- a/core/tx_pool_test.go +++ b/core/tx_pool_test.go @@ -31,7 +31,7 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/params" - "github.com/harmony-one/harmony/core/denominations" + "github.com/harmony-one/harmony/common/denominations" "github.com/harmony-one/harmony/core/state" "github.com/harmony-one/harmony/core/types" ) diff --git a/node/contract.go b/node/contract.go index 9aad8813d..c371b40f1 100644 --- a/node/contract.go +++ b/node/contract.go @@ -12,9 +12,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + "github.com/harmony-one/harmony/common/denominations" "github.com/harmony-one/harmony/contracts" "github.com/harmony-one/harmony/contracts/structs" - "github.com/harmony-one/harmony/core/denominations" "github.com/harmony-one/harmony/core/types" "github.com/harmony-one/harmony/internal/utils" contract_constants "github.com/harmony-one/harmony/internal/utils/contract" diff --git a/node/node_genesis.go b/node/node_genesis.go index 4735bd57d..4f54ff2df 100644 --- a/node/node_genesis.go +++ b/node/node_genesis.go @@ -12,8 +12,8 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/pkg/errors" + "github.com/harmony-one/harmony/common/denominations" "github.com/harmony-one/harmony/core" - "github.com/harmony-one/harmony/core/denominations" "github.com/harmony-one/harmony/core/rawdb" "github.com/harmony-one/harmony/core/types" "github.com/harmony-one/harmony/internal/ctxerror" diff --git a/node/worker/worker_test.go b/node/worker/worker_test.go index b01baca19..d714c297c 100644 --- a/node/worker/worker_test.go +++ b/node/worker/worker_test.go @@ -8,9 +8,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/params" + "github.com/harmony-one/harmony/common/denominations" "github.com/harmony-one/harmony/consensus" "github.com/harmony-one/harmony/core" - "github.com/harmony-one/harmony/core/denominations" "github.com/harmony-one/harmony/core/types" "github.com/harmony-one/harmony/core/vm" )