// TransferRegistrarDomain initiates the transfer from another registrar
// to Cloudflare Registrar.
//
// API reference: https://api.cloudflare.com/#registrar-domains-transfer-domain
491835
func (api *API) TransferRegistrarDomain(accountID, domainName string) ([]RegistrarDomain, error) {
	uri := fmt.Sprintf("/accounts/%s/registrar/domains/%s/transfer", accountID, domainName)

	res, err := api.makeRequest("POST", uri, nil)
	if err != nil {
		return []RegistrarDomain{}, errors.Wrap(err, errMakeRequestError)
	}

	var r RegistrarDomainsDetailResponse
	err = json.Unmarshal(res, &r)
	if err != nil {
		return []RegistrarDomain{}, errors.Wrap(err, errUnmarshalError)
	}
	return r.Result, nil
}
257561
func (c *Client) CreateDomain(p *CreateDomainParameter) (*Domain, error) {
	obj, err := c.Request("createDomain", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Domain), err
}
566676
func TransferRepoAction(doer, oldOwner *User, repo *Repository) error {
	return transferRepoAction(x, doer, oldOwner, repo)
}
312360
func (s *DomainService) UpdateDomain(p *UpdateDomainParams) (*UpdateDomainResponse, error) {
	resp, err := s.cs.newRequest("updateDomain", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r UpdateDomainResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
1145251
func newChainRegistry() *chainRegistry {
	return &chainRegistry{
		activeChains: make(map[chainCode]*chainControl),
		netParams:    make(map[chainCode]*bitcoinNetParams),
	}
}
21268
func (_ENS *ENSTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _ENS.Contract.contract.Transfer(opts)
}
484966
func (_PublicResolver *PublicResolverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _PublicResolver.Contract.PublicResolverTransactor.contract.Transfer(opts)
}
612466
func (c *Client) RetrieveDomain(name string) (DomainResponse, error) {
	req, err := c.NewRequest(map[string]string{}, "GET", fmt.Sprintf("/domains/%s", name))

	if err != nil {
		return DomainResponse{}, err
	}

	resp, err := checkResp(c.Http.Do(req))
	if err != nil {
		return DomainResponse{}, fmt.Errorf("Error destroying domain: %s", err)
	}

	domainresp := new(DomainResponse)

	err = decodeBody(resp, domainresp)

	if err != nil {
		return DomainResponse{}, fmt.Errorf("Error decoding domain response: %s", err)
	}

	// The request was successful
	return *domainresp, nil
}
39427
func (s *RegistrarService) RenewDomain(accountID string, domainName string, request *DomainRenewRequest) (*domainRenewalResponse, error) {
	path := versioned(fmt.Sprintf("/%v/registrar/domains/%v/renewals", accountID, domainName))
	renewalResponse := &domainRenewalResponse{}

	resp, err := s.client.post(path, request, renewalResponse)
	if err != nil {
		return nil, err
	}

	renewalResponse.HttpResponse = resp
	return renewalResponse, nil
}
774639
func (t *Transferer) NewTransfer(conf *TransferConfig) (*storagetransfer.TransferJob, error) {
	job, err := conf.Job()
	if err != nil {
		return nil, err
	}

	return t.svc.Create(job).Do()
}
770416
func (_PublicResolver *PublicResolverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
	return _PublicResolver.Contract.contract.Transfer(opts)
}
959356
func (c *BoundContract) Transfer(opts *TransactOpts) (*types.Transaction, error) {
	return c.transact(opts, &c.address, nil)
}
238260
func (a *api) UpgradeRegistry(endpoint string, override bool) error {
	client, err := a.connectMaster()
	if err != nil {
		return err
	}
	return client.UpgradeRegistry(endpoint, override)
}
616632
func OptServerPrimaryTranslateStoreFunc(tf func(interface{}) TranslateStore) ServerOption {

	return func(s *Server) error {
		s.holder.NewPrimaryTranslateStore = tf
		return nil
	}
}
14382
func (c *Client) TransferRegistrations(close bool) (fab.EventSnapshot, error) {
	if !close {
		return c.Transfer()
	}

	var snapshot fab.EventSnapshot
	var err error
	c.close(func() {
		logger.Debug("Stopping dispatcher and taking snapshot of all registrations...")
		snapshot, err = c.StopAndTransfer()
		if err != nil {
			logger.Errorf("An error occurred while stopping dispatcher and taking snapshot: %s", err)
		}
	})

	return snapshot, err
}
779245
func (s *RegistrarService) ChangeDomainDelegationToVanity(accountID string, domainName string, newDelegation *Delegation) (*vanityDelegationResponse, error) {
	path := versioned(fmt.Sprintf("/%v/registrar/domains/%v/delegation/vanity", accountID, domainName))
	delegationResponse := &vanityDelegationResponse{}

	resp, err := s.client.put(path, newDelegation, delegationResponse)
	if err != nil {
		return nil, err
	}

	delegationResponse.HttpResponse = resp
	return delegationResponse, nil
}
100296
func CanTransfer(db vm.StateDB, addr common.Address, amount *big.Int) bool {
	return db.GetBalance(addr).Cmp(amount) >= 0
}