Skip to content

Commit c814abc

Browse files
committed
feat(statics): update sepeth underlying asset
@stacks/transactions signWithKey passes the message to elliptic as hex. With bn.js@5 (CI when elliptic's nested bn.js@4 is not used), non-hex messages like 'hello' throw. Switch message2 to valid hex and regenerate the expected signature so unit tests pass under either layout. TICKET: CECHO-1721
1 parent 66a83ea commit c814abc

5 files changed

Lines changed: 6 additions & 5 deletions

File tree

modules/sdk-coin-stx/test/unit/resources.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ export const message1 = 'abc';
6767
export const expectedSignature1 =
6868
'0157a170fae4a310c4b59b8d173289b4adacb79b0a187a6e132cdf02374c22b59519b862d95240af464808faaed341fe42d740c9b89850b52f5f7f906deba67064';
6969

70-
export const message2 = 'hello';
70+
export const message2 = 'deadbeef';
7171
// when signed with secretKey2
7272
export const expectedSignature2 =
73-
'007a86b0a5486987605f7274272cb4eaefa37af216bdf0c88c5b985a70923d550032b3cf226a8384ad2b96d0b3794b9a6f8e6ed191582fb0cc4f830b2ef14d05fe';
73+
'00693746b1f54b0ca50566dc51ebd55484948b4bc440287f73a9fc8ac2e9acfc3a1ef1958bb32cc19eccb70af911fc8130f269d5ff382351a23751f847fc781372';
7474

7575
// seed is Buffer.alloc(64) -- all zero bytes
7676
export const defaultSeedSecretKey = 'eafd15702fca3f80beb565e66f19e20bbad0a34b46bb12075cbf1c5d94bb27d2';

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ export const allCoinsAndTokens = [
407407
'Sepolia Testnet Ethereum',
408408
Networks.test.sepolia,
409409
18,
410-
UnderlyingAsset.ETH,
410+
UnderlyingAsset.SEPETH,
411411
BaseUnit.ETH,
412412
[
413413
...ETH_FEATURES_WITH_STAKING_AND_MMI,

modules/statics/src/base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,7 @@ export enum UnderlyingAsset {
728728
SCROLLETH = 'scrolleth', // Scroll L2
729729
SEI = 'sei',
730730
SEIEVM = 'seievm',
731+
SEPETH = 'sepeth', // Sepolia Ethereum testnet
731732
SGB = 'sgb',
732733
SOL = 'sol',
733734
SOMI = 'somi', // Somnia Chain

modules/statics/src/coins/ofcCoins.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ export const ofcCoins = [
846846
'ofctsepeth',
847847
'Test Sepolia Ether',
848848
18,
849-
UnderlyingAsset.ETH,
849+
UnderlyingAsset.SEPETH,
850850
CoinKind.CRYPTO
851851
),
852852
tofc(

modules/statics/src/networks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ class Sepolia extends Testnet implements EthereumNetwork {
874874
chainId = 11155111;
875875
nativeCoinOperationHashPrefix = 'ETHER';
876876
tokenOperationHashPrefix = 'ERC20';
877-
// TODO: add batcher/forwarder/wallet contract addresses once deployed on Sepolia
877+
// TODO: [CECHO-1729] add batcher/forwarder/wallet contract addresses once deployed on Sepolia
878878
}
879879

880880
class EthereumClassic extends Mainnet implements EthereumNetwork {

0 commit comments

Comments
 (0)