Hi,
I try to lock my token for say 1.5 day in the testnet.
At the time this script is executed I am at the slot 43,197,173. Calculating about 1.5 day it will be approximately 129,600 Slot. So, it will become 43,326,773.
I got the guide from here
First I create 2 key payment.skey and payment.vkey.
After that I create the hash and this is my script call timelock2day.json
{
"type": "all",
"scripts":
[
{
"type": "after",
"slot": 43326773
},
{
"type": "sig",
"keyHash": "814773784a8de1a39c6eae5288e0738d401bfca2282a17c9ac70c087"
}
]
}
After I got the script and key. I create the address called scriptlock2day.addr and fill with 20 tADA and 1000 icrypcoin
cardano-cli address build-script
--script-file myscript.json
--testnet-magic 1097911063
--out-file scriptlock2day.addr
The address shop up then I create the tx.draft
cardano-cli transaction build-raw --invalid-before 43326773 --fee 0 --tx-in f29dd36fd207d361226c8772141d7dbd5932bac3ed04bd4dfb45ff768c31066d#0 --tx-out addr_test1wq2gp492gnwgm422393zhewjfqghvmytcu0hx4jgtqmkeyc4kyqgs+10000000 --out-file tx.draft
Create witness
cardano-cli transaction witness --tx-body-file tx.draft --signing-key-file payment.skey --testnet-magic 1097911063 --out-file witness.json
Then Sign
cardano-cli transaction assemble --tx-body-file tx.draft --witness-file witness.json --testnet-magic 1097911063 --out-file tx.signed
Submit
cardano-cli transaction submit --tx-file tx.signed --testnet-magic 1097911063
Then I got this error.
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (MissingScriptWitnessesUTXOW (fromList [ScriptHash "1480d4aa44dc8dd54a89622be5d24811766c8bc71f73564858376c93"]))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (UtxosFailure (CollectErrors [NoRedeemer (Spending (TxInCompact (TxId {_unTxId = SafeHash "f29dd36fd207d361226c8772141d7dbd5932bac3ed04bd4dfb45ff768c31066d"}) 0)),NoWitness (ScriptHash "1480d4aa44dc8dd54a89622be5d24811766c8bc71f73564858376c93")])))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 20000000 (fromList [(PolicyID {policyID = ScriptHash "b69696ea73d81281075b23d8e26ed3a658d25dd61de37cf47fc93309"},fromList [("icrypcoin",1000)])])) (Value 10000000 (fromList []))))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (FeeTooSmallUTxO (Coin 163829) (Coin 0)))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (OutsideValidityIntervalUTxO (ValidityInterval {invalidBefore = SJust (SlotNo 43326773), invalidHereafter = SNothing}) (SlotNo 43204980))))])
My question is Without creating the tx.draft, witness, signed, then submit. Is my wallet already lock for 1.5 days?
And any idea what cost the error?