Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- chore(deps): update of quic-go to v0.54.1 and go-libp2p to v0.43.0 ([filecoin-project/lotus#13361](https://github.com/filecoin-project/lotus/pull/13361))
- feat(spcli): add a `deposit-margin-factor` option to `lotus-miner actor new` and `lotus-shed miner create` so the sent deposit still covers the on-chain requirement if it rises between lookup and execution
- feat(cli): lotus evm deploy prints message CID ([filecoin-project/lotus#13378](https://github.com/filecoin-project/lotus/pull/13378))
- feat(cli): add FRC-102 compatible EIP-191 signing via --fevm flag ([filecoin-project/lotus#13388](https://github.com/filecoin-project/lotus/pull/13388))

# Node and Miner v1.34.1 / 2025-09-15

Expand Down
19 changes: 18 additions & 1 deletion cli/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,12 @@ var walletSign = &cli.Command{
Name: "sign",
Usage: "sign a message",
ArgsUsage: "<signing address> <hexMessage>",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "fevm",
Usage: "Use EIP-191 (Ethereum-style) prefix for signing FEVM messages per FRC-102",
},
},
Action: func(cctx *cli.Context) error {
api, closer, err := GetFullNodeAPI(cctx)
if err != nil {
Expand All @@ -459,7 +465,18 @@ var walletSign = &cli.Command{
return err
}

sig, err := api.WalletSign(ctx, addr, msg)
var prefix []byte
if cctx.Bool("fevm") {
//EVM-Compatible
prefix = []byte(fmt.Sprintf("\x19Ethereum Signed Message:\n%d", len(msg)))
} else {
//Filecoin
prefix = []byte(fmt.Sprintf("Filecoin Signed Message:\n%d", len(msg)))
}

toSign := append(prefix, msg...)

sig, err := api.WalletSign(ctx, addr, toSign)

if err != nil {
// Check if the address is a multisig address
Expand Down
1 change: 1 addition & 0 deletions documentation/en/cli-lotus.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.