2020-10-05 00:15:27 +00:00
|
|
|
package beaconv1
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"errors"
|
|
|
|
|
|
|
|
ptypes "github.com/gogo/protobuf/types"
|
|
|
|
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1"
|
2021-01-26 09:37:22 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
|
|
|
"go.opencensus.io/trace"
|
2020-10-05 00:15:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// GetForkSchedule retrieve all scheduled upcoming forks this node is aware of.
|
|
|
|
func (bs *Server) GetForkSchedule(ctx context.Context, req *ptypes.Empty) (*ethpb.ForkScheduleResponse, error) {
|
|
|
|
return nil, errors.New("unimplemented")
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetSpec retrieves specification configuration (without Phase 1 params) used on this node. Specification params list
|
|
|
|
// Values are returned with following format:
|
|
|
|
// - any value starting with 0x in the spec is returned as a hex string.
|
|
|
|
// - all other values are returned as number.
|
|
|
|
func (bs *Server) GetSpec(ctx context.Context, req *ptypes.Empty) (*ethpb.SpecResponse, error) {
|
|
|
|
return nil, errors.New("unimplemented")
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetDepositContract retrieves deposit contract address and genesis fork version.
|
|
|
|
func (bs *Server) GetDepositContract(ctx context.Context, req *ptypes.Empty) (*ethpb.DepositContractResponse, error) {
|
2021-01-26 09:37:22 +00:00
|
|
|
ctx, span := trace.StartSpan(ctx, "beaconv1.GetDepositContract")
|
|
|
|
defer span.End()
|
|
|
|
|
|
|
|
return ðpb.DepositContractResponse{
|
|
|
|
Data: ðpb.DepositContract{
|
|
|
|
ChainId: params.BeaconConfig().DepositChainID,
|
|
|
|
Address: params.BeaconConfig().DepositContractAddress,
|
|
|
|
},
|
|
|
|
}, nil
|
2020-10-05 00:15:27 +00:00
|
|
|
}
|