Skip to content

borj404/vottun-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This CLI tools for Unix-like systems provides a straightforward way to interact with Vottun APIs from the terminal.

Feel free to modify the scripts to suit your needs.

Prerequisites

Ensure that both curl and jq are installed on your system.

Setup

Replace the content in lines 3-4 (between the quotation marks) with your own App ID and API key, which you can easily obtain by accessing your Vottun account.

Enter your email on line 5 to use the Custodied Wallets functions (evm-cli).

Running the scripts

For example, for evm-cli, navigate to the script’s location, make it executable, and run it:

chmod +x evm-cli

./evm-cli

Or

Run within the current shell environment:

source evm-cli

Usage

Type the function and fill in the required parameters.

Press after each prompt to continue.

To undo the previous entry type << , .. , !undo , !back or !del

"All parameter inputs are handled dynamically, so you must not quote strings, even in arrays."

(Optional parameters are indicated in parentheses.)

All token amounts must be entered in standard units (without 18 decimals), not in wei as stated in the docs (e.g: 0.1, not 100,000,000,000,000,000).

Menu & Docs

After launching the script, type help to view the list of available functions.

For detailed information about the APIs included in these scripts, refer to the documentation.

Support

For any issues or questions, contact me on Discord.

If you encounter any errors or bugs while running these scripts, please let me know.

EVM CLI functions list

IPFS

up_file: Upload a binary file to IPFS.

up_folder: Upload a folder or zip with multiple files to IPFS.

up_metadata: Upload a JSON file to IPFS.

ERC-20

deploy20: Deploy an ERC-20 smart contract.

transfer20: Transfer tokens to an address.

transfer_from: Transfer tokens from a sender's account to a receiver's address.

incr_allowance: Grant a spender account the right to manage a specified amount of tokens.

decr_allowance: Revoke a spender account the right to manage a specified amount of tokens.

allowance: Display the total amount of tokens the owner has authorized the spender to transact.

name: Display the name of a smart contract.

symbol: Display the symbol of a smart contract.

supply: Display the total supply of tokens created in an ERC-20 smart contract.

decimals: Display the decimals used for tokens in an ERC-20 smart contract.

balance20: Display the balance of tokens held by an address.

ERC-721

deploy721: Deploy an ERC-721 smart contract.

mint721: Mint an NFT with the provided metadata to the specified address.

transfer721: Transfer an NFT to an address.

balance721: Display the NFT balance of an address in the specified smart contract and network.

uri721: Display the metadata URI for an NFT in the specified contract.

owner: Display the address of the owner of an NFT.

ERC-1155

deploy1155: Deploy an ERC-1155 smart contract.

mint1155: Mint the specified amount of copies of an NFT with the provided metadata to the given address.

mint_batch: Mint the specified amount of copies of multiple NFTs with the provided metadata to the given address.

transfer1155: Transfer the specified amount of copies of an NFT to the given address.

transfer_batch: Transfer the specified amount of copies of multiple NFTs to the given address.

balance1155: Display the amount of an NFT for the given address and smart contract on a specified network.

uri1155: Display the URI of the metadata for the NFT from the given contract.

POAP

deployPOAP: Deploy a POAP smart contract and mint the tokens.

transferPOAP: Transfer an NFT to the given address.

balancePOAP: Display the amount of an NFT for the given address and smart contract on a specified network.

uriPOAP: Display the URI of the metadata for the NFT from the given contract.

Custodied Wallets

new_wallet: Generates a one-time-use hash and retrieves the URL to create a new custodied wallet.

get_address: Retrieve the wallet's public address (for the 1st account) for one of our users.

get_wallets: Retrieve all custodied wallets created for you.

otp: Request a one-time email OTP to sign a mutable transaction within the next 120 seconds.

send_tx: Call any public function implemented in a smart contract and modify its state (for view or pure functions, use query).

send_nat: Transfer native assets from your custodied wallet.

Web3 core

deploy: Deploy a smart contract on the blockchain of your choice.

call_function: Call any public function implemented in a smart contract and modify its state (for view or pure functions, use query).

query: Call any public function implemented in a smart contract without change its state (view or pure functions).

get_nets: Request the list of available blockchain networks.

get_specs: Request the list of available contract specifications.

query_address: Query an address to determine if it is a smart contract.

query_tx: Query transaction information from the blockchain.

query_status: Query the status of a transaction.

query_ref: Query the status of a transaction using the customer reference.

query_gas: Query the current gas price for a specified blockchain network.

query_nat: Query the balance of native currency for a specified address.

gas_deploy: Estimate the gas required for a smart contract deployment.

gas_tx: Estimate the gas required to call any public function implemented in a smart contract.

gas_nat: Estimate the gas required to transfer native assets.

Stellar CLI functions list

fund: Fund an account on Testnet or Futurnet.

balance: Retrieve the account balance on the desired network.

save: Attach a smart contract to the Vottun ecosystem.

upload: Upload and compile one or more contracts by selecting the directory (no need to zip the content).

deploy: Deploy a contract on the desired network.

est_deploy: Estimate the cost of deploying a contract on the desired network.

invoke: Invoke any method of a deployed contract.

est_invoke: Estimate the cost of invoking any method of a contract.

extend: Extend the time a transaction remains valid.

methods: Retrieve all the methods of a contract.

alive: Check if an installed contract is alive.

instance_info: Retrieve a contract instance's TTL info.

tx_info: Retrieve information about any transaction.

About

Bash scripts for fast interaction with Vottun APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages