When I tried to deploy two different contracts with dev-deploy, both contracts were deployed to the same address, there the later erasing the former.
So is there anyway to deploy multiple contracts to different addresses with dev-deploy?
There may be several ways of doing this. The one I tend to do is to delete the
files inside the neardev
folder:
When you delete these, the next time you deploy your contract, it will be given a new address instead of using the existing one.
An alternative is to create two different accounts beforehand, and deploy to each of them separately by changing accountId
.
near deploy --accountId example-contract.testnet --wasmFile out/example.wasm