Skip to content

Commit

Permalink
deploy.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
yomarion committed Sep 22, 2023
1 parent 3c7155c commit 543f1e6
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

# testnet deployment and values (default)
NEAR_ENV="testnet";
feed_parser="switchboard-v2.testnet";
feed_address="[251, 166, 196, 242, 159, 139, 89, 47, 230, 78, 243, 185, 185, 188, 150, 219, 165, 68, 131, 5, 216, 42, 120, 26, 26, 142, 133, 0, 111, 235, 63, 18]";
oracle_account_id="fpo.opfilabs.testnet"
provider_account_id="opfilabs.testnet"
contract_name="conversion_proxy";
patch=false;

Expand Down Expand Up @@ -63,7 +63,19 @@ if [ "$contract_name" = "fungible_proxy" ]; then
near deploy -f --wasmFile ./target/wasm32-unknown-unknown/release/$contract_name.wasm \
--accountId $ACCOUNT_ID
else
initArgs="{"feed_parser":$feed_parser,"feed_address":[251, 166, 196, 242, 159, 139, 89, 47, 230, 78, 243, 185, 185, 188, 150, 219, 165, 68, 131, 5, 216, 42, 120, 26, 26, 142, 133, 0, 111, 235, 63, 18]}";

if [ "$contract_name" = "conversion_proxy" ]; then
if [ "$NEAR_ENV" = "mainnet" ]; then
feed_parser="switchboard-v2.mainnet";
feed_address="C3p8SSWQS8j1nx7HrzBBphX5jZcS1EY28EJ5iwjzSix2";
else
feed_parser="switchboard-v2.testnet";
feed_address="7igqhpGQ8xPpyjQ4gMHhXRvtZcrKSGJkdKDJYBiPQgcb";
fi
initArgs='{"feed_parser":"'$feed_parser'","feed_address_pk":"'$feed_address'"}';
else
initArgs='{"oracle_account_id": "'$oracle_account_id'", "provider_account_id": "'$provider_account_id'"}';
fi
echo $initArgs;
initParams="";
if ! $patch ; then
Expand Down

0 comments on commit 543f1e6

Please sign in to comment.