Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CostinCarabas committed Mar 13, 2024
1 parent c1c4c26 commit c98e271
Show file tree
Hide file tree
Showing 8 changed files with 214 additions and 44 deletions.
22 changes: 11 additions & 11 deletions multisig/scenarios/create_multiversx_to_ethereum_tx_batch.scen.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"balance": "0",
"esdt": {
"str:WEGLD-123456": {
"balance": "85,000,000,000",
"balance": "1,500,000",
"roles": [
"ESDTRoleLocalMint",
"ESDTRoleLocalBurn"
Expand All @@ -71,12 +71,12 @@
"3-from": "u32:32|address:user",
"4-to": "u32:20|0x0102030405060708091011121314151617181920",
"5-token_identifier": "nested:str:WEGLD-123456",
"6-amount": "biguint:10,000,000,000",
"6-amount": "biguint:84,998,500,000",
"7-is_refund_tx": "u8:0"
},
"str:firstBatchId": "1",
"str:lastBatchId": "1",
"str:accumulatedTransactionFees|nested:str:WEGLD-123456": "75,000,000,000",
"str:accumulatedTransactionFees|nested:str:WEGLD-123456": "1,500,000",
"+": ""
},
"code": "*"
Expand Down Expand Up @@ -128,14 +128,14 @@
"balance": "0",
"esdt": {
"str:WEGLD-123456": {
"balance": "85,000,000,000",
"balance": "1,500,000",
"roles": [
"ESDTRoleLocalMint",
"ESDTRoleLocalBurn"
]
},
"str:ETH-123456": {
"balance": "95,000,000,000",
"balance": "1,500,000",
"roles": [
"ESDTRoleLocalMint",
"ESDTRoleLocalBurn"
Expand All @@ -149,7 +149,7 @@
"3-from": "u32:32|address:user",
"4-to": "u32:20|0x0102030405060708091011121314151617181920",
"5-token_identifier": "nested:str:WEGLD-123456",
"6-amount": "biguint:10,000,000,000",
"6-amount": "biguint:84,998,500,000",
"7-is_refund_tx": "u8:0"
},
"str:pendingBatches|u64:1|str:.item|u32:2": {
Expand All @@ -158,13 +158,13 @@
"3-from": "u32:32|address:user",
"4-to": "u32:20|0x0102030405060708091011121314151617181920",
"5-token_identifier": "nested:str:ETH-123456",
"6-amount": "biguint:20,000,000,000",
"6-amount": "biguint:94,998,500,000",
"7-is_refund_tx": "u8:0"
},
"str:firstBatchId": "1",
"str:lastBatchId": "1",
"str:accumulatedTransactionFees|nested:str:WEGLD-123456": "75,000,000,000",
"str:accumulatedTransactionFees|nested:str:ETH-123456": "75,000,000,000",
"str:accumulatedTransactionFees|nested:str:WEGLD-123456": "1,500,000",
"str:accumulatedTransactionFees|nested:str:ETH-123456": "1,500,000",
"+": ""
},
"code": "*"
Expand Down Expand Up @@ -194,13 +194,13 @@
"address:user",
"0x0102030405060708091011121314151617181920",
"str:WEGLD-123456",
"10,000,000,000",
"84,998,500,000",
"0",
"2",
"address:user",
"0x0102030405060708091011121314151617181920",
"str:ETH-123456",
"20,000,000,000"
"94,998,500,000"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
"3-from": "u32:32|sc:egld_esdt_swap",
"4-to": "u32:20|0x0102030405060708091011121314151617181920",
"5-token_identifier": "nested:str:WEGLD-123456",
"6-amount": "biguint:1,000,000,000",
"6-amount": "biguint:75,998,500,000",
"7-is_refund_tx": "u8:1"
},
"str:pendingBatches|u64:1|str:.item|u32:2": {
Expand All @@ -287,7 +287,7 @@
"3-from": "u32:32|sc:egld_esdt_swap",
"4-to": "u32:20|0x0102030405060708091011121314151617181920",
"5-token_identifier": "nested:str:ETH-123456",
"6-amount": "biguint:1,000,000,000",
"6-amount": "biguint:75,998,500,000",
"7-is_refund_tx": "u8:1"
},
"str:firstBatchId": "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@
"balance": "0",
"esdt": {
"str:WEGLD-123456": {
"balance": "75,000,000,000",
"balance": "1,500,000",
"roles": [
"ESDTRoleLocalMint",
"ESDTRoleLocalBurn"
]
},
"str:ETH-123456": {
"balance": "75,000,000,000",
"balance": "1,500,000",
"roles": [
"ESDTRoleLocalMint",
"ESDTRoleLocalBurn"
Expand All @@ -165,8 +165,8 @@
"str:transactionsByNonce|address:user|str:.item|u32:1": "",
"str:transactionStatus|address:user|u32:2": "",
"str:transactionsByNonce|address:user|str:.item|u32:2": "",
"str:accumulatedTransactionFees|nested:str:WEGLD-123456": "75,000,000,000",
"str:accumulatedTransactionFees|nested:str:ETH-123456": "75,000,000,000",
"str:accumulatedTransactionFees|nested:str:WEGLD-123456": "1,500,000",
"str:accumulatedTransactionFees|nested:str:ETH-123456": "1,500,000",
"+": ""
},
"code": "*"
Expand Down Expand Up @@ -206,10 +206,10 @@
"balance": "0",
"esdt": {
"str:WEGLD-123456": {
"balance": "30,000,000,000"
"balance": "600,000"
},
"str:ETH-123456": {
"balance": "30,000,000,000"
"balance": "600,000"
}
},
"storage": {}
Expand All @@ -219,10 +219,10 @@
"balance": "0",
"esdt": {
"str:WEGLD-123456": {
"balance": "45,000,000,000"
"balance": "900,000"
},
"str:ETH-123456": {
"balance": "45,000,000,000"
"balance": "900,000"
}
},
"storage": {}
Expand Down
24 changes: 12 additions & 12 deletions multisig/scenarios/reject_multiversx_to_ethereum_tx_batch.scen.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@
"expect": {
"out": [
"str:WEGLD-123456",
"10,000,000,000",
"84,998,500,000",
"str:ETH-123456",
"20,000,000,000"
"94,998,500,000"
]
}
},
Expand Down Expand Up @@ -165,8 +165,8 @@
"nonce": "*",
"balance": "0",
"esdt": {
"str:WEGLD-123456": "25,000,000,000",
"str:ETH-123456": "125,000,000,000"
"str:WEGLD-123456": "99,998,500,000",
"str:ETH-123456": "199,998,500,000"
},
"storage": {}
},
Expand All @@ -175,14 +175,14 @@
"balance": "0",
"esdt": {
"str:WEGLD-123456": {
"balance": "75,000,000,000",
"balance": "1,500,000",
"roles": [
"ESDTRoleLocalMint",
"ESDTRoleLocalBurn"
]
},
"str:ETH-123456": {
"balance": "75,000,000,000",
"balance": "1,500,000",
"roles": [
"ESDTRoleLocalMint",
"ESDTRoleLocalBurn"
Expand All @@ -194,8 +194,8 @@
"str:transactionsByNonce|address:user|str:.item|u32:1": "",
"str:transactionStatus|address:user|u32:2": "",
"str:transactionsByNonce|address:user|str:.item|u32:2": "",
"str:accumulatedTransactionFees|nested:str:WEGLD-123456": "75,000,000,000",
"str:accumulatedTransactionFees|nested:str:ETH-123456": "75,000,000,000",
"str:accumulatedTransactionFees|nested:str:WEGLD-123456": "1,500,000",
"str:accumulatedTransactionFees|nested:str:ETH-123456": "1,500,000",
"+": ""
},
"code": "*"
Expand Down Expand Up @@ -235,10 +235,10 @@
"balance": "0",
"esdt": {
"str:WEGLD-123456": {
"balance": "30,000,000,000"
"balance": "600,000"
},
"str:ETH-123456": {
"balance": "30,000,000,000"
"balance": "600,000"
}
},
"storage": {}
Expand All @@ -248,10 +248,10 @@
"balance": "0",
"esdt": {
"str:WEGLD-123456": {
"balance": "45,000,000,000"
"balance": "900,000"
},
"str:ETH-123456": {
"balance": "45,000,000,000"
"balance": "900,000"
}
},
"storage": {}
Expand Down
29 changes: 26 additions & 3 deletions price-aggregator/scenarios/deploy.scen.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,31 @@
"function": "setPairDecimals",
"arguments": [
"str:GWEI",
"str:WEGLD-123456",
"u8:6"
"str:WEGLD",
"u8:9"
],
"gasLimit": "40,000,000",
"gasPrice": "0"
},
"expect": {
"status": "0",
"message": "",
"gas": "*",
"refund": "*"
}
},
{
"step": "scCall",
"txId": "oracle-set-pair",
"tx": {
"from": "address:aggregator-owner",
"to": "sc:price_aggregator",
"value": "0",
"function": "setPairDecimals",
"arguments": [
"str:GWEI",
"str:ETH",
"u8:9"
],
"gasLimit": "40,000,000",
"gasPrice": "0"
Expand Down Expand Up @@ -142,7 +165,7 @@
"step": "checkState",
"accounts": {
"address:aggregator-owner": {
"nonce": "4",
"nonce": "5",
"balance": "0",
"storage": {}
},
Expand Down
7 changes: 2 additions & 5 deletions price-aggregator/scenarios/get_latest_price_feed.scen.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,8 @@
"gasPrice": "0"
},
"expect": {
"out": [],
"status": "0",
"message": "",
"gas": "*",
"refund": "*"
"status": "4",
"message": "str:token pair not found"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"function": "submit",
"arguments": [
"str:GWEI",
"str:WEGLD-123456",
"str:WEGLD",
"u64:0",
"10",
"6"
"9"
],
"gasLimit": "40,000,000",
"gasPrice": "0"
Expand Down
Loading

0 comments on commit c98e271

Please sign in to comment.