Merge pull request #936 from cosmos/adrian/steak
Change fermion to steak
This commit is contained in:
commit
c8a39af038
|
@ -369,9 +369,9 @@ func TestIBCMsgs(t *testing.T) {
|
|||
func TestStakeMsgs(t *testing.T) {
|
||||
gapp := newGaiaApp()
|
||||
|
||||
genCoins, err := sdk.ParseCoins("42fermion")
|
||||
genCoins, err := sdk.ParseCoins("42steak")
|
||||
require.Nil(t, err)
|
||||
bondCoin, err := sdk.ParseCoin("10fermion")
|
||||
bondCoin, err := sdk.ParseCoin("10steak")
|
||||
require.Nil(t, err)
|
||||
|
||||
acc1 := &auth.BaseAccount{
|
||||
|
|
|
@ -146,11 +146,11 @@ func GaiaAppGenState(cdc *wire.Codec, appGenTxs []json.RawMessage) (appState jso
|
|||
return
|
||||
}
|
||||
|
||||
// create the genesis account, give'm few fermions and a buncha token with there name
|
||||
// create the genesis account, give'm few steaks and a buncha token with there name
|
||||
accAuth := auth.NewBaseAccountWithAddress(genTx.Address)
|
||||
accAuth.Coins = sdk.Coins{
|
||||
{genTx.Name + "Token", 1000},
|
||||
{"fermion", freeFermionsAcc},
|
||||
{"steak", freeFermionsAcc},
|
||||
}
|
||||
acc := NewGenesisAccount(&accAuth)
|
||||
genaccs[i] = acc
|
||||
|
|
|
@ -39,15 +39,15 @@ func TestGaiaCLISend(t *testing.T) {
|
|||
barAddr, _ := executeGetAddrPK(t, "gaiacli keys show bar --output=json")
|
||||
|
||||
fooAcc := executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", fooAddr, flags))
|
||||
assert.Equal(t, int64(50), fooAcc.GetCoins().AmountOf("fermion"))
|
||||
assert.Equal(t, int64(50), fooAcc.GetCoins().AmountOf("steak"))
|
||||
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10fermion --to=%v --name=foo", flags, barAddr), pass)
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10steak --to=%v --name=foo", flags, barAddr), pass)
|
||||
time.Sleep(time.Second * 3) // waiting for some blocks to pass
|
||||
|
||||
barAcc := executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", barAddr, flags))
|
||||
assert.Equal(t, int64(10), barAcc.GetCoins().AmountOf("fermion"))
|
||||
assert.Equal(t, int64(10), barAcc.GetCoins().AmountOf("steak"))
|
||||
fooAcc = executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", fooAddr, flags))
|
||||
assert.Equal(t, int64(40), fooAcc.GetCoins().AmountOf("fermion"))
|
||||
assert.Equal(t, int64(40), fooAcc.GetCoins().AmountOf("steak"))
|
||||
}
|
||||
|
||||
func TestGaiaCLIDeclareCandidacy(t *testing.T) {
|
||||
|
@ -70,26 +70,26 @@ func TestGaiaCLIDeclareCandidacy(t *testing.T) {
|
|||
fooAddr, _ := executeGetAddrPK(t, "gaiacli keys show foo --output=json")
|
||||
barAddr, barPubKey := executeGetAddrPK(t, "gaiacli keys show bar --output=json")
|
||||
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10fermion --to=%v --name=foo", flags, barAddr), pass)
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10steak --to=%v --name=foo", flags, barAddr), pass)
|
||||
time.Sleep(time.Second * 3) // waiting for some blocks to pass
|
||||
|
||||
fooAcc := executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", fooAddr, flags))
|
||||
assert.Equal(t, int64(40), fooAcc.GetCoins().AmountOf("fermion"))
|
||||
assert.Equal(t, int64(40), fooAcc.GetCoins().AmountOf("steak"))
|
||||
barAcc := executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", barAddr, flags))
|
||||
assert.Equal(t, int64(10), barAcc.GetCoins().AmountOf("fermion"))
|
||||
assert.Equal(t, int64(10), barAcc.GetCoins().AmountOf("steak"))
|
||||
|
||||
// declare candidacy
|
||||
declStr := fmt.Sprintf("gaiacli declare-candidacy %v", flags)
|
||||
declStr += fmt.Sprintf(" --name=%v", "bar")
|
||||
declStr += fmt.Sprintf(" --address-candidate=%v", barAddr)
|
||||
declStr += fmt.Sprintf(" --pubkey=%v", barPubKey)
|
||||
declStr += fmt.Sprintf(" --amount=%v", "3fermion")
|
||||
declStr += fmt.Sprintf(" --amount=%v", "3steak")
|
||||
declStr += fmt.Sprintf(" --moniker=%v", "bar-vally")
|
||||
fmt.Printf("debug declStr: %v\n", declStr)
|
||||
executeWrite(t, declStr, pass)
|
||||
time.Sleep(time.Second) // waiting for some blocks to pass
|
||||
barAcc = executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", barAddr, flags))
|
||||
assert.Equal(t, int64(7), barAcc.GetCoins().AmountOf("fermion"))
|
||||
assert.Equal(t, int64(7), barAcc.GetCoins().AmountOf("steak"))
|
||||
candidate := executeGetCandidate(t, fmt.Sprintf("gaiacli candidate %v --address-candidate=%v", flags, barAddr))
|
||||
assert.Equal(t, candidate.Address.String(), barAddr)
|
||||
assert.Equal(t, int64(3), candidate.Assets.Evaluate())
|
||||
|
@ -106,7 +106,7 @@ func TestGaiaCLIDeclareCandidacy(t *testing.T) {
|
|||
//executeWrite(t, unbondStr, pass)
|
||||
//time.Sleep(time.Second * 3) // waiting for some blocks to pass
|
||||
//barAcc = executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", barAddr, flags))
|
||||
//assert.Equal(t, int64(99998), barAcc.GetCoins().AmountOf("fermion"))
|
||||
//assert.Equal(t, int64(99998), barAcc.GetCoins().AmountOf("steak"))
|
||||
//candidate = executeGetCandidate(t, fmt.Sprintf("gaiacli candidate %v --address-candidate=%v", flags, barAddr))
|
||||
//assert.Equal(t, int64(2), candidate.Assets.Evaluate())
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ Get Tokens
|
|||
If you haven't already `created a key <../key-management.html>`__,
|
||||
do so now. Copy your key's address and enter it into
|
||||
`this utility <http://www.cosmosvalidators.com/>`__ which will send you
|
||||
some ``fermion`` testnet tokens.
|
||||
some ``steak`` testnet tokens.
|
||||
|
||||
Get Files
|
||||
---------
|
||||
|
@ -59,6 +59,6 @@ and check our balance:
|
|||
|
||||
Where ``$MYADDR`` is the address originally generated by ``gaia keys new bob``.
|
||||
|
||||
You are now ready to declare candidacy or delegate some fermions. See the
|
||||
You are now ready to declare candidacy or delegate some steaks. See the
|
||||
`staking module overview <./staking-module.html>`__ for more information
|
||||
on using the ``gaia client``.
|
||||
|
|
|
@ -547,7 +547,7 @@ components:
|
|||
properties:
|
||||
denom:
|
||||
type: string
|
||||
example: fermion
|
||||
example: steak
|
||||
amount:
|
||||
type: number
|
||||
example: 50
|
||||
|
|
|
@ -107,7 +107,7 @@ The ``genesis.json`` should look something like:
|
|||
"address": "1D9B2356CAADF46D3EE3488E3CCE3028B4283DEE",
|
||||
"coins": [
|
||||
{
|
||||
"denom": "fermion",
|
||||
"denom": "steak",
|
||||
"amount": 100000
|
||||
}
|
||||
]
|
||||
|
@ -150,7 +150,7 @@ The ``genesis.json`` should look something like:
|
|||
"denom": 100
|
||||
},
|
||||
"max_validators": 100,
|
||||
"bond_denom": "fermion"
|
||||
"bond_denom": "steak"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -46,13 +46,13 @@ Nice. We can also lookup the validator set:
|
|||
|
||||
gaiacli validatorset
|
||||
|
||||
Then, we try to transfer some ``fermion`` to another account:
|
||||
Then, we try to transfer some ``steak`` to another account:
|
||||
|
||||
::
|
||||
|
||||
gaiacli account <FOO-ADDR>
|
||||
gaiacli account <BAR-ADDR>
|
||||
gaiacli send --amount=10fermion --to=<BAR-ADDR> --name=foo --chain-id=test-chain
|
||||
gaiacli send --amount=10steak --to=<BAR-ADDR> --name=foo --chain-id=test-chain
|
||||
|
||||
**Note:** We need to be careful with the ``chain-id`` and ``sequence``
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ var (
|
|||
|
||||
func init() {
|
||||
fsPk.String(FlagPubKey, "", "Go-Amino encoded hex PubKey of the validator-candidate. For Ed25519 the go-amino prepend hex is 1624de6220")
|
||||
fsAmount.String(FlagAmount, "1fermion", "Amount of coins to bond")
|
||||
fsAmount.String(FlagAmount, "1steak", "Amount of coins to bond")
|
||||
fsShares.String(FlagShares, "", "Amount of shares to unbond, either in decimal or keyword MAX (ex. 1.23456789, 99, MAX)")
|
||||
fsDescription.String(FlagMoniker, "", "validator-candidate name")
|
||||
fsDescription.String(FlagIdentity, "", "optional keybase signature")
|
||||
|
|
|
@ -18,7 +18,7 @@ func newTestMsgDeclareCandidacy(address sdk.Address, pubKey crypto.PubKey, amt i
|
|||
return MsgDeclareCandidacy{
|
||||
Description: Description{},
|
||||
CandidateAddr: address,
|
||||
Bond: sdk.Coin{"fermion", amt},
|
||||
Bond: sdk.Coin{"steak", amt},
|
||||
PubKey: pubKey,
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ func newTestMsgDelegate(delegatorAddr, candidateAddr sdk.Address, amt int64) Msg
|
|||
return MsgDelegate{
|
||||
DelegatorAddr: delegatorAddr,
|
||||
CandidateAddr: candidateAddr,
|
||||
Bond: sdk.Coin{"fermion", amt},
|
||||
Bond: sdk.Coin{"steak", amt},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ const MsgType = "stake"
|
|||
// initialize at genesis - to allow for the same tests we should should make
|
||||
// the ValidateBasic() function a return from an initializable function
|
||||
// ValidateBasic(bondDenom string) function
|
||||
const StakingToken = "fermion"
|
||||
const StakingToken = "steak"
|
||||
|
||||
//Verify interface at compile time
|
||||
var _, _, _, _ sdk.Msg = &MsgDeclareCandidacy{}, &MsgEditCandidacy{}, &MsgDelegate{}, &MsgUnbond{}
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
coinPos = sdk.Coin{"fermion", 1000}
|
||||
coinZero = sdk.Coin{"fermion", 0}
|
||||
coinNeg = sdk.Coin{"fermion", -10000}
|
||||
coinPos = sdk.Coin{"steak", 1000}
|
||||
coinZero = sdk.Coin{"steak", 0}
|
||||
coinNeg = sdk.Coin{"steak", -10000}
|
||||
coinPosNotAtoms = sdk.Coin{"foo", 10000}
|
||||
coinZeroNotAtoms = sdk.Coin{"foo", 0}
|
||||
coinNegNotAtoms = sdk.Coin{"foo", -10000}
|
||||
|
|
|
@ -83,7 +83,7 @@ func defaultParams() Params {
|
|||
InflationMin: sdk.NewRat(7, 100),
|
||||
GoalBonded: sdk.NewRat(67, 100),
|
||||
MaxValidators: 100,
|
||||
BondDenom: "fermion",
|
||||
BondDenom: "steak",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ func paramsNoInflation() Params {
|
|||
InflationMin: sdk.ZeroRat(),
|
||||
GoalBonded: sdk.NewRat(67, 100),
|
||||
MaxValidators: 100,
|
||||
BondDenom: "fermion",
|
||||
BondDenom: "steak",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue