From b10ac05e8633bf99ffe577d9095b0eeea1dfd515 Mon Sep 17 00:00:00 2001 From: Adarsh Ravichandran Date: Tue, 21 Jan 2025 19:17:56 +0530 Subject: [PATCH] chore(sdk-coin-bera): add bera Cartio testnet Ticket: WIN-4388 --- modules/sdk-coin-bera/src/lib/resources.ts | 2 +- modules/sdk-coin-bera/test/resources.ts | 18 ++- modules/sdk-coin-bera/test/unit/bera.ts | 2 +- .../addressInitialization.ts | 2 +- .../test/unit/transactionBuilder/send.ts | 2 +- .../walletInitialization.ts | 109 ------------------ modules/statics/src/coins.ts | 2 +- modules/statics/src/networks.ts | 18 ++- 8 files changed, 21 insertions(+), 134 deletions(-) delete mode 100644 modules/sdk-coin-bera/test/unit/transactionBuilder/walletInitialization.ts diff --git a/modules/sdk-coin-bera/src/lib/resources.ts b/modules/sdk-coin-bera/src/lib/resources.ts index 13690f16f7..89088136f7 100644 --- a/modules/sdk-coin-bera/src/lib/resources.ts +++ b/modules/sdk-coin-bera/src/lib/resources.ts @@ -3,7 +3,7 @@ import { coins, EthereumNetwork } from '@bitgo/statics'; export const testnetCommon = EthereumCommon.custom( { - name: 'Berachain bArtio', + name: 'Berachain cArtio', networkId: (coins.get('tbera').network as EthereumNetwork).chainId, chainId: (coins.get('tbera').network as EthereumNetwork).chainId, }, diff --git a/modules/sdk-coin-bera/test/resources.ts b/modules/sdk-coin-bera/test/resources.ts index ab79c2fdef..1da9fe6a55 100644 --- a/modules/sdk-coin-bera/test/resources.ts +++ b/modules/sdk-coin-bera/test/resources.ts @@ -2,7 +2,7 @@ import { ETHTransactionType, KeyPair, LegacyTxData } from '@bitgo/abstract-eth'; import { Networks } from '@bitgo/statics'; export const ENCODED_TRANSACTION = - '0xf91661010a822ee09419645032c7f1533395d44a629462e751084d3e4c8204d2b915fb60606040526000600160006101000a81548160ff021916908315150217905550341561002a57600080fd5b60405161155b38038061155b833981016040528080518201919050506003815114151561005657600080fd5b806000908051906020019061006c929190610073565b5050610140565b8280548282559060005260206000209081019282156100ec579160200282015b828111156100eb5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190610093565b5b5090506100f991906100fd565b5090565b61013d91905b8082111561013957600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101610103565b5090565b90565b61140c8061014f6000396000f300606060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dcd7a6c146101335780632079fb9a146101e95780632da034091461024c57806339125215146102a45780637df73e271461037e578063a0b7967b146103cf578063a68a76cc146103f8578063abe3219c1461044d578063fc0f392d1461047a575b6000341115610131577f6e89d517057028190560dd200cf6bf792842861353d1173761dfa362e1c133f03334600036604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001828103825284848281815260200192508082843782019150509550505050505060405180910390a15b005b341561013e57600080fd5b6101e7600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061048f565b005b34156101f457600080fd5b61020a6004808035906020019091905050610668565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561025757600080fd5b6102a2600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106a7565b005b34156102af57600080fd5b61037c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610773565b005b341561038957600080fd5b6103b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a72565b604051808215151515815260200191505060405180910390f35b34156103da57600080fd5b6103e2610b16565b6040518082815260200191505060405180910390f35b341561040357600080fd5b61040b610b70565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561045857600080fd5b610460610b95565b604051808215151515815260200191505060405180910390f35b341561048557600080fd5b61048d610ba8565b005b60008061049b33610a72565b15156104a657600080fd5b878787878760405180807f45524332300000000000000000000000000000000000000000000000000000008152506005018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140183815260200182815260200195505050505050604051809103902091506105898883858888610c3b565b508590508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb89896000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561063857600080fd5b6102c65a03f1151561064957600080fd5b50505060405180519050151561065e57600080fd5b5050505050505050565b60008181548110151561067757fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006106b233610a72565b15156106bd57600080fd5b8290508073ffffffffffffffffffffffffffffffffffffffff16633ef13367836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b151561075a57600080fd5b6102c65a03f1151561076b57600080fd5b505050505050565b60008061077f33610a72565b151561078a57600080fd5b878787878760405180807f45544845520000000000000000000000000000000000000000000000000000008152506005018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184805190602001908083835b602083101515610833578051825260208201915060208101905060208303925061080e565b6001836020036101000a038019825116818451168082178552505050505050905001838152602001828152602001955050505050506040518091039020915061087f8883858888610c3b565b90508773ffffffffffffffffffffffffffffffffffffffff16878760405180828051906020019080838360005b838110156108c75780820151818401526020810190506108ac565b50505050905090810190601f1680156108f45780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876187965a03f192505050151561091857600080fd5b7f59bed9ab5d78073465dd642a9e3e76dfdb7d53bcae9d09df7d0b8f5234d5a8063382848b8b8b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610a29578082015181840152602081019050610a0e565b50505050905090810190601f168015610a565780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15050505050505050565b600080600090505b600080549050811015610b0b578273ffffffffffffffffffffffffffffffffffffffff16600082815481101515610aad57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610afe5760019150610b10565b8080600101915050610a7a565b600091505b50919050565b6000806000809150600090505b600a811015610b655781600282600a81101515610b3c57fe5b01541115610b5857600281600a81101515610b5357fe5b015491505b8080600101915050610b23565b600182019250505090565b6000610b7a610e90565b604051809103906000f0801515610b9057600080fd5b905090565b600160009054906101000a900460ff1681565b610bb133610a72565b1515610bbc57600080fd5b60018060006101000a81548160ff0219169083151502179055507f0909e8f76a4fd3e970f2eaef56c0ee6dfaf8b87c5b8d3f56ffce78e825a9115733604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600080610c488686610ce6565b9050600160009054906101000a900460ff168015610c6c5750610c6a87610a72565b155b15610c7657600080fd5b42841015610c8357600080fd5b610c8c83610db9565b610c9581610a72565b1515610ca057600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cd957600080fd5b8091505095945050505050565b60008060008060418551141515610cfc57600080fd5b602085015192506040850151915060ff6041860151169050601b8160ff161015610d2757601b810190505b600186828585604051600081526020016040526000604051602001526040518085600019166000191681526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001945050505050602060405160208103908084039060008661646e5a03f11515610da557600080fd5b505060206040510351935050505092915050565b600080610dc533610a72565b1515610dd057600080fd5b60009150600090505b600a811015610e385782600282600a81101515610df257fe5b01541415610dff57600080fd5b600282600a81101515610e0e57fe5b0154600282600a81101515610e1f57fe5b01541015610e2b578091505b8080600101915050610dd9565b600282600a81101515610e4757fe5b0154831015610e5557600080fd5b612710600283600a81101515610e6757fe5b015401831115610e7657600080fd5b82600283600a81101515610e8657fe5b0181905550505050565b60405161054080610ea18339019056006060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506104e28061005e6000396000f300606060405260043610610056576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062821de3146101475780633ef133671461019c5780636b9f96ea146101d5575b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015156100b757600080fd5b7f69b31548dea9b3b707b4dff357d326e3e9348b24e7a6080a218a6edeeec48f9b3334600036604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001828103825284848281815260200192508082843782019150509550505050505060405180910390a1005b341561015257600080fd5b61015a6101ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101a757600080fd5b6101d3600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061020f565b005b34156101e057600080fd5b6101e861043c565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561026f57600080fd5b8392503091508273ffffffffffffffffffffffffffffffffffffffff166370a08231836000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561031857600080fd5b6102c65a03f1151561032957600080fd5b505050604051805190509050600081141561034357610436565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561040f57600080fd5b6102c65a03f1151561042057600080fd5b50505060405180519050151561043557600080fd5b5b50505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015156104b457600080fd5b5600a165627a7a72305820088cce905e424bfe474510efe41761893e9e34b54b885b8fee546d8be88aee3c0029a165627a7a72305820827adc3ef3a179757bc33003e41070fbbfcdfc5db31275af3cb0395155cd3bbb0029000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000008775ed5a9f67f90a017afb46980bfdae423dd41c00000000000000000000000042ff8ce0f79b69993893cef89412a4c48b7d29af0000000000000000000000007ae2ccba98e20daa6f6271cdf97a79c0274856f7830271cca0fc8b292b95dcabc8397ab4da647c153dcaad575ca27e01b074d125c0ad7e4765a07d8f74d08c62a8885a1b48239fd89e4c072a44b8ceaeed7bc94799c5b8b20780'; + '0xf91661010a822ee09419645032c7f1533395d44a629462e751084d3e4c8204d2b915fb60606040526000600160006101000a81548160ff021916908315150217905550341561002a57600080fd5b60405161155b38038061155b833981016040528080518201919050506003815114151561005657600080fd5b806000908051906020019061006c929190610073565b5050610140565b8280548282559060005260206000209081019282156100ec579160200282015b828111156100eb5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190610093565b5b5090506100f991906100fd565b5090565b61013d91905b8082111561013957600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101610103565b5090565b90565b61140c8061014f6000396000f300606060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dcd7a6c146101335780632079fb9a146101e95780632da034091461024c57806339125215146102a45780637df73e271461037e578063a0b7967b146103cf578063a68a76cc146103f8578063abe3219c1461044d578063fc0f392d1461047a575b6000341115610131577f6e89d517057028190560dd200cf6bf792842861353d1173761dfa362e1c133f03334600036604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001828103825284848281815260200192508082843782019150509550505050505060405180910390a15b005b341561013e57600080fd5b6101e7600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061048f565b005b34156101f457600080fd5b61020a6004808035906020019091905050610668565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561025757600080fd5b6102a2600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106a7565b005b34156102af57600080fd5b61037c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610773565b005b341561038957600080fd5b6103b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a72565b604051808215151515815260200191505060405180910390f35b34156103da57600080fd5b6103e2610b16565b6040518082815260200191505060405180910390f35b341561040357600080fd5b61040b610b70565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561045857600080fd5b610460610b95565b604051808215151515815260200191505060405180910390f35b341561048557600080fd5b61048d610ba8565b005b60008061049b33610a72565b15156104a657600080fd5b878787878760405180807f45524332300000000000000000000000000000000000000000000000000000008152506005018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140183815260200182815260200195505050505050604051809103902091506105898883858888610c3b565b508590508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb89896000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561063857600080fd5b6102c65a03f1151561064957600080fd5b50505060405180519050151561065e57600080fd5b5050505050505050565b60008181548110151561067757fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006106b233610a72565b15156106bd57600080fd5b8290508073ffffffffffffffffffffffffffffffffffffffff16633ef13367836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b151561075a57600080fd5b6102c65a03f1151561076b57600080fd5b505050505050565b60008061077f33610a72565b151561078a57600080fd5b878787878760405180807f45544845520000000000000000000000000000000000000000000000000000008152506005018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184805190602001908083835b602083101515610833578051825260208201915060208101905060208303925061080e565b6001836020036101000a038019825116818451168082178552505050505050905001838152602001828152602001955050505050506040518091039020915061087f8883858888610c3b565b90508773ffffffffffffffffffffffffffffffffffffffff16878760405180828051906020019080838360005b838110156108c75780820151818401526020810190506108ac565b50505050905090810190601f1680156108f45780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876187965a03f192505050151561091857600080fd5b7f59bed9ab5d78073465dd642a9e3e76dfdb7d53bcae9d09df7d0b8f5234d5a8063382848b8b8b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610a29578082015181840152602081019050610a0e565b50505050905090810190601f168015610a565780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15050505050505050565b600080600090505b600080549050811015610b0b578273ffffffffffffffffffffffffffffffffffffffff16600082815481101515610aad57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610afe5760019150610b10565b8080600101915050610a7a565b600091505b50919050565b6000806000809150600090505b600a811015610b655781600282600a81101515610b3c57fe5b01541115610b5857600281600a81101515610b5357fe5b015491505b8080600101915050610b23565b600182019250505090565b6000610b7a610e90565b604051809103906000f0801515610b9057600080fd5b905090565b600160009054906101000a900460ff1681565b610bb133610a72565b1515610bbc57600080fd5b60018060006101000a81548160ff0219169083151502179055507f0909e8f76a4fd3e970f2eaef56c0ee6dfaf8b87c5b8d3f56ffce78e825a9115733604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600080610c488686610ce6565b9050600160009054906101000a900460ff168015610c6c5750610c6a87610a72565b155b15610c7657600080fd5b42841015610c8357600080fd5b610c8c83610db9565b610c9581610a72565b1515610ca057600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cd957600080fd5b8091505095945050505050565b60008060008060418551141515610cfc57600080fd5b602085015192506040850151915060ff6041860151169050601b8160ff161015610d2757601b810190505b600186828585604051600081526020016040526000604051602001526040518085600019166000191681526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001945050505050602060405160208103908084039060008661646e5a03f11515610da557600080fd5b505060206040510351935050505092915050565b600080610dc533610a72565b1515610dd057600080fd5b60009150600090505b600a811015610e385782600282600a81101515610df257fe5b01541415610dff57600080fd5b600282600a81101515610e0e57fe5b0154600282600a81101515610e1f57fe5b01541015610e2b578091505b8080600101915050610dd9565b600282600a81101515610e4757fe5b0154831015610e5557600080fd5b612710600283600a81101515610e6757fe5b015401831115610e7657600080fd5b82600283600a81101515610e8657fe5b0181905550505050565b60405161054080610ea18339019056006060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506104e28061005e6000396000f300606060405260043610610056576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062821de3146101475780633ef133671461019c5780636b9f96ea146101d5575b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015156100b757600080fd5b7f69b31548dea9b3b707b4dff357d326e3e9348b24e7a6080a218a6edeeec48f9b3334600036604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001828103825284848281815260200192508082843782019150509550505050505060405180910390a1005b341561015257600080fd5b61015a6101ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101a757600080fd5b6101d3600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061020f565b005b34156101e057600080fd5b6101e861043c565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561026f57600080fd5b8392503091508273ffffffffffffffffffffffffffffffffffffffff166370a08231836000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561031857600080fd5b6102c65a03f1151561032957600080fd5b505050604051805190509050600081141561034357610436565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561040f57600080fd5b6102c65a03f1151561042057600080fd5b50505060405180519050151561043557600080fd5b5b50505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015156104b457600080fd5b5600a165627a7a72305820088cce905e424bfe474510efe41761893e9e34b54b885b8fee546d8be88aee3c0029a165627a7a72305820827adc3ef3a179757bc33003e41070fbbfcdfc5db31275af3cb0395155cd3bbb0029000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000008775ed5a9f67f90a017afb46980bfdae423dd41c00000000000000000000000042ff8ce0f79b69993893cef89412a4c48b7d29af0000000000000000000000007ae2ccba98e20daa6f6271cdf97a79c0274856f783027123a0b9f12b3d323c637f6c23bf26ea8d394c1428352745b98dd4c3be8a9ef7448d32a02ec4d64deb8d9c09a4a65861e40354eb7a9b76c36577615dbadc2b279cc4f40b'; export const TXDATA: LegacyTxData = { _type: ETHTransactionType.LEGACY, @@ -10,10 +10,10 @@ export const TXDATA: LegacyTxData = { data: '0x60606040526000600160006101000a81548160ff021916908315150217905550341561002a57600080fd5b60405161155b38038061155b833981016040528080518201919050506003815114151561005657600080fd5b806000908051906020019061006c929190610073565b5050610140565b8280548282559060005260206000209081019282156100ec579160200282015b828111156100eb5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190610093565b5b5090506100f991906100fd565b5090565b61013d91905b8082111561013957600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101610103565b5090565b90565b61140c8061014f6000396000f300606060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630dcd7a6c146101335780632079fb9a146101e95780632da034091461024c57806339125215146102a45780637df73e271461037e578063a0b7967b146103cf578063a68a76cc146103f8578063abe3219c1461044d578063fc0f392d1461047a575b6000341115610131577f6e89d517057028190560dd200cf6bf792842861353d1173761dfa362e1c133f03334600036604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001828103825284848281815260200192508082843782019150509550505050505060405180910390a15b005b341561013e57600080fd5b6101e7600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061048f565b005b34156101f457600080fd5b61020a6004808035906020019091905050610668565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561025757600080fd5b6102a2600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106a7565b005b34156102af57600080fd5b61037c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610773565b005b341561038957600080fd5b6103b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a72565b604051808215151515815260200191505060405180910390f35b34156103da57600080fd5b6103e2610b16565b6040518082815260200191505060405180910390f35b341561040357600080fd5b61040b610b70565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561045857600080fd5b610460610b95565b604051808215151515815260200191505060405180910390f35b341561048557600080fd5b61048d610ba8565b005b60008061049b33610a72565b15156104a657600080fd5b878787878760405180807f45524332300000000000000000000000000000000000000000000000000000008152506005018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140183815260200182815260200195505050505050604051809103902091506105898883858888610c3b565b508590508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb89896000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561063857600080fd5b6102c65a03f1151561064957600080fd5b50505060405180519050151561065e57600080fd5b5050505050505050565b60008181548110151561067757fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006106b233610a72565b15156106bd57600080fd5b8290508073ffffffffffffffffffffffffffffffffffffffff16633ef13367836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b151561075a57600080fd5b6102c65a03f1151561076b57600080fd5b505050505050565b60008061077f33610a72565b151561078a57600080fd5b878787878760405180807f45544845520000000000000000000000000000000000000000000000000000008152506005018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184805190602001908083835b602083101515610833578051825260208201915060208101905060208303925061080e565b6001836020036101000a038019825116818451168082178552505050505050905001838152602001828152602001955050505050506040518091039020915061087f8883858888610c3b565b90508773ffffffffffffffffffffffffffffffffffffffff16878760405180828051906020019080838360005b838110156108c75780820151818401526020810190506108ac565b50505050905090810190601f1680156108f45780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876187965a03f192505050151561091857600080fd5b7f59bed9ab5d78073465dd642a9e3e76dfdb7d53bcae9d09df7d0b8f5234d5a8063382848b8b8b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185600019166000191681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610a29578082015181840152602081019050610a0e565b50505050905090810190601f168015610a565780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15050505050505050565b600080600090505b600080549050811015610b0b578273ffffffffffffffffffffffffffffffffffffffff16600082815481101515610aad57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610afe5760019150610b10565b8080600101915050610a7a565b600091505b50919050565b6000806000809150600090505b600a811015610b655781600282600a81101515610b3c57fe5b01541115610b5857600281600a81101515610b5357fe5b015491505b8080600101915050610b23565b600182019250505090565b6000610b7a610e90565b604051809103906000f0801515610b9057600080fd5b905090565b600160009054906101000a900460ff1681565b610bb133610a72565b1515610bbc57600080fd5b60018060006101000a81548160ff0219169083151502179055507f0909e8f76a4fd3e970f2eaef56c0ee6dfaf8b87c5b8d3f56ffce78e825a9115733604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600080610c488686610ce6565b9050600160009054906101000a900460ff168015610c6c5750610c6a87610a72565b155b15610c7657600080fd5b42841015610c8357600080fd5b610c8c83610db9565b610c9581610a72565b1515610ca057600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cd957600080fd5b8091505095945050505050565b60008060008060418551141515610cfc57600080fd5b602085015192506040850151915060ff6041860151169050601b8160ff161015610d2757601b810190505b600186828585604051600081526020016040526000604051602001526040518085600019166000191681526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001945050505050602060405160208103908084039060008661646e5a03f11515610da557600080fd5b505060206040510351935050505092915050565b600080610dc533610a72565b1515610dd057600080fd5b60009150600090505b600a811015610e385782600282600a81101515610df257fe5b01541415610dff57600080fd5b600282600a81101515610e0e57fe5b0154600282600a81101515610e1f57fe5b01541015610e2b578091505b8080600101915050610dd9565b600282600a81101515610e4757fe5b0154831015610e5557600080fd5b612710600283600a81101515610e6757fe5b015401831115610e7657600080fd5b82600283600a81101515610e8657fe5b0181905550505050565b60405161054080610ea18339019056006060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506104e28061005e6000396000f300606060405260043610610056576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062821de3146101475780633ef133671461019c5780636b9f96ea146101d5575b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015156100b757600080fd5b7f69b31548dea9b3b707b4dff357d326e3e9348b24e7a6080a218a6edeeec48f9b3334600036604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001828103825284848281815260200192508082843782019150509550505050505060405180910390a1005b341561015257600080fd5b61015a6101ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101a757600080fd5b6101d3600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061020f565b005b34156101e057600080fd5b6101e861043c565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561026f57600080fd5b8392503091508273ffffffffffffffffffffffffffffffffffffffff166370a08231836000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561031857600080fd5b6102c65a03f1151561032957600080fd5b505050604051805190509050600081141561034357610436565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561040f57600080fd5b6102c65a03f1151561042057600080fd5b50505060405180519050151561043557600080fd5b5b50505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015156104b457600080fd5b5600a165627a7a72305820088cce905e424bfe474510efe41761893e9e34b54b885b8fee546d8be88aee3c0029a165627a7a72305820827adc3ef3a179757bc33003e41070fbbfcdfc5db31275af3cb0395155cd3bbb0029000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000008775ed5a9f67f90a017afb46980bfdae423dd41c00000000000000000000000042ff8ce0f79b69993893cef89412a4c48b7d29af0000000000000000000000007ae2ccba98e20daa6f6271cdf97a79c0274856f7', gasLimit: '12000', gasPrice: '10', - chainId: '0x138d4', + chainId: '0x13880', value: '1234', to: '0x19645032c7f1533395d44a629462e751084d3e4c', - id: '0xf56bd60b509a4a9899e9d3a5c4d0be0631f2437b70901ab91b2aacc33bad2059', + id: '0xf4eddb8ef3c920535de4cc55bc85f0c53f1db0c4cdeb392b5e616af015bdabf5', }; export const UNSIGNED_TX = @@ -45,12 +45,10 @@ export const SEND_FUNDS_NO_KEY_DATA = '0x391252150000000000000000000000007325a3f7d4f9e86ae62cf742426078c3755730d5000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000005ec6ab34000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'; export const SEND_TX_BROADCAST_LEGACY = - '0xf901cd02843b9aca0083b8a1a0948f977e912ef500548a0c3be6ddde9899f1199b8180b901643912521500000000000000000000000019645032c7f1533395d44a629462e751084d3e4c000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000005ec67e28000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000410efeb973a42d4bef372ea5934215190036b905b5bd337228b3e0983487de4f3e31c55bcd997d4d9c8a9912bfed98b55851c6981bdb79c86d9e82d7ba8a0f80561b00000000000000000000000000000000000000000000000000000000000000830271cca09a68877b00f6ef1b307ebd9778a3fd45cb119cc7de35113f2b27be1a9f3bb553a024e31e563264c22c975c9eb0089fd1e1c03a1798d1703450eb647f3d1895df79'; + '0xf901cd02843b9aca0083b8a1a0948f977e912ef500548a0c3be6ddde9899f1199b8180b901643912521500000000000000000000000019645032c7f1533395d44a629462e751084d3e4c000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000005ec67e28000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041283cb22264ed2322318b13192ca3dd71637f6f14e7212d70d3ed41160c10b9a70915acb0db5c9adb8f14ebc6246968e199e8dbe0ad292d1112997a2c26611e541b0000000000000000000000000000000000000000000000000000000000000083027124a005afba305a06936b21508a80e50d5256fd6c2184d5cfacb6458ff4b3d27020bda0741572d2eecfe49706e7d2b330be5a4ce75647c25c348a690e67d9d5864881e0'; export const SEND_TX_AMOUNT_ZERO_BROADCAST = - '0xf901cd02843b9aca0083b8a1a0948f977e912ef500548a0c3be6ddde9899f1199b8180b901643912521500000000000000000000000019645032c7f1533395d44a629462e751084d3e4c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000005ec67e28000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041e2baf4c320fc6b1820c030b62454475b8341fd7bbd22c40b7c35f5610b3d160d29c473c65463ef697dffaaf8a5aa93debad1f8aa10b5d2c9a97614f24c383e6a1c00000000000000000000000000000000000000000000000000000000000000830271cba0af03d32e172fbc5e9823f4cf195d6805765e44f6dd8bddd4610921cf998458e4a05a4694ea542228cc230b4bf71c9b299ac45652ae6396de9af9e07b72445c11d7'; - -export const WALLET_FACTORY_ADDRESS = Networks.test.bera.walletFactoryAddress; + '0xf901cd02843b9aca0083b8a1a0948f977e912ef500548a0c3be6ddde9899f1199b8180b901643912521500000000000000000000000019645032c7f1533395d44a629462e751084d3e4c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000005ec67e28000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000410a7f46150f7fc38b6efa513491d6a88293a86ac6bd26cb0128ccb7e0ec76c6275d1625765d9608600578fdb2141d72ff11953f630c30077127caeea054a273591b0000000000000000000000000000000000000000000000000000000000000083027124a0dfc29499e8b33838c6b3b434837a8319bd66735ed45a8558b8ccc99680faa4e4a07bbb5f46c61ce6960b034a9c1ab4724d2c160c1a4d8bdb75028ed0b4acbe0454'; export const FORWARDER_FACTORY_ADDRESS = Networks.test.bera.forwarderFactoryAddress; @@ -63,10 +61,10 @@ export const BASE_ADDRESS = '0xbc42187c73d2f41a5551be6d138298f4e9f2e2c6'; export const FEE_ADDRESS = '0x5fc4bc0f18c4243ee4ce757d712bb2164176cb51'; export const UNSIGNED_ADDRESS_INIT = - '0xf9012d018502540be4008367c280946e4a83086c6dd9fbce203c1ebb69eda1aba872d780b8c47117f3fa000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000e6c43626f11312de29b0011fa9da71ea3bba0e9f00000000000000000000000078caeb4527170e52f54d936e4eef6f83250e01bb000000000000000000000000b1938215967408fff7c59c77ae5e5283b55c8e26830271cba05f2198f0b5df3d01d184565b8445e99540be6f3730dec4cd282179a01b666819a02cc6f4e4f5042c1f67da15719ad1301f07bc1020008fb51498ad36593a0d9744'; + '0xf9012d018502540be4008367c280946e4a83086c6dd9fbce203c1ebb69eda1aba872d780b8c47117f3fa000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000e6c43626f11312de29b0011fa9da71ea3bba0e9f00000000000000000000000078caeb4527170e52f54d936e4eef6f83250e01bb000000000000000000000000b1938215967408fff7c59c77ae5e5283b55c8e2683027123a0f943481777fa8fad3691143c9f962647b29fa7ff39b853e98a6eab71fd77293fa01d4f93d70e2c59f991fc6ffb5b93deca142a5dc8338c5c9432e9371c7d91b9f0'; export const SIGNED_ADDRESS_INIT = - '0xf8c7010a8203e894ccadf4198de4957d07d80673684ed19310579fc480b86413b2f75c000000000000000000000000bc42187c73d2f41a5551be6d138298f4e9f2e2c60000000000000000000000005fc4bc0f18c4243ee4ce757d712bb2164176cb510000000000000000000000000000000000000000000000000000000000000001830271cba089da11309b45d5f0a428d4612e71d691f23b37b310125b2e4648a75a26cf422da040ae707cebd42e090cb06b0a679a48d8b9f400b5b3ccdea67497c4b64a57f592'; + '0xf8c7010a8203e89437996e762fa8b671869740c79eb33f625b3bf92a80b86413b2f75c000000000000000000000000bc42187c73d2f41a5551be6d138298f4e9f2e2c60000000000000000000000005fc4bc0f18c4243ee4ce757d712bb2164176cb51000000000000000000000000000000000000000000000000000000000000000183027124a05ec088cd642d938871fcbcf328754fa610df1d46606e1a530ee1f3e81f606b71a029dea06719e8c9f9652bafba472f5e4be5bc52a243ef40db80739b179b8ffbdc'; export const TX_BROADCAST = - '0xf9012d018502540be4008367c280946e4a83086c6dd9fbce203c1ebb69eda1aba872d780b8c47117f3fa000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000e6c43626f11312de29b0011fa9da71ea3bba0e9f00000000000000000000000078caeb4527170e52f54d936e4eef6f83250e01bb000000000000000000000000b1938215967408fff7c59c77ae5e5283b55c8e26830271cba05f2198f0b5df3d01d184565b8445e99540be6f3730dec4cd282179a01b666819a02cc6f4e4f5042c1f67da15719ad1301f07bc1020008fb51498ad36593a0d9744'; + '0xf9012d018502540be4008367c280946e4a83086c6dd9fbce203c1ebb69eda1aba872d780b8c47117f3fa000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000e6c43626f11312de29b0011fa9da71ea3bba0e9f00000000000000000000000078caeb4527170e52f54d936e4eef6f83250e01bb000000000000000000000000b1938215967408fff7c59c77ae5e5283b55c8e2683027123a0f943481777fa8fad3691143c9f962647b29fa7ff39b853e98a6eab71fd77293fa01d4f93d70e2c59f991fc6ffb5b93deca142a5dc8338c5c9432e9371c7d91b9f0'; diff --git a/modules/sdk-coin-bera/test/unit/bera.ts b/modules/sdk-coin-bera/test/unit/bera.ts index a562ce3632..0e81df7a96 100644 --- a/modules/sdk-coin-bera/test/unit/bera.ts +++ b/modules/sdk-coin-bera/test/unit/bera.ts @@ -88,7 +88,7 @@ describe('Bera', function () { bera.should.be.an.instanceof(Bera); bera.getChain().should.equal('bera'); bera.getFamily().should.equal('bera'); - bera.getFullName().should.equal('berachain'); + bera.getFullName().should.equal('Bera'); bera.getBaseFactor().should.equal(1e18); }); diff --git a/modules/sdk-coin-bera/test/unit/transactionBuilder/addressInitialization.ts b/modules/sdk-coin-bera/test/unit/transactionBuilder/addressInitialization.ts index 52a127ab60..583a4a7386 100644 --- a/modules/sdk-coin-bera/test/unit/transactionBuilder/addressInitialization.ts +++ b/modules/sdk-coin-bera/test/unit/transactionBuilder/addressInitialization.ts @@ -48,7 +48,7 @@ describe('Bera address initialization', () => { txBuilder.sign({ key: testData.KEYPAIR_PRV.getKeys().prv }); const tx = await txBuilder.build(); const txJson = tx.toJson(); - should.equal(txJson.deployedAddress, '0xfaa32fa9edbc6fd8bdfc765c218fe8f83267c6da'); + should.equal(txJson.deployedAddress, '0xd9d189aa6907a4fafd3c66e8cc178011b1f443f5'); should.equal(txJson.to, testData.FORWARDER_FACTORY_ADDRESS); }); diff --git a/modules/sdk-coin-bera/test/unit/transactionBuilder/send.ts b/modules/sdk-coin-bera/test/unit/transactionBuilder/send.ts index a5ce0da5b4..d0beb0aa96 100644 --- a/modules/sdk-coin-bera/test/unit/transactionBuilder/send.ts +++ b/modules/sdk-coin-bera/test/unit/transactionBuilder/send.ts @@ -40,7 +40,7 @@ describe('Bera transaction builder send', () => { txBuilder.sign({ key: testData.PRIVATE_KEY_1 }); const tx = await txBuilder.build(); - should.equal(tx.toJson().chainId, 0x138d4); + should.equal(tx.toJson().chainId, 0x13880); should.equal(tx.toBroadcastFormat(), testData.SEND_TX_BROADCAST_LEGACY); should.equal(tx.signature.length, 2); should.equal(tx.inputs.length, 1); diff --git a/modules/sdk-coin-bera/test/unit/transactionBuilder/walletInitialization.ts b/modules/sdk-coin-bera/test/unit/transactionBuilder/walletInitialization.ts deleted file mode 100644 index 67184b72b1..0000000000 --- a/modules/sdk-coin-bera/test/unit/transactionBuilder/walletInitialization.ts +++ /dev/null @@ -1,109 +0,0 @@ -import should from 'should'; -import { TransactionType } from '@bitgo/sdk-core'; -import { TransactionBuilder } from '../../../src'; -import * as testData from '../../resources'; -import { coins } from '@bitgo/statics'; - -describe('Bera wallet initialization', function () { - let txBuilder: TransactionBuilder; - const initTxBuilder = (): void => { - txBuilder = new TransactionBuilder(coins.get('tbera')); - txBuilder.fee({ - fee: '10000000000', - gasLimit: '6800000', - }); - txBuilder.counter(1); - txBuilder.type(TransactionType.WalletInitialization); - txBuilder.walletVersion(4); - txBuilder.contract(testData.WALLET_FACTORY_ADDRESS); - txBuilder.salt('0x0'); - }; - - describe('should build', () => { - it('an init transaction', async () => { - initTxBuilder(); - - txBuilder.owner('0xe6c43626f11312de29b0011fa9da71ea3bba0e9f'); - txBuilder.owner('0x78caeb4527170e52f54d936e4eef6f83250e01bb'); - txBuilder.owner('0xb1938215967408fff7c59c77ae5e5283b55c8e26'); - txBuilder.sign({ key: testData.PRIVATE_KEY_1 }); - - const tx = await txBuilder.build(); - - tx.type.should.equal(TransactionType.WalletInitialization); - const txJson = tx.toJson(); - txJson.gasLimit.should.equal('6800000'); - txJson.gasPrice.should.equal('10000000000'); - should.equal(txJson.nonce, 1); - should.equal(txJson.chainId, '0x138d4'); - should.equal(tx.toBroadcastFormat(), testData.TX_BROADCAST); - }); - - it('a signed init transaction from serialized', async () => { - const newTxBuilder = new TransactionBuilder(coins.get('tbera')); - newTxBuilder.from(testData.TX_BROADCAST); - const newTx = await newTxBuilder.build(); - should.equal(newTx.toBroadcastFormat(), testData.TX_BROADCAST); - should.equal(newTx.id, '0x79640186741285e6f3a325990cff9fc8475f5e35c8b2e1ee41e21be59897b905'); - const txJson = newTx.toJson(); - should.exist(txJson.v); - should.exist(txJson.r); - should.exist(txJson.s); - should.exist(txJson.from); - }); - - it('a wallet initialization transaction with nonce 0', async () => { - initTxBuilder(); - txBuilder.counter(0); - txBuilder.owner('0xe6c43626f11312de29b0011fa9da71ea3bba0e9f'); - txBuilder.owner('0x78caeb4527170e52f54d936e4eef6f83250e01bb'); - txBuilder.owner('0xb1938215967408fff7c59c77ae5e5283b55c8e26'); - txBuilder.sign({ key: testData.PRIVATE_KEY_1 }); - const tx = await txBuilder.build(); - - tx.type.should.equal(TransactionType.WalletInitialization); - const txJson = tx.toJson(); - txJson.gasLimit.should.equal('6800000'); - txJson.gasPrice.should.equal('10000000000'); - should.equal(txJson.nonce, 0); - should.equal(txJson.chainId, '0x138d4'); - }); - - it('an unsigned init transaction from serialized with 0-prefixed address', async () => { - initTxBuilder(); - txBuilder.owner('0xe6c43626f11312de29b0011fa9da71ea3bba0e9f'); - txBuilder.owner('0x78caeb4527170e52f54d936e4eef6f83250e01bb'); - txBuilder.owner('0xb1938215967408fff7c59c77ae5e5283b55c8e26'); - const tx = await txBuilder.build(); - const serialized = tx.toBroadcastFormat(); - - const newTxBuilder = new TransactionBuilder(coins.get('tbera')); - newTxBuilder.from(serialized); - const newTx = await newTxBuilder.build(); - should.equal(newTx.toBroadcastFormat(), serialized); - }); - - it('an unsigned init transaction from serialized', async () => { - initTxBuilder(); - txBuilder.owner('0xe6c43626f11312de29b0011fa9da71ea3bba0e9f'); - txBuilder.owner('0x78caeb4527170e52f54d936e4eef6f83250e01bb'); - txBuilder.owner('0xb1938215967408fff7c59c77ae5e5283b55c8e26'); - const tx = await txBuilder.build(); - const serialized = tx.toBroadcastFormat(); - - const newTxBuilder = new TransactionBuilder(coins.get('tbera')); - newTxBuilder.from(serialized); - const newTx = await newTxBuilder.build(); - should.equal(newTx.toBroadcastFormat(), serialized); - }); - - it('an unsigned transaction with final v check', async () => { - initTxBuilder(); - txBuilder.owner('0xe6c43626f11312de29b0011fa9da71ea3bba0e9f'); - txBuilder.owner('0x78caeb4527170e52f54d936e4eef6f83250e01bb'); - txBuilder.owner('0xb1938215967408fff7c59c77ae5e5283b55c8e26'); - const tx = await txBuilder.build(); - should.equal(tx.toJson().v, '0x0271cb'); - }); - }); -}); diff --git a/modules/statics/src/coins.ts b/modules/statics/src/coins.ts index 468514b495..2476fd700d 100644 --- a/modules/statics/src/coins.ts +++ b/modules/statics/src/coins.ts @@ -1384,7 +1384,7 @@ export const coins = CoinMap.fromCoins([ account( 'ac3c225e-55a9-4236-b907-a4cccc30a2fd', 'bera', - 'berachain', + 'Bera', Networks.main.bera, 18, UnderlyingAsset.BERA, diff --git a/modules/statics/src/networks.ts b/modules/statics/src/networks.ts index 36b4dcd421..8c98db0f3f 100644 --- a/modules/statics/src/networks.ts +++ b/modules/statics/src/networks.ts @@ -1090,16 +1090,14 @@ class Berachain extends Mainnet implements EthereumNetwork { class BerachainTestnet extends Testnet implements EthereumNetwork { name = 'BerachainTestnet'; family = CoinFamily.BERA; - explorerUrl = 'https://bartio.beratrail.io/tx/'; - accountExplorerUrl = 'https://bartio.beratrail.io/address/'; - chainId = 80084; - nativeCoinOperationHashPrefix = '80084'; - tokenOperationHashPrefix = '80084-ERC20'; - forwarderFactoryAddress = '0xccadf4198de4957d07d80673684ed19310579fc4'; - forwarderImplementationAddress = '0xc75fb848eb0bb04e3faedbee0fc8144e8d62b83d'; - walletFactoryAddress = '0x6e4a83086c6dd9fbce203c1ebb69eda1aba872d7'; - walletImplementationAddress = '0xb8d48d310818b15a6960f9afbef49dc96d2bd2d3'; - batcherContractAddress = '0xf499549720116c3dEA867D4fC279C43aCA172712'; + explorerUrl = 'https://80000.testnet.routescan.io/tx/'; + accountExplorerUrl = 'https://80000.testnet.routescan.io/address/'; + chainId = 80000; + nativeCoinOperationHashPrefix = '80000'; + tokenOperationHashPrefix = '80000-ERC20'; + batcherContractAddress = '0xedf1a0016d9c41d2ad0c275e1ba708361a90c0d1'; + forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a'; + forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b'; } class Oas extends Mainnet implements EthereumNetwork {