You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change your private key and address in flow.json under "testnet-account" object (you can change it to "mainnet-account" for mainnet)
If your account uses ECDSA_secp256k1, change "signatureAlgorithm" to "ECDSA_secp256k1"
In a terminal, run flow accounts update-contract CONTRACT_NAME PATH_TO_CONTRACT --network=testnet --signer=testnet-account (or --network=mainnet --signer=mainnet-account for mainnet)
Using FCL
Look at main.js for all the source code
Change PRIVATE_KEY, ADDRESS, KEY_ID, and CONTRACT_NAME to yours
If your account uses ECDSA_secp256k1, comment out line 6 in main.js and uncomment line 5
Put your new contract code on line 49
If you're using mainnet, change "https://rest-testnet.onflow.org" on line 9 to "https://rest-mainnet.onflow.org"
In a termimal, run node main.js
About
How to update contracts on Flow Mainnet/Testnet using both the Flow CLI or FCL