@reyaxyz/common 0.188.0 → 0.189.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +1 -1
  2. package/dist/transactions/abis/CustomMulticall3.json +490 -0
  3. package/dist/transactions/buildMulticallTx.js +5 -5
  4. package/dist/transactions/buildMulticallTx.js.map +1 -1
  5. package/dist/transactions/contractAddresses.js +2 -2
  6. package/dist/transactions/contractAddresses.js.map +1 -1
  7. package/dist/transactions/executeTransaction.js +23 -11
  8. package/dist/transactions/executeTransaction.js.map +1 -1
  9. package/dist/transactions/index.js +2 -2
  10. package/dist/transactions/index.js.map +1 -1
  11. package/dist/types/transactions/buildMulticallTx.d.ts +1 -1
  12. package/dist/types/transactions/buildMulticallTx.d.ts.map +1 -1
  13. package/dist/types/transactions/executeTransaction.d.ts +5 -0
  14. package/dist/types/transactions/executeTransaction.d.ts.map +1 -1
  15. package/dist/types/transactions/index.d.ts +1 -1
  16. package/dist/types/transactions/index.d.ts.map +1 -1
  17. package/dist/types/types.d.ts +1 -0
  18. package/dist/types/types.d.ts.map +1 -1
  19. package/dist/types/utils/index.d.ts +1 -0
  20. package/dist/types/utils/index.d.ts.map +1 -1
  21. package/dist/types/utils/stringify.d.ts +2 -0
  22. package/dist/types/utils/stringify.d.ts.map +1 -0
  23. package/dist/types/utils/token/token-info.d.ts.map +1 -1
  24. package/dist/types.js.map +1 -1
  25. package/dist/utils/index.js +1 -0
  26. package/dist/utils/index.js.map +1 -1
  27. package/dist/utils/socket/reyaCronos.json +54 -0
  28. package/dist/utils/stringify.js +13 -0
  29. package/dist/utils/stringify.js.map +1 -0
  30. package/dist/utils/token/token-info.js +4 -0
  31. package/dist/utils/token/token-info.js.map +1 -1
  32. package/package.json +2 -2
  33. package/src/transactions/abis/CustomMulticall3.json +490 -0
  34. package/src/transactions/buildMulticallTx.ts +4 -4
  35. package/src/transactions/contractAddresses.ts +2 -2
  36. package/src/transactions/executeTransaction.ts +23 -0
  37. package/src/transactions/index.ts +1 -1
  38. package/src/types.ts +1 -0
  39. package/src/utils/index.ts +1 -0
  40. package/src/utils/socket/reyaCronos.json +54 -0
  41. package/src/utils/stringify.ts +8 -0
  42. package/src/utils/token/token-info.ts +28 -0
  43. package/dist/transactions/abis/MulticallV2.json +0 -376
  44. package/src/transactions/abis/MulticallV2.json +0 -376
