Skip to content

Commit

Permalink
Update token and liquidity pool examples (#1151)
Browse files Browse the repository at this point in the history
* Update token example

* Update liquidity pool contract

* fix refs

* fix event section
  • Loading branch information
sisuresh authored Dec 20, 2024
1 parent f66c24c commit 7b13637
Show file tree
Hide file tree
Showing 4 changed files with 346 additions and 376 deletions.
2 changes: 1 addition & 1 deletion docs/build/guides/conventions/upgrading-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub fn upgrade(e: Env, new_wasm_hash: BytesN<32>) {

4. The `update_current_contract_wasm` host function will also emit a `SYSTEM` contract [event] that contains the old and new wasm reference, allowing downstream users to be notified when a contract they use is updated. The event structure will have `topics = ["executable_update", old_executable: ContractExecutable, old_executable: ContractExecutable]` and `data = []`.

[here]: https://docs.rs/soroban-sdk/20.0.2/soroban_sdk/struct.Env.html#method.update_current_contract_wasm
[here]: https://docs.rs/soroban-sdk/22.0.4/soroban_sdk/struct.Env.html#method.update_current_contract_wasm
[event]: ../../../learn/encyclopedia/contract-development/events.mdx#event-types

## Tests
Expand Down
4 changes: 2 additions & 2 deletions docs/build/guides/conventions/wasm-metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ contractmeta!(
pub trait LiquidityPoolTrait {...
```

[`contractmeta!`]: https://docs.rs/soroban-sdk/20.0.2/soroban_sdk/macro.contractmeta.html
[liquidity pool example]: https://github.com/stellar/soroban-examples/blob/v21.6.0/liquidity_pool/src/lib.rs#L152-L155
[`contractmeta!`]: https://docs.rs/soroban-sdk/22.0.4/soroban_sdk/macro.contractmeta.html
[liquidity pool example]: https://github.com/stellar/soroban-examples/blob/v22.0.1/liquidity_pool/src/lib.rs#L152-L155
Loading

0 comments on commit 7b13637

Please sign in to comment.