Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aurora-is-near/multisig-ops
Suite of scripts and other aux code used to interface with multisigs
https://github.com/aurora-is-near/multisig-ops
Last synced: 10 days ago
JSON representation
Suite of scripts and other aux code used to interface with multisigs
- Host: GitHub
- URL: https://github.com/aurora-is-near/multisig-ops
- Owner: aurora-is-near
- Created: 2024-09-13T12:53:09.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-13T12:54:15.000Z (4 months ago)
- Last Synced: 2024-09-14T04:48:40.749Z (4 months ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multisig Ops
Operations meant to interface with different protocols at a larger,
trust minimized way by not relying on 3rd party web services.
Only requires `near-cli-rs` and `base64` for preparing args in FunctionCall proposals.## 1. Register account
```bash
ACCOUNT="aura.sputnik-dao.near"
SIGNER="aurealis.near"
# register account in exchange contract
near contract call-function \
as-transaction v2.ref-finance.near storage_deposit \
json-args '{"account_id": "'$ACCOUNT'", "registration_only": false}' \
prepaid-gas '100.0 Tgas' attached-deposit '0.1 NEAR' \
sign-as $SIGNER network-config mainnet sign-with-keychain send
# register account in farm contract
near contract call-function \
as-transaction boostfarm.ref-labs.near storage_deposit \
json-args '{"account_id": "'$ACCOUNT'", "registration_only": false}' \
prepaid-gas '100.0 Tgas' attached-deposit '0.1 NEAR' \
sign-as $SIGNER network-config mainnet sign-with-keychain send
```## 2. Transfer tokens
```bash
MULTISIG="warpdrive.sputnik-dao.near"
SIGNER="aurealis.near"
AMOUNT_X="4300000000000000000000"
CONTRACT="v2.ref-finance.near"
echo '{"receiver_id": "'$CONTRACT'", "amount": "'$AMOUNT_X'", "msg": ""}' | base64
near contract call-function \
as-transaction $MULTISIG add_proposal \
file-args ref-1-transfer-x.json \
prepaid-gas '100.0 Tgas' attached-deposit '1 NEAR' \
sign-as $SIGNER network-config mainnet sign-with-keychain sendAMOUNT_Y="125000000000000000000000000"
CONTRACT="v2.ref-finance.near"
echo '{"receiver_id": "'$CONTRACT'", "amount": "'$AMOUNT_Y'", "msg": ""}' | base64
near contract call-function \
as-transaction $MULTISIG add_proposal \
file-args ref-1-transfer-y.json \
prepaid-gas '100.0 Tgas' attached-deposit '1 NEAR' \
sign-as $SIGNER network-config mainnet sign-with-keychain send
```## 3. Add liquidity
```bash
MULTISIG="aura.sputnik-dao.near"
SIGNER="aurealis.near"
# first amount is base token, second amount is quote token
AMOUNT_X="1000000000000000000000000"
AMOUNT_Y="1000000000000000000000000"
echo '{"pool_id": 1395,"amounts": ["'$AMOUNT_X'","'$AMOUNT_Y'"]' | base64
near contract call-function \
as-transaction $MULTISIG add_proposal \
file-args ref-2-add-liquidity.json \
prepaid-gas '100.0 Tgas' attached-deposit '0.1 NEAR' \
sign-as $SIGNER network-config mainnet sign-with-keychain send
```## 4. Stake liquidity into farm
```bash
MULTISIG="aura.sputnik-dao.near"
SIGNER="aurealis.near"
CONTRACT="boostfarm.ref-labs.near"
AMOUNT_LP="36345742222015173627"
# amount of lp tokens to stake, can be queried with `get_pool_shares`
echo '{"receiver_id": "'$CONTRACT'","token_id": ":1395","amount": "'$AMOUNT_LP'","msg": "\"Free\""}' | base64
near contract call-function \
as-transaction $MULTISIG add_proposal \
file-args ref-3-stake-liquidity.json \
prepaid-gas '100.0 Tgas' attached-deposit '0.1 NEAR' \
sign-as $SIGNER network-config mainnet sign-with-keychain send
```