Skip to content

Commit 352bbd8

Browse files
committed
add urls
1 parent 456f69f commit 352bbd8

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

README.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
# Wormhole Solidity SDK
22

3-
The purpose of this SDK is to provide helpers to take your existing single-chain solidity application cross-chain
3+
The purpose of this SDK is to provide helpers to take your existing single-chain solidity application cross-chain using Wormhole's automatic relayers
44

55
### Installation
66

77
**Foundry and Forge**
8+
89
```bash
910
forge install wormhole-foundation/wormhole-solidity-sdk
1011
```
1112

12-
### Example Usage
13+
### Example Usage + Introduction to Automatic Relayers
1314

14-
[HelloWormhole - Simple cross-chain message sending application](https://github.com/JoeHowarth/hello-wormhole)
15+
[HelloWormhole - Simple cross-chain message sending application](https://github.com/wormhole-foundation/hello-wormhole)
1516

16-
[HelloToken - Simple cross-chain token sending application](https://github.com/JoeHowarth/hello-tokens)
17+
[HelloToken - Simple cross-chain token sending application](https://github.com/wormhole-foundation/hello-token)
1718

1819
### SDK Summary
1920

20-
- Includes interfaces to interact with contracts in the Wormhole ecosystem (src/interfaces)
21+
- Includes interfaces to interact with contracts in the Wormhole ecosystem ([src/interfaces](https://github.com/wormhole-foundation/wormhole-solidity-sdk/tree/main/src/interfaces))
2122
- Includes the base class ‘Base’ with helpers for common actions that will typically need to be done within ‘receiveWormholeMessages’:
22-
- `onlyWormholeRelayer()`: Checking that msg.sender is the wormhole relayer contract
23-
- `replayProtect(bytes32 deliveryHash)`: Checking that the current delivery has not already been processed (via the hash)
24-
23+
- [`onlyWormholeRelayer()`](https://github.com/wormhole-foundation/wormhole-solidity-sdk/blob/main/src/WormholeRelayerSDK.sol#L26): Checking that msg.sender is the wormhole relayer contract
24+
- [`replayProtect(bytes32 deliveryHash)`](https://github.com/wormhole-foundation/wormhole-solidity-sdk/blob/main/src/WormholeRelayerSDK.sol#L31): Checking that the current delivery has not already been processed (via the hash)
2525
Sometimes, Cross-chain applications may be set up such that there is one ‘spoke’ contract on every chain, which sends messages to the ‘hub’ contract. If so, we’d ideally only want to allow messages to be sent from these spoke contracts. Included are helpers for this:
26-
27-
- `setRegisteredSender(uint16 sourceChain, bytes32 sourceAddress)`: Setting the specified sender for ‘sourceChain’ to be ‘sourceAddress’
28-
- `isRegisteredSender(uint16 sourceChain, bytes32 sourceAddress)` : Checking that the sender who requested the delivery is the registered address for that chain
29-
30-
Look at test/Counter.t.sol for an example usage of Base
31-
32-
- Included are also the ‘TokenSender’ and ‘TokenReceiver’ base classes with helpers for smart contracts that wish to send and receive tokens using Wormhole’s TokenBridge. See ‘HelloToken’ for example usage.
33-
- Included are helpers that help set up a local forge testing environment. See ‘HelloWormhole’ for example usage.
26+
- [`setRegisteredSender(uint16 sourceChain, bytes32 sourceAddress)`](https://github.com/wormhole-foundation/wormhole-solidity-sdk/blob/main/src/WormholeRelayerSDK.sol#L49): Setting the specified sender for ‘sourceChain’ to be ‘sourceAddress’
27+
- [`isRegisteredSender(uint16 sourceChain, bytes32 sourceAddress)`](https://github.com/wormhole-foundation/wormhole-solidity-sdk/blob/main/src/WormholeRelayerSDK.sol#L37): Checking that the sender who requested the delivery is the registered address for that chain
28+
Look at [test/Fork.t.sol](https://github.com/wormhole-foundation/wormhole-solidity-sdk/blob/main/test/Fork.t.sol#L16) for an example usage of Base
29+
- Included are also the ‘[TokenSender](https://github.com/wormhole-foundation/wormhole-solidity-sdk/blob/main/src/WormholeRelayerSDK.sol#L79)’ and ‘[TokenReceiver](https://github.com/wormhole-foundation/wormhole-solidity-sdk/blob/main/src/WormholeRelayerSDK.sol#L186)’ base classes with helpers for smart contracts that wish to send and receive tokens using Wormhole’s TokenBridge. See ‘[HelloToken](https://github.com/wormhole-foundation/hello-token)’ for example usage.
30+
- Included are helpers that help set up a local forge testing environment. See ‘[HelloWormhole](https://github.com/wormhole-foundation/hello-wormhole)’ for example usage.

0 commit comments

Comments
 (0)