Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some comments #25

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SuiStake.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var state = chain.GetValidatorState()
print(state.Epoch/TotalStaked/TotalRewards)
print("validator list = ", state.Validators)

// show validator infomation.
// show validator information.
var validator = state.Validators[idx]
print(validator.Name/Address/ImageUrl/APY ....)
```
Expand Down
2 changes: 1 addition & 1 deletion core/cosmos/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (a *Account) PrivateKeyHex() (string, error) {
return hexTypes.HexEncodeToString(a.privKey.Bytes()), nil
}

// Is deocde from address
// Is decode from address
// @return publicKey data
func (a *Account) PublicKey() []byte {
return a.privKey.PubKey().Bytes()
Expand Down
6 changes: 3 additions & 3 deletions core/cosmos/address_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestPrivatePublicKeyDataAndStringTransform(t *testing.T) {
if priKey.Equals(account.privKey) {
t.Log("private key restore success!!")
} else {
t.Fatal("private key resotre failured.")
t.Fatal("private key restore failured.")
}

t.Log("============================")
Expand All @@ -90,7 +90,7 @@ func TestPrivatePublicKeyDataAndStringTransform(t *testing.T) {
if pubKey.Equals(account.privKey.PubKey()) {
t.Log("public key restore success!!")
} else {
t.Fatal("public key resotre failured.")
t.Fatal("public key restore failured.")
}

t.Log("============================")
Expand All @@ -99,6 +99,6 @@ func TestPrivatePublicKeyDataAndStringTransform(t *testing.T) {
if accAddress.Equals(originAddress) {
t.Log("address key restore success!!")
} else {
t.Fatal("address key resotre failured.")
t.Fatal("address key restore failured.")
}
}
2 changes: 1 addition & 1 deletion core/eth/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (a *Account) PrivateKeyHex() (string, error) {
return types.HexEncodeToString(bytes), nil
}

// Is deocde from address
// Is decode from address
// @return publicKey data
func (a *Account) PublicKey() []byte {
return crypto.FromECDSAPub(&a.privateKeyECDSA.PublicKey)
Expand Down
2 changes: 1 addition & 1 deletion core/eth/chainManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func GetConnection(rpcUrl string) (*EthChain, error) {
return getConnectionWithTimeout(rpcUrl, 0)
}

// @param timeout time unit millsecond, zero instead use default.
// @param timeout time unit millisecond, zero instead use default.
func getConnectionWithTimeout(rpcUrl string, timeout int64) (*EthChain, error) {
chain, ok := chainConnections[rpcUrl]
if ok {
Expand Down
2 changes: 1 addition & 1 deletion core/eth/ethchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (e *EthChain) CreateRemote(rpcUrl string) (chain *EthChain, err error) {
return e.CreateRemoteWithTimeout(rpcUrl, 0)
}

// @param timeout time unit millsecond. 0 means use chain's default: 60000ms.
// @param timeout time unit millisecond. 0 means use chain's default: 60000ms.
func (e *EthChain) CreateRemoteWithTimeout(rpcUrl string, timeout int64) (chain *EthChain, err error) {
defer base.CatchPanicAndMapToBasicError(&err)

Expand Down
2 changes: 1 addition & 1 deletion core/starknet/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (a *Account) PrivateKeyHex() (string, error) {
return hexTypes.HexEncodeToString(a.privateKey.Bytes()), nil
}

// Is deocde from address
// Is decode from address
// @return publicKey data
func (a *Account) PublicKey() []byte {
pub, _, err := curve.Curve.PrivateToPoint(a.privateKey)
Expand Down
Loading