Skip to content

Commit

Permalink
upgrade juno (#26)
Browse files Browse the repository at this point in the history
* upgrade juno

* execute state.PendingReadWriter

---------

Co-authored-by: xinran chen <[email protected]>
  • Loading branch information
Lawliet-Chan and xinran chen authored Apr 5, 2024
1 parent cad76c1 commit c47c004
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
28 changes: 0 additions & 28 deletions cairo/cairo.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,34 +102,6 @@ func (c *Cairo) CheckTxn(txn *types.SignedTxn) error {
// Replace the txHash with the Hash of starknet Txn
txn.TxnHash = starkTx.Hash().Bytes()

//if txReq.Tx.Type == rpc.TxnDeclare && txReq.Tx.Version.Cmp(new(felt.Felt).SetUint64(2)) != -1 {
// contractClass := make(map[string]any)
// if err := json.Unmarshal(txReq.Tx.ContractClass, &contractClass); err != nil {
// return fmt.Errorf("unmarshal contract class: %v", err)
// }
// sierraProg, ok := contractClass["sierra_program"]
// if !ok {
// return fmt.Errorf("{'sierra_program': ['Missing data for required field.']}")
// }
//
// sierraProgBytes, errIn := json.Marshal(sierraProg)
// if errIn != nil {
// return errIn
// }
//
// gwSierraProg, errIn := utils.Gzip64Encode(sierraProgBytes)
// if errIn != nil {
// return errIn
// }
//
// contractClass["sierra_program"] = gwSierraProg
// newContractClass, err := json.Marshal(contractClass)
// if err != nil {
// return fmt.Errorf("marshal revised contract class: %v", err)
// }
// txReq.Tx.ContractClass = newContractClass
//}

newTxReqByt, err := json.Marshal(txReq)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion cairo/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (c *Cairo) execute(
) ([]*felt.Felt, []vm.TransactionTrace, error) {
return c.cairoVM.Execute(
txns, declaredClasses, blockNumber, blockTimestamp, c.sequencerAddr,
c.cairoState, c.network, paidFeesOnL1, c.cfg.SkipChargeFee, c.cfg.SkipValidate,
c.cairoState.PendingStateWriter, c.network, paidFeesOnL1, c.cfg.SkipChargeFee, c.cfg.SkipValidate,
c.cfg.ErrOnRevert, gasPriceWEI, gasPriceSTRK, legacyTraceJSON,
)
}
Expand Down
2 changes: 1 addition & 1 deletion juno
Submodule juno updated 1 files
+1 −1 rpc/transaction.go

0 comments on commit c47c004

Please sign in to comment.