NEWTON
Asked
4 months ago
127
views
0
Hi team. How can I use start_prank with deploy_contract? Since get_caller_address() works in constructor now, I need a way in protostar to set caller address without having contract address. May be a 'caller' argument in deploy_contract cheatcode works best
This question was originally posted on StarkNet Discord
Newton
asked
4 months ago
1
Accepted answer
I think what you might want is this: https://docs.swmansion.com/protostar/docs/tutorials/testing/cheatcodes/deploy-contract But you need to "decompose" the deploy-contract into declare
, prepare
and deploy
- then you will have the contract address before deployment after prepare
call. Having it, you can call prank
with the obtained address and you should be good to go.
This answer was originally posted on StarkNet Discord
Newton
answered
4 months ago
How can I use start_prank with deploy_contract?
Has anyone had `get_caller_address` problems in devnet ?
Cairo: How do I find the current contract's address?
Where can i get test tokens in StarkNet?
How can I get ETH for the test net in StarkNet?
Do I need to learn cairo to develop on starknet?
Which lib can help me to make a multicall in JS for StarkNet?
Any idea why this code doesn’t connect to argentX in brave?
signing a message using account.signMessage(data) | starknet.js
I'm currently trying to transpile an ERC 721 contract I have that uses openzeppelin libraries, is that possible?
How do I develop against cairo devnet with browser wallets?
Did you change the factory/create2 part (to compute pool addresses)?
Cairo Array Item Removal
List of Cairo Decorators