d19fc98091
Add the payload as an explicit field to the `TransferWithPayload` enum variant. This is a generic parameter that defaults to `Box<RawMessage>` for maximum flexibility (and to avoid leaking lifetimes higher up the stack) but users are encouraged to replace this default type parameter with an explicit `&RawMessage` in places where the serde_wormhole data format is used. The main benefit of this change is that the payload is now included as part of the actual message and no longer requires callers to awkwardly append it after serialization. This is especially useful in human- readable formats like JSON (see the `transfer_with_payload` test in token.rs for an example of this simplification). The main downside is that this now requires explicit type annotations when using the non-payload3 variants so that the compiler will pick up the default generic parameter. This is a relatively minor inconvenience and the benefit appears to be worth the cost. There should be no functional change. |
||
---|---|---|
.github | ||
.run | ||
algorand | ||
aptos | ||
bitcoin | ||
clients | ||
cosmwasm | ||
dashboards | ||
devnet | ||
docs | ||
ethereum | ||
lp_ui | ||
near | ||
node | ||
proto | ||
relayer/spy_relayer | ||
scripts | ||
sdk | ||
solana | ||
spydk/js | ||
sui | ||
terra | ||
testing | ||
third_party | ||
tilt_modules | ||
tools | ||
whitepapers | ||
wormchain | ||
.dockerignore | ||
.gitignore | ||
.golangci.yml | ||
.spr.yml | ||
CONTRIBUTING.md | ||
DEVELOP.md | ||
Dockerfile.const | ||
Dockerfile.proto | ||
LICENSE | ||
Makefile | ||
Makefile.help | ||
README.md | ||
SECURITY.md | ||
Tiltfile | ||
buf.gen.web.yaml | ||
buf.gen.yaml | ||
buf.lock | ||
buf.yaml | ||
generate-abi-celo.sh | ||
generate-abi.sh |
README.md
This monorepo contains the reference implementation of the Wormhole protocol.
To learn about how to use and build on Wormhole read the Docs or take a look at the xApp Book.
See Live Contracts for current testnet and mainnet deployments of the Wormhole smart contracts.
See DEVELOP.md for instructions on how to set up a local devnet, CONTRIBUTING.md for instructions on how to contribute to this project, and SECURITY.md for more information about our security audits and bug bounty program.
See docs/operations.md for node operator instructions.
⚠ This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Or plainly spoken - this is a very complex piece of software which targets a bleeding-edge, experimental smart contract runtime. Mistakes happen, and no matter how hard you try and whether you pay someone to audit it, it may eat your tokens, set your printer on fire or startle your cat. Cryptocurrencies are a high-risk investment, no matter how fancy.