Skip to content

Commit

Permalink
feat: use latest UsualM deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
KanievskyiDanylo committed Dec 12, 2024
1 parent aca00da commit 9bea8e8
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 32 deletions.
84 changes: 55 additions & 29 deletions src/abi/usual-m-wrapped-m/usualM.abi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
[
{ "type": "constructor", "inputs": [], "stateMutability": "nonpayable" },
{
"type": "function",
"name": "DECIMALS_NUMBER",
"inputs": [],
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "DOMAIN_SEPARATOR",
Expand Down Expand Up @@ -74,19 +81,24 @@
"internalType": "address"
},
{ "name": "salt", "type": "bytes32", "internalType": "bytes32" },
{
"name": "extensions",
"type": "uint256[]",
"internalType": "uint256[]"
}
{ "name": "extensions", "type": "uint256[]", "internalType": "uint256[]" }
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getWrappableAmount",
"inputs": [
{ "name": "amount", "type": "uint256", "internalType": "uint256" }
],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "initialize",
"inputs": [
{ "name": "smartM_", "type": "address", "internalType": "address" },
{ "name": "wrappedM_", "type": "address", "internalType": "address" },
{
"name": "registryAccess_",
"type": "address",
Expand All @@ -105,6 +117,13 @@
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "mintCap",
"inputs": [],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "name",
Expand Down Expand Up @@ -159,10 +178,12 @@
},
{
"type": "function",
"name": "smartM",
"inputs": [],
"outputs": [{ "name": "", "type": "address", "internalType": "address" }],
"stateMutability": "view"
"name": "setMintCap",
"inputs": [
{ "name": "newMintCap", "type": "uint256", "internalType": "uint256" }
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
Expand Down Expand Up @@ -225,24 +246,6 @@
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "unwrap",
"inputs": [
{ "name": "recipient", "type": "address", "internalType": "address" }
],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "wrap",
"inputs": [
{ "name": "recipient", "type": "address", "internalType": "address" }
],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "wrap",
Expand All @@ -267,6 +270,13 @@
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "wrappedM",
"inputs": [],
"outputs": [{ "name": "", "type": "address", "internalType": "address" }],
"stateMutability": "view"
},
{
"type": "event",
"name": "Approval",
Expand Down Expand Up @@ -324,6 +334,19 @@
],
"anonymous": false
},
{
"type": "event",
"name": "MintCapSet",
"inputs": [
{
"name": "newMintCap",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Paused",
Expand Down Expand Up @@ -473,11 +496,14 @@
{ "name": "currentNonce", "type": "uint256", "internalType": "uint256" }
]
},
{ "type": "error", "name": "InvalidAmount", "inputs": [] },
{ "type": "error", "name": "InvalidInitialization", "inputs": [] },
{ "type": "error", "name": "InvalidUInt96", "inputs": [] },
{ "type": "error", "name": "MintCapExceeded", "inputs": [] },
{ "type": "error", "name": "NotAuthorized", "inputs": [] },
{ "type": "error", "name": "NotInitializing", "inputs": [] },
{ "type": "error", "name": "SameValue", "inputs": [] },
{ "type": "error", "name": "ZeroAddress", "inputs": [] },
{ "type": "error", "name": "ZeroRegistryAccess", "inputs": [] },
{ "type": "error", "name": "ZeroSmartM", "inputs": [] }
{ "type": "error", "name": "ZeroWrappedM", "inputs": [] }
]
2 changes: 1 addition & 1 deletion src/dex/usual/usual-m-usd0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Config: DexConfigMap<DexParams & { usualDaoCollateralAddress: Address }> =
[Network.MAINNET]: {
usualDaoCollateralAddress: '0xde6e1F680C4816446C8D515989E2358636A38b04',
fromToken: {
address: '0xfe274c305b365dc38e188e8f01c4fae2171ce927',
address: '0x4cbc25559dbbd1272ec5b64c7b5f48a2405e6470',
decimals: 6,
},
toToken: {
Expand Down
2 changes: 1 addition & 1 deletion src/dex/usual/usual-m-wrapped-m.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Config: DexConfigMap<DexParams> = {
decimals: 6,
},
toToken: {
address: '0xfe274c305b365dc38e188e8f01c4fae2171ce927',
address: '0x4cbc25559dbbd1272ec5b64c7b5f48a2405e6470',
decimals: 6,
},
},
Expand Down
2 changes: 1 addition & 1 deletion tests/constants-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ export const Tokens: {
symbol: 'wM',
},
UsualM: {
address: '0xFe274C305b365dC38e188E8f01c4FAe2171ce927',
address: '0x4cbc25559dbbd1272ec5b64c7b5f48a2405e6470',
decimals: 6,
symbol: 'USUALM',
},
Expand Down

0 comments on commit 9bea8e8

Please sign in to comment.