Skip to content

Commit

Permalink
chore: add unittest for amino msg.
Browse files Browse the repository at this point in the history
  • Loading branch information
zemyblue committed May 11, 2024
1 parent aac46c7 commit 559fabd
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions x/fbridge/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,57 @@ func TestAminoJSON(t *testing.T) {
"/lbm.fbridge.v1.MsgTransfer",
"{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgTransfer\",\"value\":{\"amount\":\"1000000\",\"receiver\":\"0xf7bAc63fc7CEaCf0589F25454Ecf5C2ce904997c\",\"sender\":\"link1zf469e6y5zvsvkjz8vpr27j6txseyfnsh3ydze\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}",
},
"MsgProvision": {
&fbridgetypes.MsgProvision{
From: addrs[0],
Seq: uint64(1),
Sender: addrs[0],
Receiver: addrs[1],
Amount: sdk.NewInt(1000000),
},
"/lbm.fbridge.v1.MsgProvision",
"{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgProvision\",\"value\":{\"amount\":\"1000000\",\"from\":\"link1zf469e6y5zvsvkjz8vpr27j6txseyfnsh3ydze\",\"receiver\":\"link1aydj7vdxljxq7cn2dlkrhrcwf5py8dnuqp32qd\",\"sender\":\"link1zf469e6y5zvsvkjz8vpr27j6txseyfnsh3ydze\",\"seq\":\"1\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}",
},
"MsgHoldTransfer": {
&fbridgetypes.MsgHoldTransfer{
From: addrs[0],
Seq: 100,
},
"/lbm.fbridge.v1.MsgHoldTransfer",
"{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgHoldTransfer\",\"value\":{\"from\":\"link1zf469e6y5zvsvkjz8vpr27j6txseyfnsh3ydze\",\"seq\":\"100\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}",
},
"MsgReleaseTransfer": {
&fbridgetypes.MsgReleaseTransfer{
From: addrs[0],
Seq: 200,
},
"/lbm.fbridge.v1.MsgReleaseTransfer",
"{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgReleaseTransfer\",\"value\":{\"from\":\"link1zf469e6y5zvsvkjz8vpr27j6txseyfnsh3ydze\",\"seq\":\"200\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}",
},
"MsgRemoveProvision": {
&fbridgetypes.MsgRemoveProvision{
From: addrs[0],
Seq: 300,
},
"/lbm.fbridge.v1.MsgRemoveProvision",
"{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgRemoveProvision\",\"value\":{\"from\":\"link1zf469e6y5zvsvkjz8vpr27j6txseyfnsh3ydze\",\"seq\":\"300\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}",
},
"MsgClaimBatch": {
&fbridgetypes.MsgClaimBatch{
From: addrs[0],
MaxClaims: 50,
},
"/lbm.fbridge.v1.MsgClaimBatch",
"{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgClaimBatch\",\"value\":{\"from\":\"link1zf469e6y5zvsvkjz8vpr27j6txseyfnsh3ydze\",\"max_claims\":\"50\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}",
},
"MsgClaim": {
&fbridgetypes.MsgClaim{
From: addrs[0],
Seq: 400,
},
"/lbm.fbridge.v1.MsgClaim",
"{\"account_number\":\"1\",\"chain_id\":\"foo\",\"fee\":{\"amount\":[],\"gas\":\"0\"},\"memo\":\"memo\",\"msgs\":[{\"type\":\"lbm-sdk/MsgClaim\",\"value\":{\"from\":\"link1zf469e6y5zvsvkjz8vpr27j6txseyfnsh3ydze\",\"seq\":\"400\"}}],\"sequence\":\"1\",\"timeout_height\":\"1\"}",
},
"MsgSuggestRole": {
&fbridgetypes.MsgSuggestRole{
From: addrs[0],
Expand Down

0 comments on commit 559fabd

Please sign in to comment.