Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running tz-view with babylonnet.sh client #2

Open
sajith opened this issue Dec 21, 2019 · 0 comments
Open

Error when running tz-view with babylonnet.sh client #2

sajith opened this issue Dec 21, 2019 · 0 comments

Comments

@sajith
Copy link

sajith commented Dec 21, 2019

Thank you for lorentz-contract-view. It looks very useful, but I ran into some trouble when using the Ruby script. I am not sure if what I am doing (using babylonnet.sh client instead of tezos-client) is meant to be supported. Apologies if it is not!

I added these in my ~/.profile:

export EXECLAMBDA_ADDRESS="KT1..."                                                                                              
export FA12_ADDRESS="KT1..."                                                                                                    
export ALICE_ADDRESS="tz1..."                                                                                                   
                                                                                                                                                              
alias tz-view="/home/sajith/code/lorentz-contract-view.rb \                                                                                                      
  '/usr/local/bin/babylonnet.sh client' \                                                                                                                     
  $EXECLAMBDA_ADDRESS $ALICE_ADDRESS"                                                                                                                         

And ran:

$ tz-view $FA12_ADDRESS 'getTotalSupply' 'Unit'

And it resulted in:

Running:
TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=yes /usr/local/bin/babylonnet.sh client get contract entrypoints for KT1..AQ

Entrypoints for contract KT1..AQ: 
  default: (or (or (or (pair %transfer address (pair address nat))
                       (or (pair %transferViaProxy address (pair address (pair address nat)))
"                       (or (pair %transferViaProxy address (pair address (pair address nat)))"
/home/sajith/code/lorentz-contract-view/lorentz-contract-view.rb:78:in `block in get_entrypoints': Expected all but the first line to match: /^\s*(?<entrypoint_name>\w+):\s+(?<entrypoint_type>.*)$/, but found:                        (or (pair %transferViaProxy address (pair address (pair address nat))) (RuntimeError)
	from /home/sajith/code/lorentz-contract-view/lorentz-contract-view.rb:115:in `each'
	from /home/sajith/code/lorentz-contract-view/lorentz-contract-view.rb:115:in `each'
	from /home/sajith/code/lorentz-contract-view/lorentz-contract-view.rb:115:in `to_h'
	from /home/sajith/code/lorentz-contract-view/lorentz-contract-view.rb:115:in `get_entrypoints'
	from /home/sajith/code/lorentz-contract-view/lorentz-contract-view.rb:121:in `get_view_entrypoints'
	from /home/sajith/code/lorentz-contract-view/lorentz-contract-view.rb:129:in `get_typed_lambda_params'
	from /home/sajith/code/lorentz-contract-view/lorentz-contract-view.rb:173:in `<main>'

To me it looks like the script is not set up to handle output from babylonnet.sh client: it contains a default entrypoint with a multi-line value.

This is what I get when running babylonnet.sh client get contract entrypoints for $FA12_ADDRESS:

$ TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=yes /usr/local/bin/babylonnet.sh client get contract entrypoints for $FA12_ADDRESS
Entrypoints for contract KT1..AQ: 
  default: (or (or (or (pair %transfer address (pair address nat))
                       (or (pair %transferViaProxy address (pair address (pair address nat)))
                           (pair %approve address nat)))
                   (or (pair %approveViaProxy address (pair address nat))
                       (or (pair %getAllowance (pair address address) (contract nat))
                           (pair %getBalance address (contract nat)))))
               (or (or (pair %getTotalSupply unit (contract nat))
                       (or (bool %setPause) (address %setAdministrator)))
                   (or (or (pair %getAdministrator unit (contract address)) (pair %mint address nat))
                       (or (pair %burn address nat) (address %setProxy)))))
  transferViaProxy: (pair address (pair address (pair address nat)))
  transfer: (pair address (pair address nat))
  setProxy: address
  setPause: bool
  setAdministrator: address
  mint: (pair address nat)
  getTotalSupply: (pair unit (contract nat))
  getBalance: (pair address (contract nat))
  getAllowance: (pair (pair address address) (contract nat))
  getAdministrator: (pair unit (contract address))
  burn: (pair address nat)
  approveViaProxy: (pair address (pair address nat))
  approve: (pair address nat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant