[#76] Use transfer to deposit assets in NeoFS contract

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-05-17 11:13:03 +03:00 committed by Alex Vanin
parent ebc0f96b2f
commit cd7a7efa85

View file

@ -13,14 +13,13 @@ DEPOSIT="${1:-50}"
# Internal variables # Internal variables
ADDR=`cat ${WALLET} | jq -r .accounts[0].address` 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 # Make deposit
${NEOGO} contract invokefunction \ ${NEOGO} wallet nep17 transfer \
-w ${WALLET} \ -w ${WALLET} \
-a ${ADDR} \
-r http://main_chain.${LOCAL_DOMAIN}:30333 \ -r http://main_chain.${LOCAL_DOMAIN}:30333 \
${NEOFS_IR_CONTRACTS_NEOFS} \ --from ${ADDR} \
deposit ${LESH} \ --to ${CONTRACT_ADDR} \
int:${DEPOSIT} \ --token GAS \
bytes: -- ${LESH}:Global --amount ${DEPOSIT}