@@ -1 +1 @@
1
- {"version":3,"file":"token-info.js","sourceRoot":"/","sources":["utils/token/token-info.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAwE;AAExE,IAAM,sBAAsB,GAGxB;IACF,gBAAgB,EAAE,EAAE;IACpB,iBAAiB,EAAE,EAAE;IACrB,iBAAiB,EAAE,EAAE;CACtB,CAAC;AAEW,QAAA,UAAU;IAEnB,4DAA4D;IAC5D,4DAA4D;IAC5D,4DAA4D;IAC5D,GAAC,mBAAW,CAAC,WAAW,IAAG;mBAEvB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,EACX,gBAAgB,EAAE,KAAK,IACpB,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,EACX,gBAAgB,EAAE,IAAI,IACnB,sBAAsB;4BAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,EACZ,gBAAgB,EAAE,KAAK,IACpB,sBAAsB,KACzB,gBAAgB,EAAE,IAAI,EACtB,iBAAiB,EAAE,IAAI,EACvB,iBAAiB,EAAE,IAAI;mBAGvB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,EACZ,gBAAgB,EAAE,KAAK,IACpB,sBAAsB;KAE5B;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;4BAEjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,E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,QAAQ,EAAE,EAAE,EACZ,gBAAgB,EAAE,KAAK,IACpB,sBAAsB;4BAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,EACZ,gBAAgB,EAAE,KAAK,IACpB,sBAAsB,KACzB,gBAAgB,EAAE,IAAI,EACtB,iBAAiB,EAAE,IAAI,EACvB,iBAAiB,EAAE,IAAI;mBAGvB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,EACX,gBAAgB,EAAE,KAAK,IACpB,sBAAsB;KAE5B;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;mBAEjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,EACX,gBAAgB,EAAE,IAAI,IACnB,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,EACZ,gBAAgB,EAAE,KAAK,IACpB,sBAAsB;4BAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,EACZ,gBAAgB,EAAE,KAAK,IACpB,sBAAsB,KACzB,gBAAgB,EAAE,IAAI,EACtB,iBAAiB,EAAE,IAAI,EACvB,iBAAiB,EAAE,IAAI;mBAGvB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,EACX,gBAAgB,EAAE,KAAK,IACpB,sBAAsB;KAE5B;QACD","sourcesContent":["import { MoneyInOutChainId, ReyaChainId, TokenInfo } from '../../types';\n\nconst defaultTokenThresholds: Pick<\n TokenInfo,\n 'minDepositAmount' | 'minWithdrawAmount' | 'minTransferAmount'\n> = {\n minDepositAmount: 10,\n minWithdrawAmount: 10,\n minTransferAmount: 10,\n};\n\nexport const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =\n {\n /* ------------------------------------------------------ */\n /* MAINNET */\n /* ------------------------------------------------------ */\n [ReyaChainId.reyaNetwork]: [\n {\n name: 'RUSD',\n address: '0xa9f32a851b1800742e47725da54a09a7ef2556a3',\n decimals: 6,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDC',\n address: '0x3b860c0b53f2e8bd5264aa7c3451d41263c933f2',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x6b48c2e6a32077ec17e8ba0d98ffc676dfab1a30',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'USDE',\n address: '0xaab18b45467ece5e47f85ca6d3dc4df2a350fd42',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.ethereumMainnet]: [\n {\n name: 'USDC',\n address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n minWithdrawAmount: 28,\n },\n {\n name: 'WETH',\n address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'USDE',\n address: '0x4c9edd5852cd905f086c759e8383e09bff1e68b3',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.opMainnet]: [\n {\n name: 'USDC.E',\n address: '0x7f5c764cbc14f9669b88837ca1490cca17c31607',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n minWithdrawAmount: 10,\n },\n {\n name: 'WETH',\n address: '0x4200000000000000000000000000000000000006',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n ],\n [MoneyInOutChainId.polygonMainnet]: [\n {\n name: 'USDC.E',\n address: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n minWithdrawAmount: 10,\n },\n {\n name: 'WETH',\n address: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n ],\n [MoneyInOutChainId.arbitrumOne]: [\n {\n name: 'USDC.E',\n address: '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n minWithdrawAmount: 10,\n },\n {\n name: 'WETH',\n address: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n ],\n [MoneyInOutChainId.baseMainnet]: [\n {\n name: 'USDC',\n address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n minWithdrawAmount: 10,\n },\n {\n name: 'WETH',\n address: '0x4200000000000000000000000000000000000006',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n ],\n\n /* ------------------------------------------------------ */\n /* TESTNET */\n /* ------------------------------------------------------ */\n [ReyaChainId.reyaCronos]: [\n {\n name: 'RUSD',\n address: '0x9de724e7b3facf87ce39465d3d712717182e3e55',\n decimals: 6,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDC',\n address: '0xfa27c7c6051344263533cc365274d9569b0272a8',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDE',\n address: '0xdca6971c26fdee0536fdff076d063643f7810621',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x2cf56315acc7e791b1a0135c09d8d5c8dbcd2f14',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'WBTC',\n address: '0x459374f3f3e92728bca838dfa8c95e706fe67e8a',\n decimals: 8,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.arbitrumSepolia]: [\n {\n name: 'USDC',\n address: '0x8537307810fc40f4073a12a38554d4ff78efff41',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDE',\n address: '0xdca6971c26fdee0536fdff076d063643f7810621',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x565810cbfa3cf1390963e5afa2fb953795686339',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'WBTC',\n address: '0x1019958c2bd43b882a4e1349337a32ef9563fc4d',\n decimals: 8,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.opSepolia]: [\n {\n name: 'USDC',\n address: '0x6d290609b3f5f02d52f28d97c75a443ed8564cbf',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDE',\n address: '0xdca6971c26fdee0536fdff076d063643f7810621',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x2b42affd4b7c14d9b7c2579229495c052672ccd3',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'WBTC',\n address: '0xfc5cc93d85861ac82d89fc2d3e56315540e9c8a7',\n decimals: 8,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.ethereumSepolia]: [\n {\n name: 'USDC',\n address: '0x565810cbfa3cf1390963e5afa2fb953795686339',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDE',\n address: '0xdca6971c26fdee0536fdff076d063643f7810621',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x771d1ae208377453d478df08bbc38034f72ac833',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'WBTC',\n address: '0x94beff5da6201cb2c8f489196fd970b3df5aa32a',\n decimals: 8,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n ],\n };\n"]}
1
+ {"version":3,"file":"token-info.js","sourceRoot":"/","sources":["utils/token/token-info.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAwE;AAExE,IAAM,sBAAsB,GAGxB;IACF,gBAAgB,EAAE,EAAE;IACpB,iBAAiB,EAAE,EAAE;IACrB,iBAAiB,EAAE,EAAE;CACtB,CAAC;AAEW,QAAA,UAAU;IAEnB,4DAA4D;IAC5D,4DAA4D;IAC5D,4DAA4D;IAC5D,GAAC,mBAAW,CA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B,iBAAiB,EAAE,IAAI,EACvB,iBAAiB,EAAE,IAAI;mBAGvB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,EACX,gBAAgB,EAAE,KAAK,IACpB,sBAAsB;KAE5B;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;mBAEjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,EACX,gBAAgB,EAAE,IAAI,IACnB,sBAAsB;mBAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,EACZ,gBAAgB,EAAE,KAAK,IACpB,sBAAsB;mBAGzB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,EACZ,gBAAgB,EAAE,KAAK,IACpB,sBAAsB;4BAGzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,EAAE,EACZ,gBAAgB,EAAE,KAAK,IACpB,sBAAsB,KACzB,gBAAgB,EAAE,IAAI,EACtB,iBAAiB,EAAE,IAAI,EACvB,iBAAiB,EAAE,IAAI;mBAGvB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,4CAA4C,EACrD,QAAQ,EAAE,CAAC,EACX,gBAAgB,EAAE,KAAK,IACpB,sBAAsB;KAE5B;QACD","sourcesContent":["import { MoneyInOutChainId, ReyaChainId, TokenInfo } from '../../types';\n\nconst defaultTokenThresholds: Pick<\n TokenInfo,\n 'minDepositAmount' | 'minWithdrawAmount' | 'minTransferAmount'\n> = {\n minDepositAmount: 10,\n minWithdrawAmount: 10,\n minTransferAmount: 10,\n};\n\nexport const TOKEN_INFO: Record<ReyaChainId | MoneyInOutChainId, TokenInfo[]> =\n {\n /* ------------------------------------------------------ */\n /* MAINNET */\n /* ------------------------------------------------------ */\n [ReyaChainId.reyaNetwork]: [\n {\n name: 'RUSD',\n address: '0xa9f32a851b1800742e47725da54a09a7ef2556a3',\n decimals: 6,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDC',\n address: '0x3b860c0b53f2e8bd5264aa7c3451d41263c933f2',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x6b48c2e6a32077ec17e8ba0d98ffc676dfab1a30',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'USDE',\n address: '0xaab18b45467ece5e47f85ca6d3dc4df2a350fd42',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.ethereumMainnet]: [\n {\n name: 'USDC',\n address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n minWithdrawAmount: 28,\n },\n {\n name: 'WETH',\n address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'USDE',\n address: '0x4c9edd5852cd905f086c759e8383e09bff1e68b3',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.opMainnet]: [\n {\n name: 'USDC.E',\n address: '0x7f5c764cbc14f9669b88837ca1490cca17c31607',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n minWithdrawAmount: 10,\n },\n {\n name: 'WETH',\n address: '0x4200000000000000000000000000000000000006',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n ],\n [MoneyInOutChainId.polygonMainnet]: [\n {\n name: 'USDC.E',\n address: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n minWithdrawAmount: 10,\n },\n {\n name: 'WETH',\n address: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n ],\n [MoneyInOutChainId.arbitrumOne]: [\n {\n name: 'USDC.E',\n address: '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n minWithdrawAmount: 10,\n },\n {\n name: 'WETH',\n address: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n ],\n [MoneyInOutChainId.baseMainnet]: [\n {\n name: 'USDC',\n address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n minWithdrawAmount: 10,\n },\n {\n name: 'WETH',\n address: '0x4200000000000000000000000000000000000006',\n decimals: 18,\n isRUSDUnderlying: false,\n whitelistedWalletOnly: true,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n ],\n\n /* ------------------------------------------------------ */\n /* TESTNET */\n /* ------------------------------------------------------ */\n [ReyaChainId.reyaCronos]: [\n {\n name: 'RUSD',\n address: '0x9de724e7b3facf87ce39465d3d712717182e3e55',\n decimals: 6,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDC',\n address: '0xfa27c7c6051344263533cc365274d9569b0272a8',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDE',\n address: '0xdca6971c26fdee0536fdff076d063643f7810621',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'SUSDE',\n address: '0x08a766935478a1632fa776dcebd3e75ce88a1034',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x2cf56315acc7e791b1a0135c09d8d5c8dbcd2f14',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'WBTC',\n address: '0x459374f3f3e92728bca838dfa8c95e706fe67e8a',\n decimals: 8,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.arbitrumSepolia]: [\n {\n name: 'USDC',\n address: '0x8537307810fc40f4073a12a38554d4ff78efff41',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDE',\n address: '0xdca6971c26fdee0536fdff076d063643f7810621',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'SUSDE',\n address: '0x08a766935478a1632fa776dcebd3e75ce88a1034',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x565810cbfa3cf1390963e5afa2fb953795686339',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'WBTC',\n address: '0x1019958c2bd43b882a4e1349337a32ef9563fc4d',\n decimals: 8,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.opSepolia]: [\n {\n name: 'USDC',\n address: '0x6d290609b3f5f02d52f28d97c75a443ed8564cbf',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDE',\n address: '0xdca6971c26fdee0536fdff076d063643f7810621',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'SUSDE',\n address: '0x08a766935478a1632fa776dcebd3e75ce88a1034',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x2b42affd4b7c14d9b7c2579229495c052672ccd3',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'WBTC',\n address: '0xfc5cc93d85861ac82d89fc2d3e56315540e9c8a7',\n decimals: 8,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n ],\n [MoneyInOutChainId.ethereumSepolia]: [\n {\n name: 'USDC',\n address: '0x565810cbfa3cf1390963e5afa2fb953795686339',\n decimals: 6,\n isRUSDUnderlying: true,\n ...defaultTokenThresholds,\n },\n {\n name: 'USDE',\n address: '0xdca6971c26fdee0536fdff076d063643f7810621',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'SUSDE',\n address: '0x08a766935478a1632fa776dcebd3e75ce88a1034',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n {\n name: 'WETH',\n address: '0x771d1ae208377453d478df08bbc38034f72ac833',\n decimals: 18,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n minDepositAmount: 0.01,\n minWithdrawAmount: 0.01,\n minTransferAmount: 0.01,\n },\n {\n name: 'WBTC',\n address: '0x94beff5da6201cb2c8f489196fd970b3df5aa32a',\n decimals: 8,\n isRUSDUnderlying: false,\n ...defaultTokenThresholds,\n },\n ],\n };\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/common",
3
- "version": "0.188.0",
3
+ "version": "0.189.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -43,5 +43,5 @@
43
43
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
44
44
  },
45
45
  "packageManager": "pnpm@8.3.1",
46
- "gitHead": "5bc32f5601cf62dfda167e033a7181e106ff8fe9"
46
+ "gitHead": "6f843153844eb29a907b565282392bfd5198b77c"
47
47
  }
@@ -0,0 +1,490 @@
1
+ {
2
+ "abi": [
3
+ {
4
+ "type": "function",
5
+ "name": "aggregate",
6
+ "inputs": [
7
+ {
8
+ "name": "calls",
9
+ "type": "tuple[]",
10
+ "internalType": "struct CustomMulticall3.Call[]",
11
+ "components": [
12
+ {
13
+ "name": "target",
14
+ "type": "address",
15
+ "internalType": "address"
16
+ },
17
+ {
18
+ "name": "callData",
19
+ "type": "bytes",
20
+ "internalType": "bytes"
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "outputs": [
26
+ {
27
+ "name": "blockNumber",
28
+ "type": "uint256",
29
+ "internalType": "uint256"
30
+ },
31
+ {
32
+ "name": "returnData",
33
+ "type": "bytes[]",
34
+ "internalType": "bytes[]"
35
+ }
36
+ ],
37
+ "stateMutability": "payable"
38
+ },
39
+ {
40
+ "type": "function",
41
+ "name": "aggregate3",
42
+ "inputs": [
43
+ {
44
+ "name": "calls",
45
+ "type": "tuple[]",
46
+ "internalType": "struct CustomMulticall3.Call3[]",
47
+ "components": [
48
+ {
49
+ "name": "target",
50
+ "type": "address",
51
+ "internalType": "address"
52
+ },
53
+ {
54
+ "name": "allowFailure",
55
+ "type": "bool",
56
+ "internalType": "bool"
57
+ },
58
+ {
59
+ "name": "callData",
60
+ "type": "bytes",
61
+ "internalType": "bytes"
62
+ }
63
+ ]
64
+ }
65
+ ],
66
+ "outputs": [
67
+ {
68
+ "name": "returnData",
69
+ "type": "tuple[]",
70
+ "internalType": "struct CustomMulticall3.Result[]",
71
+ "components": [
72
+ {
73
+ "name": "success",
74
+ "type": "bool",
75
+ "internalType": "bool"
76
+ },
77
+ {
78
+ "name": "returnData",
79
+ "type": "bytes",
80
+ "internalType": "bytes"
81
+ }
82
+ ]
83
+ }
84
+ ],
85
+ "stateMutability": "payable"
86
+ },
87
+ {
88
+ "type": "function",
89
+ "name": "aggregate3Value",
90
+ "inputs": [
91
+ {
92
+ "name": "calls",
93
+ "type": "tuple[]",
94
+ "internalType": "struct CustomMulticall3.Call3Value[]",
95
+ "components": [
96
+ {
97
+ "name": "target",
98
+ "type": "address",
99
+ "internalType": "address"
100
+ },
101
+ {
102
+ "name": "allowFailure",
103
+ "type": "bool",
104
+ "internalType": "bool"
105
+ },
106
+ {
107
+ "name": "value",
108
+ "type": "uint256",
109
+ "internalType": "uint256"
110
+ },
111
+ {
112
+ "name": "callData",
113
+ "type": "bytes",
114
+ "internalType": "bytes"
115
+ }
116
+ ]
117
+ }
118
+ ],
119
+ "outputs": [
120
+ {
121
+ "name": "returnData",
122
+ "type": "tuple[]",
123
+ "internalType": "struct CustomMulticall3.Result[]",
124
+ "components": [
125
+ {
126
+ "name": "success",
127
+ "type": "bool",
128
+ "internalType": "bool"
129
+ },
130
+ {
131
+ "name": "returnData",
132
+ "type": "bytes",
133
+ "internalType": "bytes"
134
+ }
135
+ ]
136
+ }
137
+ ],
138
+ "stateMutability": "payable"
139
+ },
140
+ {
141
+ "type": "function",
142
+ "name": "blockAndAggregate",
143
+ "inputs": [
144
+ {
145
+ "name": "calls",
146
+ "type": "tuple[]",
147
+ "internalType": "struct CustomMulticall3.Call[]",
148
+ "components": [
149
+ {
150
+ "name": "target",
151
+ "type": "address",
152
+ "internalType": "address"
153
+ },
154
+ {
155
+ "name": "callData",
156
+ "type": "bytes",
157
+ "internalType": "bytes"
158
+ }
159
+ ]
160
+ }
161
+ ],
162
+ "outputs": [
163
+ {
164
+ "name": "blockNumber",
165
+ "type": "uint256",
166
+ "internalType": "uint256"
167
+ },
168
+ {
169
+ "name": "blockHash",
170
+ "type": "bytes32",
171
+ "internalType": "bytes32"
172
+ },
173
+ {
174
+ "name": "returnData",
175
+ "type": "tuple[]",
176
+ "internalType": "struct CustomMulticall3.Result[]",
177
+ "components": [
178
+ {
179
+ "name": "success",
180
+ "type": "bool",
181
+ "internalType": "bool"
182
+ },
183
+ {
184
+ "name": "returnData",
185
+ "type": "bytes",
186
+ "internalType": "bytes"
187
+ }
188
+ ]
189
+ }
190
+ ],
191
+ "stateMutability": "payable"
192
+ },
193
+ {
194
+ "type": "function",
195
+ "name": "getBasefee",
196
+ "inputs": [],
197
+ "outputs": [
198
+ {
199
+ "name": "basefee",
200
+ "type": "uint256",
201
+ "internalType": "uint256"
202
+ }
203
+ ],
204
+ "stateMutability": "view"
205
+ },
206
+ {
207
+ "type": "function",
208
+ "name": "getBlockHash",
209
+ "inputs": [
210
+ {
211
+ "name": "blockNumber",
212
+ "type": "uint256",
213
+ "internalType": "uint256"
214
+ }
215
+ ],
216
+ "outputs": [
217
+ {
218
+ "name": "blockHash",
219
+ "type": "bytes32",
220
+ "internalType": "bytes32"
221
+ }
222
+ ],
223
+ "stateMutability": "view"
224
+ },
225
+ {
226
+ "type": "function",
227
+ "name": "getBlockNumber",
228
+ "inputs": [],
229
+ "outputs": [
230
+ {
231
+ "name": "blockNumber",
232
+ "type": "uint256",
233
+ "internalType": "uint256"
234
+ }
235
+ ],
236
+ "stateMutability": "view"
237
+ },
238
+ {
239
+ "type": "function",
240
+ "name": "getChainId",
241
+ "inputs": [],
242
+ "outputs": [
243
+ {
244
+ "name": "chainid",
245
+ "type": "uint256",
246
+ "internalType": "uint256"
247
+ }
248
+ ],
249
+ "stateMutability": "view"
250
+ },
251
+ {
252
+ "type": "function",
253
+ "name": "getCurrentBlockCoinbase",
254
+ "inputs": [],
255
+ "outputs": [
256
+ {
257
+ "name": "coinbase",
258
+ "type": "address",
259
+ "internalType": "address"
260
+ }
261
+ ],
262
+ "stateMutability": "view"
263
+ },
264
+ {
265
+ "type": "function",
266
+ "name": "getCurrentBlockDifficulty",
267
+ "inputs": [],
268
+ "outputs": [
269
+ {
270
+ "name": "difficulty",
271
+ "type": "uint256",
272
+ "internalType": "uint256"
273
+ }
274
+ ],
275
+ "stateMutability": "view"
276
+ },
277
+ {
278
+ "type": "function",
279
+ "name": "getCurrentBlockGasLimit",
280
+ "inputs": [],
281
+ "outputs": [
282
+ {
283
+ "name": "gaslimit",
284
+ "type": "uint256",
285
+ "internalType": "uint256"
286
+ }
287
+ ],
288
+ "stateMutability": "view"
289
+ },
290
+ {
291
+ "type": "function",
292
+ "name": "getCurrentBlockTimestamp",
293
+ "inputs": [],
294
+ "outputs": [
295
+ {
296
+ "name": "timestamp",
297
+ "type": "uint256",
298
+ "internalType": "uint256"
299
+ }
300
+ ],
301
+ "stateMutability": "view"
302
+ },
303
+ {
304
+ "type": "function",
305
+ "name": "getEthBalance",
306
+ "inputs": [
307
+ {
308
+ "name": "addr",
309
+ "type": "address",
310
+ "internalType": "address"
311
+ }
312
+ ],
313
+ "outputs": [
314
+ {
315
+ "name": "balance",
316
+ "type": "uint256",
317
+ "internalType": "uint256"
318
+ }
319
+ ],
320
+ "stateMutability": "view"
321
+ },
322
+ {
323
+ "type": "function",
324
+ "name": "getLastBlockHash",
325
+ "inputs": [],
326
+ "outputs": [
327
+ {
328
+ "name": "blockHash",
329
+ "type": "bytes32",
330
+ "internalType": "bytes32"
331
+ }
332
+ ],
333
+ "stateMutability": "view"
334
+ },
335
+ {
336
+ "type": "function",
337
+ "name": "tryAggregate",
338
+ "inputs": [
339
+ {
340
+ "name": "requireSuccess",
341
+ "type": "bool",
342
+ "internalType": "bool"
343
+ },
344
+ {
345
+ "name": "calls",
346
+ "type": "tuple[]",
347
+ "internalType": "struct CustomMulticall3.Call[]",
348
+ "components": [
349
+ {
350
+ "name": "target",
351
+ "type": "address",
352
+ "internalType": "address"
353
+ },
354
+ {
355
+ "name": "callData",
356
+ "type": "bytes",
357
+ "internalType": "bytes"
358
+ }
359
+ ]
360
+ }
361
+ ],
362
+ "outputs": [
363
+ {
364
+ "name": "returnData",
365
+ "type": "tuple[]",
366
+ "internalType": "struct CustomMulticall3.Result[]",
367
+ "components": [
368
+ {
369
+ "name": "success",
370
+ "type": "bool",
371
+ "internalType": "bool"
372
+ },
373
+ {
374
+ "name": "returnData",
375
+ "type": "bytes",
376
+ "internalType": "bytes"
377
+ }
378
+ ]
379
+ }
380
+ ],
381
+ "stateMutability": "payable"
382
+ },
383
+ {
384
+ "type": "function",
385
+ "name": "tryAggregatePreservingError",
386
+ "inputs": [
387
+ {
388
+ "name": "requireSuccess",
389
+ "type": "bool",
390
+ "internalType": "bool"
391
+ },
392
+ {
393
+ "name": "calls",
394
+ "type": "tuple[]",
395
+ "internalType": "struct CustomMulticall3.Call[]",
396
+ "components": [
397
+ {
398
+ "name": "target",
399
+ "type": "address",
400
+ "internalType": "address"
401
+ },
402
+ {
403
+ "name": "callData",
404
+ "type": "bytes",
405
+ "internalType": "bytes"
406
+ }
407
+ ]
408
+ }
409
+ ],
410
+ "outputs": [
411
+ {
412
+ "name": "returnData",
413
+ "type": "tuple[]",
414
+ "internalType": "struct CustomMulticall3.Result[]",
415
+ "components": [
416
+ {
417
+ "name": "success",
418
+ "type": "bool",
419
+ "internalType": "bool"
420
+ },
421
+ {
422
+ "name": "returnData",
423
+ "type": "bytes",
424
+ "internalType": "bytes"
425
+ }
426
+ ]
427
+ }
428
+ ],
429
+ "stateMutability": "payable"
430
+ },
431
+ {
432
+ "type": "function",
433
+ "name": "tryBlockAndAggregate",
434
+ "inputs": [
435
+ {
436
+ "name": "requireSuccess",
437
+ "type": "bool",
438
+ "internalType": "bool"
439
+ },
440
+ {
441
+ "name": "calls",
442
+ "type": "tuple[]",
443
+ "internalType": "struct CustomMulticall3.Call[]",
444
+ "components": [
445
+ {
446
+ "name": "target",
447
+ "type": "address",
448
+ "internalType": "address"
449
+ },
450
+ {
451
+ "name": "callData",
452
+ "type": "bytes",
453
+ "internalType": "bytes"
454
+ }
455
+ ]
456
+ }
457
+ ],
458
+ "outputs": [
459
+ {
460
+ "name": "blockNumber",
461
+ "type": "uint256",
462
+ "internalType": "uint256"
463
+ },
464
+ {
465
+ "name": "blockHash",
466
+ "type": "bytes32",
467
+ "internalType": "bytes32"
468
+ },
469
+ {
470
+ "name": "returnData",
471
+ "type": "tuple[]",
472
+ "internalType": "struct CustomMulticall3.Result[]",
473
+ "components": [
474
+ {
475
+ "name": "success",
476
+ "type": "bool",
477
+ "internalType": "bool"
478
+ },
479
+ {
480
+ "name": "returnData",
481
+ "type": "bytes",
482
+ "internalType": "bytes"
483
+ }
484
+ ]
485
+ }
486
+ ],
487
+ "stateMutability": "payable"
488
+ }
489
+ ]
490
+ }
@@ -1,22 +1,22 @@
1
1
  import { ethers } from 'ethers';
2
2
  import { abi as CoreAbi } from './abis/CoreProxy.json';
3
- import { abi as MulticallAbi } from './abis/MulticallV2.json';
3
+ import { abi as MulticallAbi } from './abis/CustomMulticall3.json';
4
4
 
5
5
  export type Call = {
6
6
  target: string;
7
7
  callData: string;
8
8
  };
9
9
 
10
- export const encodeCoreMulticall = (calls: Call[]): string => {
10
+ export const encodeCoreMulticall = (calldatas: string[]): string => {
11
11
  const functionSignature = 'tryAggregate';
12
- const parameters: [boolean, string[]] = [false, calls.map((c) => c.callData)];
12
+ const parameters: [boolean, string[]] = [false, calldatas];
13
13
  const INTERFACE = new ethers.Interface(CoreAbi);
14
14
  const calldata = INTERFACE.encodeFunctionData(functionSignature, parameters);
15
15
  return calldata;
16
16
  };
17
17
 
18
18
  const encodeMulticall = (requireSuccess: boolean, calls: Call[]): string => {
19
- const functionSignature = 'tryAggregate';
19
+ const functionSignature = 'tryAggregatePreservingError';
20
20
  const parameters: [boolean, Call[]] = [requireSuccess, calls];
21
21
  const INTERFACE = new ethers.Interface(MulticallAbi);
22
22
  const calldata = INTERFACE.encodeFunctionData(functionSignature, parameters);
@@ -23,7 +23,7 @@ const addresses: Record<ReyaChainId, Record<ContractType, Address>> = {
23
23
  '0x9ec177fed042ef2307928be2f5cdbf663b20244b',
24
24
  [ContractType.ORACLE_ADAPTERS_PROXY]:
25
25
  '0xc501a2356703cd351703d68963c6f4136120f7cf',
26
- [ContractType.MULTICALL]: '0xd9f0f399f5264faac91476dbd950574726d18633',
26
+ [ContractType.MULTICALL]: '0x5abde4f0af8eaf3c9967f7fa126e59a103357b5c',
27
27
  },
28
28
  [ReyaChainId.reyaNetwork]: {
29
29
  [ContractType.CORE_PROXY]: '0xa763b6a5e09378434406c003dae6487fbbdc1a80',
@@ -37,7 +37,7 @@ const addresses: Record<ReyaChainId, Record<ContractType, Address>> = {
37
37
  '0x27e5cb712334e101b3c232eb0be198baaa595f5f',
38
38
  [ContractType.ORACLE_ADAPTERS_PROXY]:
39
39
  '0x32edabc058c1207fe0ec5f8557643c28e4ff379e',
40
- [ContractType.MULTICALL]: '0x82a55eb2346277d85d5d0a60101ebd0f02680b0d',
40
+ [ContractType.MULTICALL]: '0xed28d27dfca47ad2513c9f2e2d3c098c2ea5a47f',
41
41
  },
42
42
  };
43
43
  export const getAddress = (
@@ -36,11 +36,34 @@ export async function estimateGas(
36
36
  > {
37
37
  const accountAddress = await signer.getAddress();
38
38
 
39
+ return estimateGasGivenAddress(
40
+ accountAddress,
41
+ data,
42
+ value,
43
+ chainId,
44
+ targetContract,
45
+ );
46
+ }
47
+
48
+ export async function estimateGasGivenAddress(
49
+ accountAddress: string,
50
+ data: string,
51
+ value: string,
52
+ chainId: number,
53
+ targetContract: ContractType | string,
54
+ ): Promise<
55
+ Transaction & {
56
+ gasLimit: bigint;
57
+ maxPriorityFeePerGas?: bigint;
58
+ maxFeePerGas?: bigint;
59
+ }
60
+ > {
39
61
  const contractAddress = Object.values(ContractType).includes(
40
62
  targetContract as ContractType,
41
63
  )
42
64
  ? getAddress(chainId, targetContract as ContractType)
43
65
  : targetContract;
66
+
44
67
  const tx = {
45
68
  from: accountAddress, // @todo Update with relayer address
46
69
  to: contractAddress,
@@ -1,6 +1,6 @@
1
1
  export * from './action';
2
2
  export { abi as CoreAbi } from './abis/CoreProxy.json';
3
- export { abi as MulticallAbi } from './abis/MulticallV2.json';
3
+ export { abi as MulticallAbi } from './abis/CustomMulticall3.json';
4
4
  export { abi as OracleAdaptersAbi } from './abis/OracleAdaptersProxy.json';
5
5
  export { abi as PeripheryAbi } from './abis/Periphery.json';
6
6
  export { abi as Socket_VaultWithPayloadAbi } from './abis/socket/VaultWithPayload.json';
package/src/types.ts CHANGED
@@ -877,6 +877,7 @@ export type TransactionExecutionMetadata = {
877
877
 
878
878
  export type TransactionExecutionOutput = {
879
879
  txHash: string;
880
+ errorMessage?: string;
880
881
  accountId?: string | null;
881
882
  coreSigNonce?: string | null;
882
883
  poolSigNonce?: string | null;
@@ -6,3 +6,4 @@ export * from './timestamp';
6
6
  export * from './token';
7
7
  export * from './task-wrapper';
8
8
  export * from './whitelisted-wallets';
9
+ export * from './stringify';