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

[Wallet] consolidating #46

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

[Wallet] consolidating #46

wants to merge 6 commits into from

Conversation

lambdina
Copy link
Contributor

No description provided.

@lambdina lambdina changed the title [Wallet] consolidating WIP [Wallet] consolidating Nov 14, 2021
@lambdina lambdina changed the title WIP [Wallet] consolidating [Wallet] consolidating Nov 18, 2021
src/Tokenomia/Ada/Consolidate.hs Outdated Show resolved Hide resolved
src/Tokenomia/Ada/Consolidate.hs Outdated Show resolved Hide resolved
, validitySlotRangeMaybe = Nothing
, tokenSupplyChangesMaybe = Nothing
, ..}
<> ["--invalid-hereafter", show (synSlotAsInt + 600)])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you adding ["--invalid-hereafter", show (synSlotAsInt + 600)]) ?

src/Tokenomia/Ada/Consolidate.hs Outdated Show resolved Hide resolved
@@ -129,7 +140,7 @@ instance ToCardanoCLIOptions TxOut where
[ "--tx-out" , coerce address <> " " <> (T.unpack . toCLI) value
, "--tx-out-datum-hash" , coerce datumHash]
toCardanoCLIOptions ToWallet {..} =
[ "--tx-out" , coerce address <> " " <> (T.unpack . toCLI) value]
[ "--tx-out" , coerce address <> "+" <> (T.unpack . toCLI) value]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should not add a "+" here, the format is "address x lovelace + y policyhash.tokenName" , something like that

return $ rmdups currencyList

askSelectUTxOByType :: (MonadIO m, MonadReader Environment m) => Wallet -> m (Maybe [UTxO])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

askUTxOByAssetClass :: (MonadIO m, MonadReader Environment m) => Wallet -> m (Maybe (NonEmpty UTxO))

src/Tokenomia/Adapter/Data/List.hs Outdated Show resolved Hide resolved
src/Tokenomia/Adapter/Data/List.hs Outdated Show resolved Hide resolved
>>= \wallets -> do
printLn "Select the minter wallet : "
askToChooseAmongGivenWallets wallets
tokensChoosen <- askSelectUTxOByType wallet >>= whenNothingThrow NoFundsToBeRetrieved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whenNothingThrow NoTokensFound

(txFolder, rawTx ) <- (\a-> (a,a <> "tx.raw")) <$> getFolderPath Transactions
aGivenTxOutRef <- txOutRef <$> (selectBiggestStrictlyADAsNotCollateral wallet >>= whenNothingThrow NoADAInWallet)

buildRaw "0" (toCardanoCLIOptions TxBuild
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you using buildRaw here ?

getCurrency :: UTxO -> (CurrencySymbol, TokenName)
getCurrency utxo = (currency, _tokenName)
where (currency, _tokenName, _) = getTokenFrom utxo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getTokenFrom should be changed

@augucharles
Copy link
Contributor

@devfull can we close this ?

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

Successfully merging this pull request may close these issues.

3 participants