Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Dec 19, 2024
1 parent 1ccfa6b commit a9845a6
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion builders/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ See those DockerHub repos for all available versions of the builder images.

## Usage

Create the Docker images, capable of cross-compling Linux and MacOS dynamic
Create the Docker images, capable of cross-compiling Linux and MacOS dynamic
libs. As the builder images are all x86_64, it can be slow and memory intense to
do this on a different architecture:

Expand Down
2 changes: 1 addition & 1 deletion docs/COMPILER_VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ supported by cosmwasm-std/cosmwasm-vm.

## Tooling Rust compiler

This Rust version is not related to our codebase directy. It's sufficiently
This Rust version is not related to our codebase directly. It's sufficiently
modern to install and execute tools like `cargo-audit`.

## Versions in use
Expand Down
4 changes: 2 additions & 2 deletions docs/MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ where the old name was deprecated.
| `SubcallResponse` | `SubMsgResponse` | Contracts do not "call" each other but send messages around |
| `HumanizeAddress` | `HumanizeAddressFunc` | Follow [best practice for naming function types][ft] |
| `CanonicalizeAddress` | `CanonicalizeAddressFunc` | Follow [best practice for naming function types][ft] |
| `GoAPI.HumanAddress` | `GoAPI.HumanizeAddress` | Perfer verbs for converters |
| `GoAPI.CanonicalAddress` | `GoAPI.CanonicalizeAddress` | Perfer verbs for converters |
| `GoAPI.HumanAddress` | `GoAPI.HumanizeAddress` | Prefer verbs for converters |
| `GoAPI.CanonicalAddress` | `GoAPI.CanonicalizeAddress` | Prefer verbs for converters |
| `CosmosMsg.Stargate` | `CosmosMsg.Any` | The message has nothing to do with Stargate |
| `StargateMsg` | `AnyMsg` | The message has nothing to do with Stargate |
| `QueryResponse` | `QueryResult` | Brings consistency with the naming of the other results |
Expand Down
4 changes: 2 additions & 2 deletions internal/api/bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ typedef struct ByteSliceView {
* ```
*
*
* If you want to mutate data, you need to comsume the vector and create a new one:
* If you want to mutate data, you need to consume the vector and create a new one:
*
* ```rust
* # use wasmvm::{UnmanagedVector};
Expand Down Expand Up @@ -308,7 +308,7 @@ typedef struct GoIter {
struct gas_meter_t *gas_meter;
/**
* A reference which identifies the iterator and allows finding and accessing the
* actual iterator instance in Go. Once fully initalized, this is immutable.
* actual iterator instance in Go. Once fully initialized, this is immutable.
*/
struct IteratorReference reference;
struct IteratorVtable vtable;
Expand Down
2 changes: 1 addition & 1 deletion internal/api/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestCreateAndDestroyUnmanagedVector(t *testing.T) {
var original []byte
unmanaged := newUnmanagedVector(original)
require.Equal(t, cbool(true), unmanaged.is_none)
// We must not make assumtions on the other fields in this case
// We must not make assumptions on the other fields in this case
copy := copyAndDestroyUnmanagedVector(unmanaged)
require.Nil(t, copy)
}
Expand Down
10 changes: 5 additions & 5 deletions internal/api/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (l *Lookup) WithGasMeter(meter MockGasMeter) *Lookup {
}
}

// Get wraps the underlying DB's Get method panicing on error.
// Get wraps the underlying DB's Get method panicking on error.
func (l Lookup) Get(key []byte) []byte {
l.meter.ConsumeGas(GetPrice, "get")
v, err := l.db.Get(key)
Expand All @@ -288,23 +288,23 @@ func (l Lookup) Get(key []byte) []byte {
return v
}

// Set wraps the underlying DB's Set method panicing on error.
// Set wraps the underlying DB's Set method panicking on error.
func (l Lookup) Set(key, value []byte) {
l.meter.ConsumeGas(SetPrice, "set")
if err := l.db.Set(key, value); err != nil {
panic(err)
}
}

// Delete wraps the underlying DB's Delete method panicing on error.
// Delete wraps the underlying DB's Delete method panicking on error.
func (l Lookup) Delete(key []byte) {
l.meter.ConsumeGas(RemovePrice, "remove")
if err := l.db.Delete(key); err != nil {
panic(err)
}
}

// Iterator wraps the underlying DB's Iterator method panicing on error.
// Iterator wraps the underlying DB's Iterator method panicking on error.
func (l Lookup) Iterator(start, end []byte) types.Iterator {
l.meter.ConsumeGas(RangePrice, "range")
iter, err := l.db.Iterator(start, end)
Expand All @@ -315,7 +315,7 @@ func (l Lookup) Iterator(start, end []byte) types.Iterator {
return iter
}

// ReverseIterator wraps the underlying DB's ReverseIterator method panicing on error.
// ReverseIterator wraps the underlying DB's ReverseIterator method panicking on error.
func (l Lookup) ReverseIterator(start, end []byte) types.Iterator {
l.meter.ConsumeGas(RangePrice, "range")
iter, err := l.db.ReverseIterator(start, end)
Expand Down
2 changes: 1 addition & 1 deletion lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func LibwasmvmVersion() (string, error) {

// CreateChecksum performs the hashing of Wasm bytes to obtain the CosmWasm checksum.
//
// Ony Wasm blobs are allowed as inputs and a magic byte check will be performed
// Only Wasm blobs are allowed as inputs and a magic byte check will be performed
// to avoid accidental misusage.
func CreateChecksum(wasm []byte) (Checksum, error) {
if len(wasm) == 0 {
Expand Down
6 changes: 3 additions & 3 deletions lib_libwasmvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,11 @@ func (vm *VM) MigrateWithInfo(
return &result, gasReport.UsedInternally, nil
}

// Sudo allows native Go modules to make priviledged (sudo) calls on the contract.
// Sudo allows native Go modules to make privileged (sudo) calls on the contract.
// The contract can expose entry points that cannot be triggered by any transaction, but only via
// native Go modules, and delegate the access control to the system.
//
// These work much like Migrate (same scenario) but allows custom apps to extend the priviledged entry points
// These work much like Migrate (same scenario) but allows custom apps to extend the privileged entry points
// without forking cosmwasm-vm.
func (vm *VM) Sudo(
checksum Checksum,
Expand Down Expand Up @@ -354,7 +354,7 @@ func (vm *VM) Sudo(
return &result, gasReport.UsedInternally, nil
}

// Reply allows the native Go wasm modules to make a priviledged call to return the result
// Reply allows the native Go wasm modules to make a privileged call to return the result
// of executing a SubMsg.
//
// These work much like Sudo (same scenario) but focuses on one specific case (and one message type)
Expand Down
4 changes: 2 additions & 2 deletions libwasmvm/bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ typedef struct ByteSliceView {
* ```
*
*
* If you want to mutate data, you need to comsume the vector and create a new one:
* If you want to mutate data, you need to consume the vector and create a new one:
*
* ```rust
* # use wasmvm::{UnmanagedVector};
Expand Down Expand Up @@ -308,7 +308,7 @@ typedef struct GoIter {
struct gas_meter_t *gas_meter;
/**
* A reference which identifies the iterator and allows finding and accessing the
* actual iterator instance in Go. Once fully initalized, this is immutable.
* actual iterator instance in Go. Once fully initialized, this is immutable.
*/
struct IteratorReference reference;
struct IteratorVtable vtable;
Expand Down
2 changes: 1 addition & 1 deletion libwasmvm/src/examples/wasmvmstatic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This is an entry point into the library in order to set
// crate-type = ["staticlib"] via a command line arument.
// crate-type = ["staticlib"] via a command line argument.
// See `--example wasmvmstatic`

pub use wasmvm::*;
2 changes: 1 addition & 1 deletion libwasmvm/src/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl Vtable for IteratorVtable {}
pub struct GoIter {
pub gas_meter: *mut gas_meter_t,
/// A reference which identifies the iterator and allows finding and accessing the
/// actual iterator instance in Go. Once fully initalized, this is immutable.
/// actual iterator instance in Go. Once fully initialized, this is immutable.
pub reference: IteratorReference,
pub vtable: IteratorVtable,
}
Expand Down
2 changes: 1 addition & 1 deletion libwasmvm/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl U8SliceView {
/// ```
///
///
/// If you want to mutate data, you need to comsume the vector and create a new one:
/// If you want to mutate data, you need to consume the vector and create a new one:
///
/// ```rust
/// # use wasmvm::{UnmanagedVector};
Expand Down
2 changes: 1 addition & 1 deletion libwasmvm/src/vtables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// In fact, in Go we create a single global vtable variable holding and owning the
/// function the vtables in Rust point to.
///
/// The `Vtable` trait is created to find those vtables troughout the codebase.
/// The `Vtable` trait is created to find those vtables throughout the codebase.
///
/// ## Nullability
///
Expand Down
2 changes: 1 addition & 1 deletion types/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const (
// Ordering is (revision_number, timeout_height)
type IBCTimeoutBlock struct {
// the version that the client is currently on
// (eg. after reseting the chain this could increment 1 as height drops to 0)
// (eg. after resetting the chain this could increment 1 as height drops to 0)
Revision uint64 `json:"revision"`
// block height after which the packet times out.
// the height within the given revision
Expand Down
2 changes: 1 addition & 1 deletion types/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type queryResultImpl struct {
// A custom serializer that allows us to map QueryResult instances to the Rust
// enum `ContractResult<Binary>`
func (q QueryResult) MarshalJSON() ([]byte, error) {
// In case both Ok and Err are empty, this is interpreted and seralized
// In case both Ok and Err are empty, this is interpreted and serialized
// as an Ok case with no data because errors must not be empty.
if len(q.Ok) == 0 && len(q.Err) == 0 {
return []byte(`{"ok":""}`), nil
Expand Down
2 changes: 1 addition & 1 deletion types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (pm *PinnedMetrics) UnmarshalMessagePack(data []byte) error {
}

// Array is a wrapper around a slice that ensures that we get "[]" JSON for nil values.
// When unmarshaling, we get an empty slice for "[]" and "null".
// When unmarshalling, we get an empty slice for "[]" and "null".
//
// This is needed for fields that are "Vec<C>" on the Rust side because `null` values
// will result in an error there.
Expand Down

0 comments on commit a9845a6

Please sign in to comment.