Fix Ex_setPublicKey
Any ICONist can set a public key
@@ -1535,28 +1535,6 @@ func (s *ChainScore) Ex_getBTPNetworkTypeID(name string) (int64, error) {
return s.newBTPContext().GetNetworkTypeIdByName(name), nil
}
-func (s *ChainScore) Ex_getBTPNetworkType(id *common.HexInt) (map[string]interface{}, error) {
- if err := s.tryChargeCall(); err != nil {
- return nil, err
- }
- nt, err := s.newBTPContext().GetNetworkType(id.Int64())
- if err != nil {
- return nil, err
- }
- return nt.ToJSON(), nil
-}
-
-func (s *ChainScore) Ex_getBTPNetwork(id *common.HexInt) (map[string]interface{}, error) {
- if err := s.tryChargeCall(); err != nil {
- return nil, err
- }
- nw, err := s.newBTPContext().GetNetwork(id.Int64())
- if err != nil {
- return nil, err
- }
- return nw.ToJSON(), nil
-}
-
func (s *ChainScore) Ex_getPublicKey(address module.Address, name string) (string, error) {
if err := s.tryChargeCall(); err != nil {
return "", err
@@ -1650,9 +1628,6 @@ func (s *ChainScore) Ex_sendBTPMessage(networkId *common.HexInt, message []byte)
}
func (s *ChainScore) Ex_setPublicKey(name string, pubKey []byte) error {
- if err := s.checkGovernance(true); err != nil {
- return err
- }
if s.from.IsContract() {
return scoreresult.New(module.StatusAccessDenied, "NoPermission")
}
