Skip to content

Commit

Permalink
test(x/ecocredit): move regen prefix configuration into module root (#…
Browse files Browse the repository at this point in the history
…1253)

* chore(x/ecocredit): move regen prefix configuration into root module

* Use regen prefixed addresses in feature files

* Use regen prefix in migration tests

* Use regen prefix in simulation tests

* chore: remove unused sdk imports

Co-authored-by: Ryan Christoffersen <[email protected]>
  • Loading branch information
wgwz and ryanchristo authored Jul 14, 2022
1 parent 8597f8c commit 75ec247
Show file tree
Hide file tree
Showing 29 changed files with 109 additions and 204 deletions.
46 changes: 23 additions & 23 deletions x/ecocredit/basket/features/msg_create.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand All @@ -19,7 +19,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"description": "Nature-Based Carbon Token",
"credit_type_abbrev": "C",
Expand All @@ -35,7 +35,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"disable_auto_retire": <disable-auto-retire>,
"credit_type_abbrev": "C",
Expand All @@ -56,7 +56,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand All @@ -78,7 +78,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand Down Expand Up @@ -117,7 +117,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27"
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw"
}
"""
When the message is validated
Expand All @@ -127,7 +127,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "1CT"
}
"""
Expand All @@ -138,7 +138,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "C T"
}
"""
Expand All @@ -149,7 +149,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "CT"
}
"""
Expand All @@ -160,7 +160,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "CARBONTOKEN"
}
"""
Expand All @@ -171,7 +171,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."
}
Expand All @@ -183,7 +183,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT"
}
"""
Expand All @@ -194,7 +194,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "foobar"
}
Expand All @@ -206,7 +206,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C"
}
Expand All @@ -218,7 +218,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand All @@ -233,7 +233,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand All @@ -248,7 +248,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand All @@ -270,7 +270,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand All @@ -288,7 +288,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand All @@ -306,7 +306,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand All @@ -324,7 +324,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand All @@ -344,7 +344,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand All @@ -365,7 +365,7 @@ Feature: MsgCreate
Given the message
"""
{
"curator": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"curator": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"name": "NCT",
"credit_type_abbrev": "C",
"allowed_classes": [
Expand Down
18 changes: 9 additions & 9 deletions x/ecocredit/basket/features/msg_put.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: MsgPut
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"credits": [
{
Expand Down Expand Up @@ -39,7 +39,7 @@ Feature: MsgPut
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27"
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw"
}
"""
When the message is validated
Expand All @@ -49,7 +49,7 @@ Feature: MsgPut
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "foo"
}
"""
Expand All @@ -60,7 +60,7 @@ Feature: MsgPut
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT"
}
"""
Expand All @@ -71,7 +71,7 @@ Feature: MsgPut
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"credits": [
{}
Expand All @@ -85,7 +85,7 @@ Feature: MsgPut
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"credits": [
{
Expand All @@ -101,7 +101,7 @@ Feature: MsgPut
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"credits": [
{
Expand All @@ -117,7 +117,7 @@ Feature: MsgPut
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"credits": [
{
Expand All @@ -134,7 +134,7 @@ Feature: MsgPut
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"credits": [
{
Expand Down
20 changes: 10 additions & 10 deletions x/ecocredit/basket/features/msg_take.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: MsgTake
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"amount": "100",
"retirement_jurisdiction": "US-WA",
Expand All @@ -18,7 +18,7 @@ Feature: MsgTake
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"amount": "100"
}
Expand Down Expand Up @@ -48,7 +48,7 @@ Feature: MsgTake
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27"
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw"
}
"""
When the message is validated
Expand All @@ -58,7 +58,7 @@ Feature: MsgTake
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "foo"
}
"""
Expand All @@ -69,7 +69,7 @@ Feature: MsgTake
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT"
}
"""
Expand All @@ -80,7 +80,7 @@ Feature: MsgTake
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"amount": "100.5"
}
Expand All @@ -92,7 +92,7 @@ Feature: MsgTake
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"amount": "-100"
}
Expand All @@ -104,7 +104,7 @@ Feature: MsgTake
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"amount": "100",
"retire_on_take": true
Expand All @@ -117,7 +117,7 @@ Feature: MsgTake
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"amount": "100",
"retirement_jurisdiction": "foo",
Expand All @@ -131,7 +131,7 @@ Feature: MsgTake
Given the message
"""
{
"owner": "cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27",
"owner": "regen1elq7ys34gpkj3jyvqee0h6yk4h9wsfxmgqelsw",
"basket_denom": "eco.uC.NCT",
"amount": "100",
"retirement_jurisdiction": "foo",
Expand Down
10 changes: 10 additions & 0 deletions x/ecocredit/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package ecocredit

import (
sdk "github.com/cosmos/cosmos-sdk/types"
)

func init() {
cfg := sdk.GetConfig()
cfg.SetBech32PrefixForAccount("regen", "regenpub")
}
Loading

0 comments on commit 75ec247

Please sign in to comment.