DEPLOYER_MNEMONIC=<your_mnemonic>
npx ts-node scripts/storeContract.ts
First, update the variables in scripts/instantiateContract.ts
to match your configuration.
Then, run the following command:
npx ts-node scripts/instantiateContract.ts
This script will output the contract address, as well as the hex representation of the contract address. Save this hex address for use later.
Most of the variables in Deploy.s.sol
are constants and can be left as is. The only variable that you will need to update is owner
.
forge script ./script/Deploy.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast
In order to submit and settle orders you must make the Solidity contract aware of the Cosmwasm deployment.
In script/SetRemote.s.sol
, update the remoteContract
variable with the hex address that was logged when the Cosmwasm contract was instantiated. (You'll have to remove the 0x
prefix from the address.)
forge script ./script/SetRemote.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast
In order to fill orders and request settlements you must make the Cosmwasm contract aware of the Solidity contract.
In cosmwasm/scripts/setRemote.ts
, update the CONTRACT_ADDRESS
variable with the address of the deployed Solidity contract.
npx ts-node cosmwasm/scripts/setRemote.ts