Skip to content

Commit

Permalink
tests for ledger referral changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Manoj Patra committed Oct 19, 2023
1 parent 55e4a77 commit ba3af6b
Show file tree
Hide file tree
Showing 30 changed files with 2,349 additions and 2,901 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,49 @@
"name": "WithdrawRequestReceived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_msgSender",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "_recipient",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_requestId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_sharesAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_ethAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "string",
"name": "_referralId",
"type": "string"
}
],
"name": "WithdrawRequestReferral",
"type": "event"
},
{
"inputs": [],
"name": "DEFAULT_ADMIN_ROLE",
Expand Down Expand Up @@ -430,6 +473,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "_ethXAmount", "type": "uint256" },
{ "internalType": "address", "name": "_owner", "type": "address" },
{ "internalType": "string", "name": "_referralId", "type": "string" }
],
"name": "requestWithdraw",
"outputs": [
{ "internalType": "uint256", "name": "_requestId", "type": "uint256" }
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "_ethXAmount", "type": "uint256" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,43 @@
"name": "AuctionedEthReceived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "caller",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "shares",
"type": "uint256"
},
{
"indexed": false,
"internalType": "string",
"name": "referralId",
"type": "string"
}
],
"name": "DepositReferral",
"type": "event"
},
{
"anonymous": false,
"inputs": [
Expand Down Expand Up @@ -297,6 +334,18 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "_receiver", "type": "address" },
{ "internalType": "string", "name": "_referralId", "type": "string" }
],
"name": "deposit",
"outputs": [
{ "internalType": "uint256", "name": "_shares", "type": "uint256" }
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "_receiver", "type": "address" }
Expand Down
4 changes: 2 additions & 2 deletions tests/networks/ethereum/staderlabs/b2c.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"address": "0xcf5ea1b38380f6af39068375516daf40ed70d299",
"contractName": "StaderStakePoolsManager",
"selectors": {
"0xf340fa01": {
"0xb7482509": {
"erc20OfInterest": [],
"method": "deposit",
"plugin": "Staderlabs"
Expand All @@ -37,7 +37,7 @@
"address": "0x9f0491b32dbce587c50c4c43ab303b06478193a7",
"contractName": "UserWithdrawalManager",
"selectors": {
"0xccc143b8": {
"0x1f7ec122": {
"erc20OfInterest": [],
"method": "requestWithdraw",
"plugin": "Staderlabs"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanos_request_withdraw_eth/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanos_request_withdraw_eth/00005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanos_stake_eth/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanos_stake_eth/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanos_stake_eth/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanos_stake_eth/00005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanos_stake_eth/00007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanos_stake_eth/00008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanosp_stake_eth/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanosp_stake_eth/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanosp_stake_eth/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanox_stake_eth/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanox_stake_eth/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/ethereum_ethx_nanox_stake_eth/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/src/eth/ethx/deposit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const testNetwork = "ethereum";
const chainID = 1;
// Test from replayed transaction: https://etherscan.io/tx/0x4e771017864ff34176c8c9fa62fe1950852933345f921dc5316c63554c9bc453
const inputData =
"0x02f8980113850550de54dd850550de54dd8301c88a94cf5ea1b38380f6af39068375516daf40ed70d29987038d7ea4c68000a4f340fa01000000000000000000000000ad345b348bd84a4b42a5fde63feb7a29ef2af4e9c080a0a3adf22f4ce9fead664befb0ca33730f3bb8edb1a1d65a7f5275ac9a8622d29ea01a99e171740d723ee61049d7f0465f4e219fca86aaddf06bab02d3400f554242";
"0x02f8f701248405f5e1008501fa14a6d7830329eb94cf5ea1b38380f6af39068375516daf40ed70d299865af3107a4000b884b74825090000000000000000000000007e9bb9673ac38071a7699e6a3c48b8fbde574cd00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000a74657374696e6731323300000000000000000000000000000000000000000000c001a0e50fe06c37fda195c02ee64e359020fa135b7b2e9f9e4ffc12aa1b6430eda835a0732c210ac338e9ff2431c7f5076ce6cde517a6fa4d37a6339928e58e24d1a86f";

nano_models.forEach(function (model) {
test(
Expand Down
2 changes: 1 addition & 1 deletion tests/src/eth/ethx/withdraw.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const testNetwork = "ethereum";
const chainID = 1;
// Test from replayed transaction: https://etherscan.io/tx/0xa7b2f78c84bc5528629d37b56856d47601c42f4d7f1505fa6767bcd090fb5044
const inputData =
"0x02f8b30182059585053f837bd185053f837bd18304d7be949f0491b32dbce587c50c4c43ab303b06478193a780b844ccc143b80000000000000000000000000000000000000000000000056a30e2758fb0a40000000000000000000000000087bc2f2ba8c83f412fed5c3151de0ffbdc959984c080a01bf62d962c7e2d888df40f0a61dd9eb6c60ed01e1291ce15b9acbad154e0cf619fc470d4477df1e52cb4030e2f976dc13856d09010d164dd97a5532d59b9d413";
"0x02f9011101278405f5e100850202345eaa8306d1d9949f0491b32dbce587c50c4c43ab303b06478193a780b8a41f7ec12200000000000000000000000000000000000000000000000000005af3107a40000000000000000000000000007e9bb9673ac38071a7699e6a3c48b8fbde574cd00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000a74657374696e6731323300000000000000000000000000000000000000000000c080a0908adc7cdbe3110e6353592e11da106ec8ba4ca7172a1641058cb7bb26c5acefa07035284a6a0ef6f98708a30f498ac1ace86bafb8294683b4000cb638ad7beba1";

nano_models.forEach(function (model) {
test(
Expand Down
Loading

0 comments on commit ba3af6b

Please sign in to comment.