I'm trying to call the addLiquidity
entrypoint of this contract, which is a copy of the Liquidity Baking CPMM contract, which is itself a copy of the Dexter contract.
The original Dexter docs give an example of how to call the addLiquidity
entrypoint, and I have been formatting my tezos-client
command identically.
However when I run that command I get an error telling me that the argument I have passed to the addLiquidity
entrypoint is incorrect. This is confusing as I have formatted it the same way as the example in the docs.
Here is the command I"m running:
tezos-client transfer 10 from alice to KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5 --entrypoint 'addLiquidity' --arg 'Pair (Pair "tz1eYpX4e1nu7e3cvtF7UvKFqUvWDahte1ot" 0) (Pair 100 "2030-06-29T18:00:21Z")' --burn-cap 999
Here is the error I get:
Invalid argument passed to contract KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5.
At (unshown) location 0, value
(Left (Left (Left (Pair (Pair "tz1eYpX4e1nu7e3cvtF7UvKFqUvWDahte1ot" 0) (Pair 100 "2030-06-29T18:00:21Z")))))
is invalid for type
or (or (or (pair %addLiquidity
(address %owner)
(nat %minLqtMinted)
(nat %maxTokensDeposited)
(timestamp %deadline))
(unit %default))
(or (pair %removeLiquidity
(address %to)
(nat %lqtBurned)
(mutez %minXtzWithdrawn)
(nat %minTokensWithdrawn)
(timestamp %deadline))
(pair %tokenToToken
(address %outputDexterContract)
(nat %minTokensBought)
(address %to)
(nat %tokensSold)
(timestamp %deadline))))
(or (pair %tokenToXtz
(address %to)
(nat %tokensSold)
(mutez %minXtzBought)
(timestamp %deadline))
(pair %xtzToToken (address %to) (nat %minTokensBought) (timestamp %deadline))).
At (unshown) location 0, value
(Left (Left (Pair (Pair "tz1eYpX4e1nu7e3cvtF7UvKFqUvWDahte1ot" 0) (Pair 100 "2030-06-29T18:00:21Z"))))
is invalid for type
or (or (pair %addLiquidity
(address %owner)
(nat %minLqtMinted)
(nat %maxTokensDeposited)
(timestamp %deadline))
(unit %default))
(or (pair %removeLiquidity
(address %to)
(nat %lqtBurned)
(mutez %minXtzWithdrawn)
(nat %minTokensWithdrawn)
(timestamp %deadline))
(pair %tokenToToken
(address %outputDexterContract)
(nat %minTokensBought)
(address %to)
(nat %tokensSold)
(timestamp %deadline))).
At (unshown) location 0, value
(Left (Pair (Pair "tz1eYpX4e1nu7e3cvtF7UvKFqUvWDahte1ot" 0) (Pair 100 "2030-06-29T18:00:21Z")))
is invalid for type
or (pair %addLiquidity
(address %owner)
(nat %minLqtMinted)
(nat %maxTokensDeposited)
(timestamp %deadline))
(unit %default).
At (unshown) location 0, value
(Pair (Pair "tz1eYpX4e1nu7e3cvtF7UvKFqUvWDahte1ot" 0) (Pair 100 "2030-06-29T18:00:21Z"))
is invalid for type
pair (address %owner)
(nat %minLqtMinted)
(nat %maxTokensDeposited)
(timestamp %deadline).
At (unshown) location 1, value
(Pair "tz1eYpX4e1nu7e3cvtF7UvKFqUvWDahte1ot" 0)
is invalid for type address.
At (unshown) location 1, unexpected primitive, only a string or a byte
sequence can be used here.
Fatal error:
transfer simulation failed