Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Feat/code gen actors (#50)
Browse files Browse the repository at this point in the history
* add payment channel actor types
* add code gen and generate
  • Loading branch information
frrist authored Dec 2, 2019
1 parent f9d57ba commit 08106c1
Show file tree
Hide file tree
Showing 6 changed files with 950 additions and 0 deletions.
30 changes: 30 additions & 0 deletions pkg/gen/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package main

import (
gen "github.com/whyrusleeping/cbor-gen"

"github.com/filecoin-project/chain-validation/pkg/state/actors/paych"
"github.com/filecoin-project/chain-validation/pkg/state/types"
)

func main() {

// General Types
if err := gen.WriteTupleEncodersToFile("../state/types/cbor_gen.go", "types",
types.SignedVoucher{},
types.Merge{},
types.ModVerifyParams{},
types.Signature{},
); err != nil {
panic(err)
}

// Payment Channel Actor
if err := gen.WriteTupleEncodersToFile("../state/actors/paych/cbor_gen.go", "paych",
paych.PaymentInfo{},
paych.PaymentChannelActorState{},
paych.LaneState{},
); err != nil {
panic(err)
}
}
Loading

0 comments on commit 08106c1

Please sign in to comment.