starknet 1.7.0 → 2.1.0

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.
@@ -0,0 +1,2 @@
1
+ Sources can be found here:
2
+ https://github.com/argentlabs/argent-contracts-starknet
@@ -81,7 +81,7 @@ describe('deploy and test Wallet', () => {
81
81
  await defaultProvider.waitForTx(txErc20Mint);
82
82
  });
83
83
  test('read nonce', async () => {
84
- const { nonce } = await wallet.call('get_current_nonce');
84
+ const { nonce } = await wallet.call('get_nonce');
85
85
 
86
86
  expect(number.toBN(nonce as string).toString()).toStrictEqual(number.toBN(0).toString());
87
87
  });
@@ -93,10 +93,10 @@ describe('deploy and test Wallet', () => {
93
93
  expect(number.toBN(res as string).toString()).toStrictEqual(number.toBN(1000).toString());
94
94
  });
95
95
  test('execute by wallet owner', async () => {
96
- const { nonce } = await wallet.call('get_current_nonce');
96
+ const { nonce } = await wallet.call('get_nonce');
97
97
  const msgHash = encode.addHexPrefix(
98
98
  hash.hashMessage(
99
- '0', // needs to be walletAddress once it's possible to retrieve address(self) in cairo
99
+ wallet.connectedTo,
100
100
  erc20Address,
101
101
  stark.getSelectorFromName('transfer'),
102
102
  [erc20Address, '10'],
@@ -147,15 +147,15 @@ test('build tx', async () => {
147
147
  const msgHash = hash.hashMessage(address, '1', selector, ['6', '7'], '0');
148
148
  expect(number.toBN(msgHash).toString()).toStrictEqual(
149
149
  number
150
- .toBN('2221651675559331189881349481637314109810712322791057846116415219218634672652')
150
+ .toBN('2154230509011102177917341711834485670139815171447919056633262592518907948680')
151
151
  .toString()
152
152
  );
153
153
 
154
154
  const { r, s } = ec.sign(keyPair, msgHash);
155
155
  expect(r.toString()).toBe(
156
- '2220702546012141050051149396887481489960265709213083422658245644097500180866'
156
+ '706800951915233622090196542158919402159816118214143837213294331713137614072'
157
157
  );
158
158
  expect(s.toString()).toBe(
159
- '1542316446019190634489932498001415389924394685441251344076931639569381539117'
159
+ '1857147121895075123389037565321926580259282654271568123966453051614350474888'
160
160
  );
161
161
  });
@@ -49,27 +49,27 @@ describe('defaultProvider', () => {
49
49
  )
50
50
  ).resolves.not.toThrow();
51
51
  });
52
- test('getTransactionStatus()', () => {
52
+ test('getTransactionStatus()', async () => {
53
53
  return expect(
54
54
  defaultProvider.getTransactionStatus(
55
- '0x2086ff26645fb0e31a3e252302f3cb1e7612c60389102e5473dfc89758a3aa9'
55
+ '0x72add9621ecdcb07405a4f943fe410bf57003ca250400f01ce70f8a6fc72147'
56
56
  )
57
57
  ).resolves.not.toThrow();
58
58
  });
59
59
  test('getTransaction()', async () => {
60
60
  return expect(
61
61
  defaultProvider.getTransaction(
62
- '0x2086ff26645fb0e31a3e252302f3cb1e7612c60389102e5473dfc89758a3aa9'
62
+ '0x72add9621ecdcb07405a4f943fe410bf57003ca250400f01ce70f8a6fc72147'
63
63
  )
64
64
  ).resolves.not.toThrow();
65
65
  });
66
66
  test('callContract()', () => {
67
67
  return expect(
68
68
  defaultProvider.callContract({
69
- contract_address: '0x58bceda58a83a5a100117ddc893234bad9c84a6833c2008f0f1ca90150149af',
69
+ contract_address: '0x9ff64f4ab0e1fe88df4465ade98d1ea99d5732761c39279b8e1374fa943e9b',
70
70
  entry_point_selector: stark.getSelectorFromName('balance_of'),
71
71
  calldata: compileCalldata({
72
- user: '0x58bceda58a83a5a100117ddc893234bad9c84a6833c2008f0f1ca90150149af',
72
+ user: '0x9ff64f4ab0e1fe88df4465ade98d1ea99d5732761c39279b8e1374fa943e9b',
73
73
  }),
74
74
  })
75
75
  ).resolves.not.toThrow();
@@ -68,7 +68,7 @@ describe('deploy and test Wallet', () => {
68
68
  test('read nonce', async () => {
69
69
  const { result } = await signer.callContract({
70
70
  contract_address: signer.address,
71
- entry_point_selector: stark.getSelectorFromName('get_current_nonce'),
71
+ entry_point_selector: stark.getSelectorFromName('get_nonce'),
72
72
  });
73
73
  const nonce = result[0];
74
74