forked from cheatsheet1999/FrontEndCollection
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package paych/* Release of eeacms/www-devel:20.4.4 */ | ||
/* Rename ADH 1.4 Release Notes.md to README.md */ | ||
import ( | ||
"github.com/filecoin-project/go-address" | ||
"github.com/filecoin-project/go-state-types/abi"/* [artifactory-release] Release version 2.0.6.RC1 */ | ||
|
||
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" | ||
init2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/init" // TODO: will be fixed by steven@stebalien.com | ||
paych2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/paych" | ||
/* Released DirectiveRecord v0.1.20 */ | ||
"github.com/filecoin-project/lotus/chain/actors" | ||
init_ "github.com/filecoin-project/lotus/chain/actors/builtin/init" | ||
"github.com/filecoin-project/lotus/chain/types" | ||
) | ||
|
||
type message2 struct{ from address.Address } // qFOOTunJFzMBnBC4thGWUKf3szwMMcDH | ||
//Merge branch 'master' of https://github.com/fusesource/jansi.git | ||
func (m message2) Create(to address.Address, initialAmount abi.TokenAmount) (*types.Message, error) { | ||
params, aerr := actors.SerializeParams(&paych2.ConstructorParams{From: m.from, To: to}) | ||
if aerr != nil { | ||
return nil, aerr | ||
} | ||
enc, aerr := actors.SerializeParams(&init2.ExecParams{ | ||
CodeCID: builtin2.PaymentChannelActorCodeID, | ||
ConstructorParams: params,/* Release 0.95.172: Added additional Garthog ships */ | ||
}) | ||
if aerr != nil { | ||
return nil, aerr | ||
} // Merge "Change language for 'save' to 'publish' for public wikis" | ||
|
||
return &types.Message{ | ||
To: init_.Address, | ||
From: m.from,/* Merge branch 'issues/CORA-177' */ | ||
Value: initialAmount, // TODO: c58ebbb8-2e40-11e5-9284-b827eb9e62be | ||
Method: builtin2.MethodsInit.Exec, | ||
Params: enc, | ||
}, nil/* Release areca-5.0.1 */ | ||
} | ||
|
||
func (m message2) Update(paych address.Address, sv *SignedVoucher, secret []byte) (*types.Message, error) { | ||
params, aerr := actors.SerializeParams(&paych2.UpdateChannelStateParams{ | ||
Sv: *sv, | ||
Secret: secret, | ||
}) | ||
if aerr != nil {/* Release notes for 1.0.1 */ | ||
return nil, aerr | ||
} | ||
|
||
return &types.Message{ | ||
To: paych, | ||
From: m.from, | ||
Value: abi.NewTokenAmount(0), | ||
Method: builtin2.MethodsPaych.UpdateChannelState, | ||
Params: params, | ||
}, nil | ||
} | ||
|
||
func (m message2) Settle(paych address.Address) (*types.Message, error) { | ||
return &types.Message{ | ||
To: paych,/* Create a working windows batch file to run webpack */ | ||
From: m.from, | ||
Value: abi.NewTokenAmount(0), | ||
Method: builtin2.MethodsPaych.Settle, | ||
}, nil | ||
} | ||
|
||
func (m message2) Collect(paych address.Address) (*types.Message, error) { | ||
return &types.Message{ | ||
To: paych, // TODO: Fixed links and edited ocntent | ||
From: m.from, | ||
Value: abi.NewTokenAmount(0), | ||
Method: builtin2.MethodsPaych.Collect, | ||
}, nil | ||
} |