fix gst builtin module refs

it breaks the gen script in proxy_gen
This commit is contained in:
vyzo 2022-11-10 04:46:13 +02:00
parent a2d6c8f2f7
commit 2588b45826
2 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@ import (
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
gocrypto "github.com/filecoin-project/go-crypto" gocrypto "github.com/filecoin-project/go-crypto"
actorstypes "github.com/filecoin-project/go-state-types/actors" actorstypes "github.com/filecoin-project/go-state-types/actors"
"github.com/filecoin-project/go-state-types/builtin" builtintypes "github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/builtin/v10/evm" "github.com/filecoin-project/go-state-types/builtin/v10/evm"
init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" init10 "github.com/filecoin-project/go-state-types/builtin/v10/init"
crypto1 "github.com/filecoin-project/go-state-types/crypto" crypto1 "github.com/filecoin-project/go-state-types/crypto"
@ -147,7 +147,7 @@ func TestDelegatedSigner(t *testing.T) {
hasher.Write(pubk) hasher.Write(pubk)
addrHash := hasher.Sum(nil) addrHash := hasher.Sum(nil)
from, err := address.NewDelegatedAddress(builtin.EthereumAddressManagerActorID, addrHash[12:]) from, err := address.NewDelegatedAddress(builtintypes.EthereumAddressManagerActorID, addrHash[12:])
require.NoError(t, err) require.NoError(t, err)
sig := append(r, s...) sig := append(r, s...)

View File

@ -17,7 +17,7 @@ import (
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin" builtintypes "github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/builtin/v10/eam" "github.com/filecoin-project/go-state-types/builtin/v10/eam"
"github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/build"
@ -301,7 +301,7 @@ func (ea EthAddress) ToFilecoinAddress() (address.Address, error) {
// Otherwise, translate the address into an address controlled by the // Otherwise, translate the address into an address controlled by the
// Ethereum Address Manager. // Ethereum Address Manager.
addr, err := address.NewDelegatedAddress(builtin.EthereumAddressManagerActorID, ea[:]) addr, err := address.NewDelegatedAddress(builtintypes.EthereumAddressManagerActorID, ea[:])
if err != nil { if err != nil {
return address.Undef, fmt.Errorf("failed to translate supplied address (%s) into a "+ return address.Undef, fmt.Errorf("failed to translate supplied address (%s) into a "+
"Filecoin f4 address: %w", hex.EncodeToString(ea[:]), err) "Filecoin f4 address: %w", hex.EncodeToString(ea[:]), err)
@ -330,7 +330,7 @@ func TryEthAddressFromFilecoinAddress(addr address.Address, allowId bool) (EthAd
return EthAddress{}, false, xerrors.Errorf("invalid delegated address namespace in: %s", addr) return EthAddress{}, false, xerrors.Errorf("invalid delegated address namespace in: %s", addr)
} }
payload = payload[n:] payload = payload[n:]
if namespace == builtin.EthereumAddressManagerActorID { if namespace == builtintypes.EthereumAddressManagerActorID {
addr, err := EthAddressFromBytes(payload) addr, err := EthAddressFromBytes(payload)
return addr, err == nil, err return addr, err == nil, err
} }