From cd7a7efa852f086fd42778d83f0887651cf62b83 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Mon, 17 May 2021 11:13:03 +0300 Subject: [PATCH] [#76] Use transfer to deposit assets in NeoFS contract Signed-off-by: Alex Vanin --- bin/deposit.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/deposit.sh b/bin/deposit.sh index 349dd26..7462f18 100755 --- a/bin/deposit.sh +++ b/bin/deposit.sh @@ -13,14 +13,13 @@ DEPOSIT="${1:-50}" # Internal variables ADDR=`cat ${WALLET} | jq -r .accounts[0].address` -LESH=`${NEOGO} util convert ${ADDR} | grep 'Address to LE ScriptHash' | awk '{print $5}' | grep -oP [A-z0-9]+` +CONTRACT_ADDR=`${NEOGO} util convert ${NEOFS_IR_CONTRACTS_NEOFS} | grep 'LE ScriptHash to Address' | awk '{print $5}' | grep -oP [A-z0-9]+` # Make deposit -${NEOGO} contract invokefunction \ +${NEOGO} wallet nep17 transfer \ -w ${WALLET} \ --a ${ADDR} \ -r http://main_chain.${LOCAL_DOMAIN}:30333 \ -${NEOFS_IR_CONTRACTS_NEOFS} \ -deposit ${LESH} \ -int:${DEPOSIT} \ -bytes: -- ${LESH}:Global +--from ${ADDR} \ +--to ${CONTRACT_ADDR} \ +--token GAS \ +--amount ${DEPOSIT}