Skip to content

Commit 46c3975

Browse files
chore(token-registry): Add bank coin versions of USDC and USDT from Stargate and LayerZero, and update ErisEvm.sol to fix redeem (#2352)
1 parent fe27b47 commit 46c3975

File tree

5 files changed

+27
-16
lines changed

5 files changed

+27
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ See https://github.com/dangoslen/changelog-enforcer.
5353
- [#2346](https://gittub.com/NibiruChain/nibiru/pull/2346) - fix(buf-gen-rs): improve Rust proto binding generation script robustness and get it to work with a forked Cosmos-SDK dependency and exit correctly on failure
5454
- [#2348](https://github.com/NibiruChain/nibiru/pull/2348) - fix(oracle): max expiration a label rather than an invalidation for additional query liveness
5555
- [#2350](https://github.com/NibiruChain/nibiru/pull/2350) - fix(simapp): sim tests with empty validator set panic
56+
- [#2352](https://github.com/NibiruChain/nibiru/pull/2352) - chore(token-registry): Add bank coin versions of USDC and USDT from Stargate and LayerZero, and update ErisEvm.sol to fix redeem
5657

5758
### Dependencies
5859
- Bump `form-data` from 4.0.1 to 4.0.4 ([#2347](https://github.com/NibiruChain/nibiru/pull/2347))

token-registry/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
- This prevents test runs from overwriting source-controlled files when
1515
executing the script, resolving issues caused by `os.WriteFile` truncating the
1616
embedded JSON files on error.
17-
- [#2341](https://github.com/NibiruChain/nibiru/pull/2341) - chore(token-registry): Add the USDa and sUSDa ERC20 from Avalon Finance
17+
- [#2341](https://github.com/NibiruChain/nibiru/pull/2341) - chore(token-registry): Add the USDa and sUSDa ERC20 from Avalon Finance
18+
- [#2352](https://github.com/NibiruChain/nibiru/pull/2352) - chore(token-registry): Add bank coin versions of USDC and USDT from Stargate and LayerZero, and update ErisEvm.sol to fix redeem.

token-registry/official_bank_coins.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,25 @@
3030
"source": "bybit",
3131
"priceId": "USDCUSDT"
3232
}
33+
},
34+
{
35+
"contractAddr": "erc20/0x0829F361A05D993d5CEb035cA6DF3446b060970b",
36+
"displayName": "USDC (Stargate, Bank)",
37+
"symbol": "USDC.e",
38+
"logoSrc": "https://raw.githubusercontent.com/NibiruChain/nibiru/main/token-registry/img/002_usdc.png",
39+
"priceInfo": {
40+
"source": "bybit",
41+
"priceId": "USDCUSDT"
42+
}
43+
},
44+
{
45+
"contractAddr": "erc20/0x43F2376D5D03553aE72F4A8093bbe9de4336EB08",
46+
"displayName": "USDT (Stargate, Bank)",
47+
"symbol": "USDT",
48+
"logoSrc": "https://raw.githubusercontent.com/NibiruChain/nibiru/main/token-registry/img/006_usdt.svg",
49+
"priceInfo": {
50+
"source": "bybit",
51+
"priceId": "USDCUSDT"
52+
}
3353
}
34-
]
54+
]

token-registry/official_erc20s.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@
6969
},
7070
{
7171
"contractAddr": "0xf4e097E36d2064E2bDCA96e60439f3A369522003",
72-
"displayName": "USDa (Avalon Finance)",
72+
"displayName": "USDa (Avalon)",
7373
"symbol": "USDa",
7474
"logoSrc": "https://raw.githubusercontent.com/NibiruChain/nibiru/main/token-registry/img/007_usda-avalon.png"
7575
},
7676
{
7777
"contractAddr": "0x84f682626302EA7BCA2A7c338b84863292131319",
78-
"displayName": "sUSDa (Avalon Finance)",
78+
"displayName": "sUSDa (Avalon)",
7979
"symbol": "sUSDa",
8080
"logoSrc": "https://raw.githubusercontent.com/NibiruChain/nibiru/main/token-registry/img/007_susda-avalon.png"
8181
}

x/evm/embeds/contracts/ErisEvm.sol

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,11 @@ contract ErisEvm {
142142
}
143143

144144
/// @notice Redeem any stNIBI that has finished unstaking to receive the NIBI
145-
/// principal and any accrued rewards from liquid staking. NIBI received is
146-
/// converted to WNIBI.
145+
/// principal and any accrued rewards from liquid staking.
147146
function redeem() external {
148-
uint256 nibiBalBefore = address(msg.sender).balance;
149-
150147
bytes memory wasmMsg = bytes('{"withdraw_unbonded":{}}');
151148
INibiruEvm.BankCoin[] memory funds = new INibiruEvm.BankCoin[](0);
152149
_doWasmExecute(ERIS_WASM_CONTRACT, wasmMsg, funds);
153-
154-
uint256 nibiBalAfter = address(msg.sender).balance;
155-
uint256 nibiReceived = nibiBalAfter > nibiBalBefore
156-
? nibiBalAfter - nibiBalBefore
157-
: 0;
158-
if (nibiReceived > 0) {
159-
WNIBI(WNIBI_ADDRESS).deposit{value: nibiBalAfter - nibiBalBefore}();
160-
}
161150
}
162151

163152
/// @notice Queue to unstake stNIBI to later redeem it for the principal and

0 commit comments

Comments
 (0)