Skip to content

Commit

Permalink
remove prints
Browse files Browse the repository at this point in the history
  • Loading branch information
Salvionied committed Apr 24, 2024
1 parent ea2eebf commit 15d467a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions serialization/PlutusData/PlutusData.go
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,6 @@ func (pdk *PlutusDataKey) UnmarshalCBOR(value []uint8) error {

func (pdk *PlutusDataKey) MarshalCBOR() ([]uint8, error) {
decodedHex, _ := hex.DecodeString(pdk.CborHexValue)
fmt.Println("CALLED ONCE")
return decodedHex, nil
}

Expand Down Expand Up @@ -1190,7 +1189,6 @@ func (pd *PlutusData) UnmarshalCBOR(value []uint8) error {
y := map[PlutusDataKey]PlutusData{}
err := cbor.Unmarshal(value, &y)
if err != nil {
fmt.Println("ERRORED HERE")
return err
}
pd.PlutusDataType = PlutusMap
Expand Down
3 changes: 0 additions & 3 deletions serialization/PlutusData/PlutusData_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package PlutusData_test
import (
"encoding/hex"
"encoding/json"
"fmt"
"testing"

"github.com/Salvionied/apollo/serialization/PlutusData"
Expand Down Expand Up @@ -291,13 +290,11 @@ func TestPlutusDataFromJson(t *testing.T) {
if err != nil {
t.Error(err)
}
fmt.Println(hex.EncodeToString(cborred))
datum := GetMinSwapPlutusData()
receborred, err := cbor.Marshal(datum)
if err != nil {
t.Error(err)
}
fmt.Println(hex.EncodeToString(receborred))
if hex.EncodeToString(cborred) == hex.EncodeToString(receborred) {
t.Error("Not the same")
}
Expand Down
4 changes: 0 additions & 4 deletions serialization/TransactionOutput/TransactionOutput_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package TransactionOutput_test

import (
"encoding/hex"
"fmt"
"testing"

"github.com/Salvionied/apollo/serialization/Address"
Expand Down Expand Up @@ -54,7 +53,6 @@ func TestPostAlonzo(t *testing.T) {
resultHex := "a300581d712618e94cdb06792f05ae9b1ec78b0231f4b7f4215b1b4cf52e6342de011a000f4240028201d81858e8d8799fd8799fd8799f581c37dce7298152979f0d0ff71fb2d0c759b298ac6fa7bc56b928ffc1bcffd8799fd8799fd8799f581cf68864a338ae8ed81f61114d857cb6a215c8e685aa5c43bc1f879cceffffffffd8799fd8799f581c37dce7298152979f0d0ff71fb2d0c759b298ac6fa7bc56b928ffc1bcffd8799fd8799fd8799f581cf68864a338ae8ed81f61114d857cb6a215c8e685aa5c43bc1f879cceffffffffd87a80d8799fd8799f581c25f0fc240e91bd95dcdaebd2ba7713fc5168ac77234a3d79449fc20c47534f4349455459ff1b00002cc16be02b37ff1a001e84801a001e8480ff"
cborred, _ := cbor.Marshal(txO)
if hex.EncodeToString(cborred) != resultHex {
fmt.Println(hex.EncodeToString(cborred))
t.Errorf("Invalid marshaling")
}

Expand All @@ -70,7 +68,6 @@ func TestDeSerializeTxWithPostAlonzoOut(t *testing.T) {
if err != nil {
t.Error("Error while unmarshaling", err)
}
fmt.Println(tx.TransactionBody.Outputs[0].PostAlonzo.Datum)
remarshaled, err := cbor.Marshal(tx)
if err != nil {
t.Error("Error While remarshaling", err)
Expand Down Expand Up @@ -157,7 +154,6 @@ func TestTransactionOutputShelleyUtils(t *testing.T) {
clonedNoAssets := toNoAssets.Clone()
clonedWithAssets := toWithAssets.Clone()
if !toNoAssets.Amount.Equal(clonedNoAssets.Amount) { //|| toNoAssets.Address.String() != clonedNoAssets.Address.String() || &toNoAssets == &clonedNoAssets {
fmt.Println(toNoAssets.Amount.GetCoin(), clonedNoAssets.Amount.GetCoin(), toNoAssets.Amount.GetAssets(), clonedNoAssets.Amount.GetAssets())
t.Error("Error while cloning og:", toNoAssets.Amount.String(), "cloned:", clonedNoAssets.Amount.String())
}
if !toWithAssets.Amount.Equal(clonedWithAssets.Amount) || toWithAssets.Address.String() != clonedWithAssets.Address.String() || &toWithAssets == &clonedWithAssets {
Expand Down
4 changes: 0 additions & 4 deletions txBuilding/Backend/MaestroChainContext/MaestroChainContext.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ func (mcc *MaestroChainContext) AddressUtxos(address string, gather bool) []Base
params.ResolveDatums()
utxosAtAddressAtApi, err := mcc.client.UtxosAtAddress(address, params)
if err != nil {
fmt.Println(err)
return addressUtxos
}

Expand Down Expand Up @@ -312,7 +311,6 @@ func (mcc *MaestroChainContext) Utxos(address Address.Address) []UTxO.UTxO {
params.ResolveDatums()
utxosAtAddressAtApi, err := mcc.client.UtxosAtAddress(address.String(), params)
if err != nil {
fmt.Println(err)
return utxos
}

Expand Down Expand Up @@ -365,7 +363,6 @@ func (mcc *MaestroChainContext) Utxos(address Address.Address) []UTxO.UTxO {
func (mcc *MaestroChainContext) SubmitTx(tx Transaction.Transaction) (serialization.TransactionId, error) {
txBytes, err := tx.Bytes()
if err != nil {
fmt.Println("HERE ERR")
return serialization.TransactionId{}, err
}
txHex := hex.EncodeToString(txBytes)
Expand All @@ -374,7 +371,6 @@ func (mcc *MaestroChainContext) SubmitTx(tx Transaction.Transaction) (serializat
log.Fatal(err)
return serialization.TransactionId{}, err
}
fmt.Println("RESPONSE", resp)
decodedResponseHash, _ := hex.DecodeString(resp.Data)
return serialization.TransactionId{Payload: []byte(decodedResponseHash)}, nil
}
Expand Down

0 comments on commit 15d467a

Please sign in to comment.