-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #317 from focustree/add-multicall-cli
Add multicall cli
- Loading branch information
Showing
19 changed files
with
237 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
unset STARKNET_NETWORK | ||
unset STARKNET_KEYSTORE | ||
unset STARKNET_PRIVATE_KEY | ||
|
||
source .env.constants | ||
source .env | ||
|
||
export STARKNET_RPC="http://0.0.0.0:5050/rpc" | ||
export STARKNET_CHAIN_ID="KATANA" | ||
export STARKNET_ACCOUNT=".starkli/katana-oz-0.json" | ||
|
||
export STARKNET_ACCOUNT_ADDRESS="0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973" | ||
# export STARKNET_ACCOUNT_ADDRESS="0x57cfe0bf8eeda17596d4528f6c2e5c17705c2fcfafd5182dbb0f41d3c256b3" | ||
export STARKNET_PUBLIC_KEY="0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053" | ||
export STARKNET_PRIVATE_KEY="0x1800000000300000180000000000030000000000003006001800006600" | ||
export PATH=$PATH:$(pwd)/scripts | ||
|
||
env | grep "STARKNET" | ||
export STARKNET_PRIVATE_KEY="0x1800000000300000180000000000030000000000003006001800006600" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,13 +19,12 @@ coverage/ | |
|
||
.idea | ||
|
||
.env | ||
|
||
# Python | ||
**/__pycache__ | ||
.venv | ||
|
||
# Cairo | ||
!contracts/build | ||
|
||
.env.testnet | ||
.env.* | ||
!.env.katana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
0x04bcb72b74c4f6ed1c406051f6d12e107d1a9ed578656123f46c227a35800b4c,0.0000049 | ||
0x048daae66604c3443419a27dde758ade1f702386ed720d2084c4d08cecefad51,0.0000049 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
0x04bcb72b74c4f6ed1c406051f6d12e107d1a9ed578656123f46c227a35800b4c,0.049 | ||
0x048daae66604c3443419a27dde758ade1f702386ed720d2084c4d08cecefad51,0.049 | ||
0x043ec97b2307d69ae5818e9cfc746e408a354b26bbf67bdcd1bdfd78504d41a6,0.049 | ||
0x04f1a5324037ec83694f2ef3c64dce3a645b4dd3a16c9e7110d2af911e3c26c5,0.049 | ||
0x03c3d383c4e78e6554a0a363b043617cff6d063c56bfbf590c8973d9e47950d1,0.049 | ||
0x06c5eca298d24a604194a5e88e31bf24c3b96247944da52d8e0e158e833578d6,0.049 | ||
0x01dc978fa72bd8203c15a09ce4afc64e6a5b9b3b36d536a67a36d412b0f3de87,0.049 | ||
0x075056821111e82d10abc409449958b05043a04a706a4e84f5d9f9b37e46e9a7,0.049 | ||
0x00999458e4037369a84a48f0a33359cb4f1d9aef7f136632440512d173201a4d,0.049 | ||
0x0752d8740eb587d498c6249acf238fe9b31bfd8d9f6671240660c54aaf60693b,0.049 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
0x04bcb72b74c4f6ed1c406051f6d12e107d1a9ed578656123f46c227a35800b4c,0.049 | ||
0x048daae66604c3443419a27dde758ade1f702386ed720d2084c4d08cecefad51,0.049 | ||
0x043ec97b2307d69ae5818e9cfc746e408a354b26bbf67bdcd1bdfd78504d41a6,0.049 | ||
0x04f1a5324037ec83694f2ef3c64dce3a645b4dd3a16c9e7110d2af911e3c26c5,0.049 | ||
0x03c3d383c4e78e6554a0a363b043617cff6d063c56bfbf590c8973d9e47950d1,0.049 | ||
0x06c5eca298d24a604194a5e88e31bf24c3b96247944da52d8e0e158e833578d6,0.049 | ||
0x01dc978fa72bd8203c15a09ce4afc64e6a5b9b3b36d536a67a36d412b0f3de87,0.049 | ||
0x075056821111e82d10abc409449958b05043a04a706a4e84f5d9f9b37e46e9a7,0.049 | ||
0x00999458e4037369a84a48f0a33359cb4f1d9aef7f136632440512d173201a4d,0.049 | ||
0x0752d8740eb587d498c6249acf238fe9b31bfd8d9f6671240660c54aaf60693b,0.049 | ||
0x05caae0e7c8b9cbed02e31c7886e5966fbd3e6ea58e560e00732e31df4eb0fe8,0.024 | ||
0x0749296ca55fea77f8fd89d827f71e8f569cfebd38d7d9539e25ca5d8d929394,0.024 | ||
0x0719a7886c4a27cd167419b68eeb81ec2ce0d0688270c3c143040b344bcd482b,0.024 | ||
0x00decddcefa730dd657333f3c9103bfd22db6137de2f1ba2883ad78286240773,0.024 | ||
0x01dceb9b9eddcb98e2d1090023e12e22baf48887c8696e6494ffed6bc25bec22,0.024 | ||
0x0630905d2a6865d1b94cc930137232df629ebcceb31b77d044ef66aa6858606e,0.024 | ||
0x070370be7692a10b303a70caad9edd11b50d99586cff720fc4845e7f83f13c3d,0.024 | ||
0x0400ffbb161a82396b55d7bf954402640ecd62673bb1f05e69a7b186e9342f90,0.024 | ||
0x058a838fc9ae21570751317e4b798767f1ede84f8f7ca2d45bcef3d0440bb0a6,0.024 | ||
0x06994e832150f6c61e7e5791f48cd8c50cc45d7132f04a2054a27bd510bbe4c7,0.024 | ||
0x07890d57be36ec3dd91ca71e1ef91331ed3b1419d2ba3a90a77a9864749acd60,0.012 | ||
0x0707a98dcb368a48de073d403aa5c6ac3b60dd8c3e45ee9ab693518818c626ca,0.012 | ||
0x07a13630f054bd72b85a21ce9b6929338c59d5945ea014f82c4d2f82f01280d5,0.012 | ||
0x05dae5624e16aeef3a877b1b710b5a11f15cb374d8be1e21e7850e549b5744c6,0.012 | ||
0x01f796880310808c01c5e55c4c4444f5f5ef4572db9c82af68e64ec70c90f27a,0.012 | ||
0x069f51059768c77fe6ccfd954bfe531825f27d5ee7b5649d67df743be5ecef3c,0.012 | ||
0x0218bf487f95c38408450914f9e2ec4290fc804de241fe870b9bd04dd4cae411,0.012 | ||
0x05489ca2b6292d2c7d0bf2410eb102946cd94711ca67dcecd95ccba404036760,0.012 | ||
0x0623a815376bdd496f9c548ebf7d354487ac50aeb33e2f178fececb77e503f79,0.012 | ||
0x07a45881d06e74ec8c9a58e31dc1fee61d30959679bf946ac02d0115fcac7661,0.012 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'package:args/command_runner.dart'; | ||
import 'package:starknet_cli/utils.dart'; | ||
|
||
class ChainIdCommand extends Command { | ||
@override | ||
final name = "chain-id"; | ||
@override | ||
final description = "Get chain id"; | ||
|
||
ChainIdCommand(); | ||
|
||
@override | ||
void run() async { | ||
final provider = providerFromArgs(globalResults); | ||
final chainId = await provider.chainId(); | ||
print(chainId.whenOrNull( | ||
result: (result) => result, | ||
)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import 'package:args/command_runner.dart'; | ||
import 'package:starknet/starknet.dart'; | ||
|
||
class SignerCommand extends Command { | ||
@override | ||
final name = 'signer'; | ||
@override | ||
final description = 'Signer related commands'; | ||
|
||
SignerCommand() { | ||
addSubcommand(SignerGetPublicKeyCommand()); | ||
} | ||
} | ||
|
||
class SignerGetPublicKeyCommand extends Command { | ||
@override | ||
final name = 'get-public-key'; | ||
@override | ||
final description = 'Get public key from a private key'; | ||
|
||
@override | ||
void run() { | ||
try { | ||
final privateKey = Felt.fromHexString(globalResults?['private-key']); | ||
final publicKey = Signer(privateKey: privateKey).publicKey; | ||
print('Public Key: ${publicKey.toHexString()}'); | ||
} catch (e) { | ||
print('Error: ${e.toString()}'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.