From 822d7afd0519cc06716a07b407beb6a63af3c955 Mon Sep 17 00:00:00 2001 From: imsk17 Date: Sat, 16 Mar 2024 16:33:03 +0530 Subject: [PATCH] Chain: Aptos: Update Aptos Address and ABI --- src/factory/factories.ts | 2 +- src/helpers/aptos/bridge_client_abis.ts | 24 +++++++++++------------- src/helpers/aptos/index.ts | 6 +++++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/factory/factories.ts b/src/factory/factories.ts index 277085d8c..6ac5b503c 100644 --- a/src/factory/factories.ts +++ b/src/factory/factories.ts @@ -250,7 +250,7 @@ export namespace ChainFactoryConfigs { aptosParams: { rpcUrl: TestNetRpcUri.APTOS, bridge: - "0x42ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e", + "0xbfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd07", xpnft: "XPNFT", notifier, feeMargin, diff --git a/src/helpers/aptos/bridge_client_abis.ts b/src/helpers/aptos/bridge_client_abis.ts index 9f677bb16..2ed4cb757 100644 --- a/src/helpers/aptos/bridge_client_abis.ts +++ b/src/helpers/aptos/bridge_client_abis.ts @@ -27,29 +27,27 @@ export const MAINNET_BRIDGE_ABIS = [ export const TESTNET_BRIDGE_ABIS = [ // ../build/aptos-bridge/abis/bridge/initialize.abi - "010a696e697469616c697a6542ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e066272696467650000010967726f75705f6b65790601", + "010a696e697469616c697a65bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd07066272696467650000010967726f75705f6b65790601", // ../build/aptos-bridge/abis/bridge/pause.abi - "0105706175736542ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e0662726964676500000209616374696f6e5f696403097369676e61747572650601", + "01057061757365bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd070662726964676500000209616374696f6e5f696403097369676e61747572650601", // ../build/aptos-bridge/abis/bridge/unpause.abi - "0107756e706175736542ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e0662726964676500000209616374696f6e5f696403097369676e61747572650601", + "0107756e7061757365bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd070662726964676500000209616374696f6e5f696403097369676e61747572650601", // ../build/aptos-bridge/abis/bridge/update_group_key.abi - "01107570646174655f67726f75705f6b657942ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e066272696467650000030d6e65775f67726f75705f6b6579060109616374696f6e5f696403097369676e61747572650601", + "01107570646174655f67726f75705f6b6579bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd07066272696467650000030d6e65775f67726f75705f6b6579060109616374696f6e5f696403097369676e61747572650601", // ../build/aptos-bridge/abis/bridge/validate_whitelist.abi - "011276616c69646174655f77686974656c69737442ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e0662726964676500000412636f6c6c656374696f6e5f63726561746f72040f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e670009616374696f6e5f696403097369676e61747572650601", + "011276616c69646174655f77686974656c697374bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd070662726964676500000412636f6c6c656374696f6e5f63726561746f72040f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e670009616374696f6e5f696403097369676e61747572650601", // ../build/aptos-bridge/abis/bridge/validate_blacklist.abi - "011276616c69646174655f626c61636b6c69737442ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e0662726964676500000412636f6c6c656374696f6e5f63726561746f72040f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e670009616374696f6e5f696403097369676e61747572650601", + "011276616c69646174655f626c61636b6c697374bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd070662726964676500000412636f6c6c656374696f6e5f63726561746f72040f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e670009616374696f6e5f696403097369676e61747572650601", // ../build/aptos-bridge/abis/bridge/validate_withdraw_fees.abi - "011676616c69646174655f77697468647261775f6665657342ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e0662726964676500000302746f0409616374696f6e5f696403097369676e61747572650601", + "011676616c69646174655f77697468647261775f66656573bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd070662726964676500000302746f0409616374696f6e5f696403097369676e61747572650601", // ../build/aptos-bridge/abis/bridge/validate_tranfer_nft.abi - "011576616c69646174655f7472616e736665725f6e667442ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e0662726964676500000c0a636f6c6c656374696f6e07000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700046e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67000b6465736372697074696f6e07000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700076d6178696d756d020375726907000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e670015726f79616c74795f70617965655f61646472657373041a726f79616c74795f706f696e74735f64656e6f6d696e61746f720218726f79616c74795f706f696e74735f6e756d657261746f72020e6d75746174655f73657474696e67060002746f0409616374696f6e5f696403097369676e61747572650601", + "011576616c69646174655f7472616e736665725f6e6674bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd070662726964676500000c0a636f6c6c656374696f6e07000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700046e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67000b6465736372697074696f6e07000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700076d6178696d756d020375726907000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e670015726f79616c74795f70617965655f61646472657373041a726f79616c74795f706f696e74735f64656e6f6d696e61746f720218726f79616c74795f706f696e74735f6e756d657261746f72020e6d75746174655f73657474696e67060002746f0409616374696f6e5f696403097369676e61747572650601", // ../build/aptos-bridge/abis/bridge/withdraw_nft.abi - "010c77697468647261775f6e667442ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e0662726964676500000812636f6c6c656374696f6e5f63726561746f72040f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67000a746f6b656e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67001070726f70657274795f76657273696f6e02057072696365020b636861696e5f6e6f6e63650202746f07000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700096d696e745f7769746807000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700", + "010c77697468647261775f6e6674bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd070662726964676500000812636f6c6c656374696f6e5f63726561746f72040f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67000a746f6b656e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67001070726f70657274795f76657273696f6e02057072696365020b636861696e5f6e6f6e63650202746f07000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700096d696e745f7769746807000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700", // ../build/aptos-bridge/abis/bridge/freeze_nft.abi - "010a667265657a655f6e667442ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e0662726964676500000812636f6c6c656374696f6e5f63726561746f72040f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67000a746f6b656e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67001070726f70657274795f76657273696f6e02057072696365020b636861696e5f6e6f6e63650202746f07000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700096d696e745f7769746807000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700", + "010a667265657a655f6e6674bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd070662726964676500000812636f6c6c656374696f6e5f63726561746f72040f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67000a746f6b656e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67001070726f70657274795f76657273696f6e02057072696365020b636861696e5f6e6f6e63650202746f07000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700096d696e745f7769746807000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700", // ../build/aptos-bridge/abis/bridge/validate_unfreeze_nft.abi - "011576616c69646174655f756e667265657a655f6e667442ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e0662726964676500000712636f6c6c656374696f6e5f63726561746f72040f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67000a746f6b656e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67001070726f70657274795f76657273696f6e0202746f0409616374696f6e5f696403097369676e61747572650601", - // ../build/aptos-bridge/abis/bridge/create_collection.abi - "01116372656174655f636f6c6c656374696f6e42ef1f5fcf8398a07c57d8320f510e82588bac408d820679918c0f87270e932e066272696467650000050f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e670016636f6c6c656374696f6e5f6465736372697074696f6e07000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67000e636f6c6c656374696f6e5f75726907000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e6700076d6178696d756d020e6d75746174655f73657474696e670600", + "011576616c69646174655f756e667265657a655f6e6674bfe94f90e13feb17c09c638dae30830b2f2d98f188071538bdaa4896377ecd070662726964676500000712636f6c6c656374696f6e5f63726561746f72040f636f6c6c656374696f6e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67000a746f6b656e5f6e616d6507000000000000000000000000000000000000000000000000000000000000000106737472696e6706537472696e67001070726f70657274795f76657273696f6e0202746f0409616374696f6e5f696403097369676e61747572650601", ]; export const STAGING_BRIDGE_ABIS = [ // ../build/aptos-bridge/abis/bridge/initialize.abi diff --git a/src/helpers/aptos/index.ts b/src/helpers/aptos/index.ts index b257e8815..6412d6622 100644 --- a/src/helpers/aptos/index.ts +++ b/src/helpers/aptos/index.ts @@ -9,6 +9,7 @@ import { UnfreezeForeignNft, ValidateAddress, BalanceCheck, + GetExtraFees, } from "../chain"; import { @@ -70,7 +71,7 @@ export type AptosHelper = ChainNonceGet & ClaimNFT & BalanceCheck & { setPetraSigner(signer: any): void; - }; + } & GetExtraFees; export type AptosParams = { feeMargin: FeeMargins; @@ -130,6 +131,9 @@ export async function aptosHelper({ async estimateValidateUnfreezeNft(_to, _metadata, _mintWith) { return new BigNumber(0); }, + getExtraFees: () => { + return new BigNumber(0); + }, async transferNftToForeign( sender, chain_nonce,