tendermint / spn

A blockchain to launch blockchains.
Other
112 stars 41 forks source link

feat(`claim`): implement `MsgClaimInitial` message #878

Closed lumtis closed 2 years ago

lumtis commented 2 years ago

Implement a message MsgClaimInitial that allows to optionally to perform a claim for an initial allocation

Scaffold the singleton InitialClaim in the state that determine if the initial claim exists (enabled == true) and what is the mission associated to it (missionID)

MsgClaimInitial completes the mission associated to inital claim if it is enabled

TO TEST

use ignite c serve, config.yml contains a initial claim option

Run commands

spnd tx claim claim-initial --from bob -y

// bob has now 100 drop
spnd q bank balances spn1aqn8ynvr3jmq67879qulzrwhchq5dtrvtx0nhe
balances:
- amount: "100"
  denom: drop
- amount: "200000071"
  denom: uspn
codecov[bot] commented 2 years ago

Codecov Report

Merging #878 (e574c2c) into develop (5b1c8a7) will decrease coverage by 0.05%. The diff coverage is 6.30%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #878      +/-   ##
===========================================
- Coverage    10.45%   10.39%   -0.06%     
===========================================
  Files          326      332       +6     
  Lines        76273    77302    +1029     
===========================================
+ Hits          7975     8037      +62     
- Misses       68109    69074     +965     
- Partials       189      191       +2     
Impacted Files Coverage Δ
x/campaign/keeper/campaign_auction_event_hooks.go 58.92% <ø> (ø)
x/claim/client/cli/query_initial_claim.go 0.00% <0.00%> (ø)
x/claim/types/genesis.pb.go 0.70% <0.00%> (-0.09%) :arrow_down:
x/claim/types/query.pb.gw.go 0.00% <0.00%> (ø)
x/claim/types/query.pb.go 0.73% <0.78%> (+<0.01%) :arrow_up:
x/claim/types/tx.pb.go 1.16% <0.88%> (-18.84%) :arrow_down:
x/claim/types/initial_claim.pb.go 1.23% <1.23%> (ø)
x/claim/types/msg_claim_initial.go 27.27% <27.27%> (ø)
x/claim/keeper/grpc_query_initial_claim.go 72.72% <72.72%> (ø)
x/claim/keeper/msg_claim_initial.go 93.33% <93.33%> (ø)
... and 5 more