eluv-io / elv-live-js

Eluvio Live JavaScript SDK
MIT License
4 stars 3 forks source link

add token transfer and balanceOf cmds #156

Closed elv-preethi closed 11 months ago

elv-preethi commented 11 months ago

Commands added (helpful for testing):

token_transfer <token_addr> <to_addr> <amount> [options]      Transfer given elv tokens to address provided
  token_balance_of <token_addr> <user_addr> [options]           Get the token balance of a given user

examples:

export PRIVATE_KEY="0x..."
 ./elv-live token_transfer 0xe8c93b603a1d0f55fc6faebdecf1f4eba07a285b 0xe8e2bc33fd9eaade1035531b6afa3afd8dd3ac72 1000000
token transfer, 
    token_addr=0xe8c93b603a1d0f55fc6faebdecf1f4eba07a285b
    to_addr=0xe8e2bc33fd9eaade1035531b6afa3afd8dd3ac72
    amount=1000000
status: transfer successful
export PRIVATE_KEY="0x..."
./elv-live token_balance_of 0xe8c93b603a1d0f55fc6faebdecf1f4eba07a285b 0xe8e2bc33fd9eaade1035531b6afa3afd8dd3ac72
token_addr: 0xe8c93b603a1d0f55fc6faebdecf1f4eba07a285b
user_addr: 0xe8e2bc33fd9eaade1035531b6afa3afd8dd3ac72
token_balance: 4000000
elv-todd commented 11 months ago

let's make a PR to convert all the "elv" references to "erc20" or whatever is best to clarify the difference between a gas token ETH and private tokens?