<commit_before>package stellarbase

import "github.com/stellar/go-stellar-base/xdr"

//go:generate rake xdr:update
//go:generate go fmt ./xdr

// AddressToAccountId converts the provided address into a xdr.AccountId
func AddressToAccountId(address string) (result xdr.AccountId, err error) {
	bytes, err := DecodeBase58Check(VersionByteAccountID, address)

	if err != nil {
		return
	}

	copy(result[:], bytes)
	return
}<commit_msg>Add One constant, for easier "amount" creation<commit_after>package stellarbase

import "github.com/stellar/go-stellar-base/xdr"

//go:generate rake xdr:update
//go:generate go fmt ./xdr

// One is the value of one whole unit of currency.  Stellar uses 7 fixed digits
// for fractional values, thus One is 10 million (10^7)
const One = 10000000

// AddressToAccountId converts the provided address into a xdr.AccountId
func AddressToAccountId(address string) (result xdr.AccountId, err error) {
	bytes, err := DecodeBase58Check(VersionByteAccountID, address)

	if err != nil {
		return
	}

	copy(result[:], bytes)
	return
}
{'fraction_non_alphanumeric': 0.1014218009478673, 'fraction_numerical': 0.017061611374407582, 'mean_word_length': 4.67741935483871, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6040225', 'n_tokens_mistral': 357, 'n_tokens_neox': 327, 'n_words': 107}