Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
Signed-off-by: aeryz <abdullaheryz@protonmail.com>
  • Loading branch information
aeryz committed Jun 5, 2024
1 parent 7651186 commit d4cd34c
Show file tree
Hide file tree
Showing 16 changed files with 5,281 additions and 7,101 deletions.
4 changes: 2 additions & 2 deletions cosmwasm/ucs01-relay-api/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub struct PacketForward {
}

impl PacketForward {
/// Effective timeout is equivilant to `timeout * retries`.
/// Effective timeout is equivalent to `timeout * retries`.
///
/// If the `timeout` is invalid or cannot be parsed, the default timeout is used.
/// Timeouts are considered invalid if they are less than or equal to zero.
Expand Down Expand Up @@ -164,7 +164,7 @@ mod tests {
#[test]
fn serde_parses_memo() {
// let memo = "\"balls\": \"string\"";
let memo = "{\"forward\": {\"receiver\": \"[eth_addr]\",\"port\": \"[union-eth port]\",\"channel\": \"[unioneth channel]\",\"timeout\": \"1000000\",\"retries\": 0}}";
let memo = "{\"forward\": {\"receiver\": \"[eth_addr]\",\"port\": \"[union-eth port]\",\"channel\": \"[union-eth channel]\",\"timeout\": \"1000000\",\"retries\": 0}}";

let parsed = serde_json_wasm::from_str::<Memo>(memo).expect("works");

Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/ucs01-relay/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ mod tests {
}

#[test]
fn receive_transfer_destination_collision_yields_defferent_hashes() {
fn receive_transfer_destination_collision_yields_different_hashes() {
let source_endpoint_1 = IbcEndpoint {
port_id: "wasm.0xDEADC0DE".into(),
channel_id: "channel-1".into(),
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/ucs01-relay/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub const CHANNEL_INFO: Map<&str, ChannelInfo> = Map::new("channel_info");
pub const CHANNEL_STATE: Map<(&str, &str), ChannelState> = Map::new("channel_state");

/// In flight PFM packets, stored for refund information.
/// Indexed by `PfmRefuntPacketKey` (channel_id, port_id, sequence).
/// Indexed by `PfmRefundPacketKey` (channel_id, port_id, sequence).
pub const IN_FLIGHT_PFM_PACKETS: Map<PfmRefundPacketKey, InFlightPfmPacket> =
Map::new("in_flight_pfm_packets");

Expand Down
18 changes: 18 additions & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ IHAVENOIDEA
IIBC
IOSVG
Infima
Infof
Interchain
Jelena
Jemalloc
Expand Down Expand Up @@ -264,6 +265,7 @@ bhapi
bigtestnet
binaryen
bindgen
bindingstypes
bindir
biomejs
bitarray
Expand Down Expand Up @@ -304,9 +306,12 @@ catmull
cctp
cdctypes
cdylib
cerr
chainer
chainid
chainsafe
channelkeeper
channeltypes
cheqd
chevdor
chrono
Expand Down Expand Up @@ -382,7 +387,10 @@ cryptware
ctxt
ctypes
curr
dabindings
dakeeper
dalek
damodule
dasharray
dashmap
dashoffset
Expand All @@ -391,7 +399,11 @@ datadir
datagram
datas
datetime
datypes
debouncer
deferredack
deferredackkeeper
deferredacktypes
delegators
dels
denoms
Expand Down Expand Up @@ -492,6 +504,7 @@ gopath
gopls
goprivate
goroutines
gosec
gotest
gotools
govclient
Expand All @@ -508,6 +521,7 @@ groomlake
groth
groupkeeper
groupmodule
grpclog
hasher
hasown
hastscript
Expand Down Expand Up @@ -746,6 +760,7 @@ overrrides
overscan
oxalica
oxlint
packetforwardmiddleware
pagefind
paloma
paneforge
Expand Down Expand Up @@ -780,6 +795,7 @@ poisonphang
polkachu
polkadot
popd
porttypes
postcss
postgrespassword
posthandler
Expand Down Expand Up @@ -830,6 +846,7 @@ rabby
randao
rawfile
rclone
rctx
rdns
readarray
receiveds
Expand Down Expand Up @@ -905,6 +922,7 @@ sigint
sigtypes
simapp
simd
simstate
simtestutil
simtypes
slashingkeeper
Expand Down
4 changes: 3 additions & 1 deletion evm/contracts/apps/ucs/01-relay/Relay.sol
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ library RelayPacketLib {
pure
returns (bytes memory)
{
return abi.encode(packet.sender, packet.receiver, packet.tokens, packet.extension);
return abi.encode(
packet.sender, packet.receiver, packet.tokens, packet.extension
);
}

function decode(bytes calldata stream)
Expand Down
22 changes: 18 additions & 4 deletions evm/tests/src/apps/ucs/01-relay/Relay.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ contract RelayTests is Test {
emit RelayLib.Sent(0, sourceChannel, address(0), "", "", address(0), 0);

vm.prank(sender);
relay.send(sourceChannel, receiver, localTokens, extension, IBCHeight.zero(), 0);
relay.send(
sourceChannel, receiver, localTokens, extension, IBCHeight.zero(), 0
);

return denomAddress;
}
Expand Down Expand Up @@ -174,7 +176,9 @@ contract RelayTests is Test {
emit RelayLib.Sent(0, sourceChannel, address(0), "", "", address(0), 0);

vm.prank(receiver);
relay.send(sourceChannel, sender, localTokens, extension, IBCHeight.zero(), 0);
relay.send(
sourceChannel, sender, localTokens, extension, IBCHeight.zero(), 0
);
}

function receiveRemoteToken(
Expand Down Expand Up @@ -654,7 +658,12 @@ contract RelayTests is Test {

vm.prank(sender);
relay.send(
destinationChannel, receiver, localTokens, extension, IBCHeight.zero(), 0
destinationChannel,
receiver,
localTokens,
extension,
IBCHeight.zero(),
0
);

Token[] memory tokens = new Token[](1);
Expand Down Expand Up @@ -787,7 +796,12 @@ contract RelayTests is Test {

vm.prank(sender);
relay.send(
destinationChannel, receiver, localTokens, extension, IBCHeight.zero(), 0
destinationChannel,
receiver,
localTokens,
extension,
IBCHeight.zero(),
0
);

// Local tokens must be tracked as outstanding for the channel
Expand Down
4 changes: 2 additions & 2 deletions generated/rust/contracts/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d4cd34c

Please sign in to comment.