Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

change photon to aphoton #476

Merged
merged 6 commits into from
Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 1 addition & 1 deletion app/ante/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (emfd EthMempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
minGasPrices := ctx.MinGasPrices()

// check that fee provided is greater than the minimum
// NOTE: we only check if photons are present in min gas prices. It is up to the
// NOTE: we only check if aphotons are present in min gas prices. It is up to the
// sender if they want to send additional fees in other denominations.
var hasEnoughFees bool
if fee.Amount.GTE(minGasPrices.AmountOf(emint.DenomDefault)) {
Expand Down
2 changes: 1 addition & 1 deletion client/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Note, strict routability for addresses is turned off in the config file.`,
cmd.Flags().String(flagNodeCLIHome, "ethermintcli", "Home directory of the node's cli configuration")
cmd.Flags().String(flagStartingIPAddress, "192.168.0.1", "Starting IP address (192.168.0.1 results in persistent peers list [email protected]:46656, [email protected]:46656, ...)")
cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created")
cmd.Flags().String(server.FlagMinGasPrices, fmt.Sprintf("0.000006%s", types.DenomDefault), "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.01photon,0.001stake)")
cmd.Flags().String(server.FlagMinGasPrices, fmt.Sprintf("0.000006%s", types.DenomDefault), "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.01aphoton,0.001stake)")
cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|test)")
cmd.Flags().String(flagKeyAlgo, string(crypto.EthSecp256k1), "Key signing algorithm to generate keys for")
return cmd
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/metamask.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ethermintcli keys unsafe-export-eth-key mykey
Go back to the browser and select the `Private Key` option. Then paste the private key exported from
the `unsafe-export-eth-key` command.

Your account balance should show up as `1 PHOTON` and do transfers as usual.
Your account balance should show up as `1 aphoton` and do transfers as usual.
J-Thompson12 marked this conversation as resolved.
Show resolved Hide resolved

::: tip
If it takes some time to load the balance of the account, change the network to `Main Ethereum
Expand All @@ -63,4 +63,4 @@ to see metamask logs, go to top right circle -> settings -> advanced -> download

## Known issues

Currently, it's not possible to add custom tokens (even for Photons) unless you deploy a token contract (eg: ERC20).
Currently, it's not possible to add custom tokens (even for aphotons) unless you deploy a token contract (eg: ERC20).
J-Thompson12 marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 3 additions & 3 deletions docs/quickstart/testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ You can edit the `$HOME/.ethermintd/config/app.toml` file in order to enable the

# The minimum gas prices a validator is willing to accept for processing a
# transaction. A transaction's fees must meet the minimum of any denomination
# specified in this config (e.g. 10photon).
# specified in this config (e.g. 10aphoton).

minimum-gas-prices = ""
```
Expand All @@ -62,7 +62,7 @@ ethermintcli keys add $KEY
# Add that key into the genesis.app_state.accounts array in the genesis file
# NOTE: this command lets you set the number of coins. Make sure this account has some coins
# with the genesis.app_state.staking.params.bond_denom denom, the default is staking
ethermintd add-genesis-account $(ethermintcli keys show validator -a) 1000000000stake,10000000000photon
ethermintd add-genesis-account $(ethermintcli keys show validator -a) 1000000000stake,10000000000aphoton

# Generate the transaction that creates your validator
ethermintd gentx --name $KEY
Expand Down Expand Up @@ -319,7 +319,7 @@ Once the ethermint daemon is up and running, you can request tokens to your addr
ethermintcli q bank balances $(ethermintcli keys show <mykey> -a)

# send a tx to request tokens to your account address
ethermintcli tx faucet request 100photon --from <mykey>
ethermintcli tx faucet request 100aphoton --from <mykey>

# query your balance after the request
ethermintcli q bank balances $(ethermintcli keys show <mykey> -a)
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart/validator-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To create your validator, just use the following command:

```bash
ethermintcli tx staking create-validator \
--amount=1000000photon \
--amount=1000000aphoton \
--pubkey=$(ethermintd tendermint show-validator) \
--moniker=<ethermint_validator> \
--chain-id=<chain_id> \
Expand All @@ -51,7 +51,7 @@ When specifying commission parameters, the `commission-max-change-rate` is used
:::

::: tip
`Min-self-delegation` is a stritly positive integer that represents the minimum amount of self-delegated voting power your validator must always have. A `min-self-delegation` of 1 means your validator will never have a self-delegation lower than `1000000photon`
`Min-self-delegation` is a stritly positive integer that represents the minimum amount of self-delegated voting power your validator must always have. A `min-self-delegation` of 1 means your validator will never have a self-delegation lower than `1000000aphoton`
:::

You can confirm that you are in the validator set by using a third party explorer.
Expand Down
4 changes: 2 additions & 2 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ethermintcli keys add $KEY
ethermintd init $MONIKER --chain-id $CHAINID

# Allocate genesis accounts (cosmos formatted addresses)
ethermintd add-genesis-account $(ethermintcli keys show $KEY -a) 1000000000000000000photon,1000000000000000000stake
ethermintd add-genesis-account $(ethermintcli keys show $KEY -a) 1000000000000000000aphoton,1000000000000000000stake

# Sign genesis transaction
ethermintd gentx --name $KEY --keyring-backend test
Expand All @@ -37,7 +37,7 @@ cat $HOME/.ethermintd/config/genesis.json | jq '.app_state["faucet"]["enable_fa

echo -e '\n\ntestnet faucet enabled'
echo -e 'to transfer tokens to your account address use:'
echo -e "ethermintcli tx faucet request 100photon --from $KEY\n"
echo -e "ethermintcli tx faucet request 100aphoton --from $KEY\n"


# Run this to ensure everything worked and that the genesis file is setup correctly
Expand Down
2 changes: 1 addition & 1 deletion scripts/integration-test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ init_func() {
"$PWD"/build/ethermintcli config trust-node true --home "$DATA_CLI_DIR$i"
echo "prepare genesis: Allocate genesis accounts"
"$PWD"/build/ethermintd add-genesis-account \
"$("$PWD"/build/ethermintcli keys show "$KEY$i" -a --home "$DATA_CLI_DIR$i" )" 1000000000000000000photon,1000000000000000000stake \
"$("$PWD"/build/ethermintcli keys show "$KEY$i" -a --home "$DATA_CLI_DIR$i" )" 1000000000000000000aphoton,1000000000000000000stake \
--home "$DATA_DIR$i" --home-client "$DATA_CLI_DIR$i"
echo "prepare genesis: Sign genesis transaction"
"$PWD"/build/ethermintd gentx --name $KEY"$i" --keyring-backend test --home "$DATA_DIR$i" --home-client "$DATA_CLI_DIR$i"
Expand Down
2 changes: 1 addition & 1 deletion types/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (acc EthAccount) Balance() sdk.Int {
return acc.GetCoins().AmountOf(DenomDefault)
}

// SetBalance sets an account's balance of photons
// SetBalance sets an account's balance of aphotons
func (acc *EthAccount) SetBalance(amt sdk.Int) {
coins := acc.GetCoins()
diff := amt.Sub(coins.AmountOf(DenomDefault))
Expand Down
2 changes: 1 addition & 1 deletion types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ const (

// DenomDefault defines the single coin type/denomination supported in
// Ethermint.
DenomDefault = "photon"
DenomDefault = "aphoton"
)
4 changes: 2 additions & 2 deletions x/evm/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func GetTxCmd(cdc *codec.Codec) *cobra.Command {
// GetCmdSendTx generates an Ethermint transaction (excludes create operations)
func GetCmdSendTx(cdc *codec.Codec) *cobra.Command {
return &cobra.Command{
Use: "send [to_address] [amount (in photons)] [<data>]",
Use: "send [to_address] [amount (in aphotons)] [<data>]",
Short: "send transaction to address (call operations included)",
Args: cobra.RangeArgs(2, 3),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -104,7 +104,7 @@ func GetCmdSendTx(cdc *codec.Codec) *cobra.Command {
// GetCmdGenCreateTx generates an Ethermint transaction (excludes create operations)
func GetCmdGenCreateTx(cdc *codec.Codec) *cobra.Command {
return &cobra.Command{
Use: "create [contract bytecode] [<amount (in photons)>]",
Use: "create [contract bytecode] [<amount (in aphotons)>]",
Short: "create contract through the evm using compiled bytecode",
Args: cobra.RangeArgs(1, 2),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down