diff --git a/CHANGELOG.md b/CHANGELOG.md index 42c91d80b6..69a269994e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements * Add upgrade handler for 1.18 [#1756](https://github.com/provenance-io/provenance/pull/1756). +* Updated documentation for each module to work with docusaurus [PR 1763](https://github.com/provenance-io/provenance/pull/1763) ### Dependencies diff --git a/README.md b/README.md index d993c4423d..48d6e68da9 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ For more information on the many TradFi institutions and Fintechs leveraging the ## Quick Start -As the [Provenance Blockchain][provenance] and its core modules are based on the [Cosmos SDK][cosmos], [this introduction](https://docs.cosmos.network/main/learn/intro/overview) into Cosmos is a useful starting point. +As the [Provenance Blockchain][provenance] and its core modules are based on the [Cosmos SDK][cosmos], [this introduction](https://docs.cosmos.network/v0.47/learn/intro/overview) into Cosmos is a useful starting point. Developers can use a local checkout and the make targets `make run` and `make localnet-start` to run a local development network. diff --git a/x/README.md b/x/README.md new file mode 100644 index 0000000000..af055f45b4 --- /dev/null +++ b/x/README.md @@ -0,0 +1,22 @@ +--- +sidebar_position: 0 +--- + +# List of Modules + +Modules are the code components of the Provenance Blockchain that execute the majority of the business logic for applications. The [Cosmos SDK](https://docs.cosmos.network/v0.47) enables developers to build modules that utilize the core structure of the SDK to allow the modules to function together. To read more about creating modules, refer to the [Cosmos documentation on modules](https://docs.cosmos.network/v0.47/building-modules/intro). + +Provenance uses inherited modules from the Cosmos SDK, and has also developed modules that are specific to Provenance. + +* [Inherited Cosmos modules](https://docs.cosmos.network/v0.47/build/modules) +* [Attribute](./attribute/README.md) - Functions as a blockchain registry for storing \ pairs. +* [Exchange](./exchange/README.md) - Facilitates the trading of on-chain assets. +* [Hold](./hold/README.md) - Keeps track of funds in an account that have a hold placed on them. +* [ibchooks](./ibchooks/README.md) - Forked from https://github.com/osmosis-labs/osmosis/tree/main/x/ibchooks +* [Marker](./marker/README.md) - Allows for the creation of fungible tokens. +* [Metadata](./metadata/README.md) - Provides a system for referencing off-chain information. +* [msgfees](./msgfees/README.md) - Manages additional fees that can be applied to tx msgs. +* [Name](./name/README.md) - Provides a system for providing human-readable names as aliases for addresses. +* [Oracle](./oracle/README.md) - Provides the capability to dynamically expose query endpoints. +* [Reward](./reward/README.md) - Provides a system for distributing rewards to accounts. +* [Trigger](./trigger/README.md) - Provides a system for triggering transactions based on predeterminded events. diff --git a/x/attribute/spec/03_events.md b/x/attribute/spec/03_events.md index 69532bbd73..ec85c57629 100644 --- a/x/attribute/spec/03_events.md +++ b/x/attribute/spec/03_events.md @@ -18,12 +18,12 @@ Fires when an attribute is successfully added. | Type | Attribute Key | Attribute Value | |-------------------|---------------|------------------------| -| EventAttributeAdd | Name | {name string} | -| EventAttributeAdd | Value | {attribute value} | -| EventAttributeAdd | Type | {attribute value type} | -| EventAttributeAdd | Account | {account address} | -| EventAttributeAdd | Owner | {owner address} | -| EventAttributeAdd | Expiration | {expiration date/time} | +| EventAttributeAdd | Name | \{name string\} | +| EventAttributeAdd | Value | \{attribute value\} | +| EventAttributeAdd | Type | \{attribute value type\} | +| EventAttributeAdd | Account | \{account address\} | +| EventAttributeAdd | Owner | \{owner address\} | +| EventAttributeAdd | Expiration | \{expiration date/time\} | `provenance.attribute.v1.EventAttributeAdd` @@ -34,13 +34,13 @@ Fires when an existing attribute is successfully updated. | Type | Attribute Key | Attribute Value | |----------------------|---------------|----------------------------| -| EventAttributeUpdate | Name | {name string} | -| EventAttributeUpdate | OriginalValue | {attribute value} | -| EventAttributeUpdate | OriginalType | {attribute value type} | -| EventAttributeUpdate | UpdateValue | {new attribute value} | -| EventAttributeUpdate | UpdateType | {new attribute value type} | -| EventAttributeUpdate | Account | {account address} | -| EventAttributeUpdate | Owner | {owner address} | +| EventAttributeUpdate | Name | \{name string\} | +| EventAttributeUpdate | OriginalValue | \{attribute value\} | +| EventAttributeUpdate | OriginalType | \{attribute value type\} | +| EventAttributeUpdate | UpdateValue | \{new attribute value\} | +| EventAttributeUpdate | UpdateType | \{new attribute value type\} | +| EventAttributeUpdate | Account | \{account address\} | +| EventAttributeUpdate | Owner | \{owner address\} | `provenance.attribute.v1.EventAttributeUpdate` @@ -51,12 +51,12 @@ Fires when an existing attribute's expiration is successfully updated. | Type | Attribute Key | Attribute Value | |--------------------------------|--------------------|----------------------------| -| EventAttributeExpirationUpdate | Name | {name string} | -| EventAttributeExpirationUpdate | Value | {attribute value} | -| EventAttributeExpirationUpdate | Account | {account address} | -| EventAttributeExpirationUpdate | Owner | {owner address} | -| EventAttributeExpirationUpdate | OriginalExpiration | {old expiration date/time} | -| EventAttributeExpirationUpdate | UpdatedExpiration | {new expiration date/time} | +| EventAttributeExpirationUpdate | Name | \{name string\} | +| EventAttributeExpirationUpdate | Value | \{attribute value\} | +| EventAttributeExpirationUpdate | Account | \{account address\} | +| EventAttributeExpirationUpdate | Owner | \{owner address\} | +| EventAttributeExpirationUpdate | OriginalExpiration | \{old expiration date/time\} | +| EventAttributeExpirationUpdate | UpdatedExpiration | \{new expiration date/time\} | --- @@ -66,9 +66,9 @@ Fires when an existing attribute is deleted. | Type | Attribute Key | Attribute Value | |----------------------|---------------|-------------------| -| EventAttributeDelete | Name | {name string} | -| EventAttributeDelete | Account | {account address} | -| EventAttributeDelete | Owner | {owner address} | +| EventAttributeDelete | Name | \{name string\} | +| EventAttributeDelete | Account | \{account address\} | +| EventAttributeDelete | Owner | \{owner address\} | `provenance.attribute.v1.EventAttributeDelete` @@ -79,11 +79,11 @@ Fires when an existing attribute is deleted distinctly. | Type | Attribute Key | Attribute Value | |------------------------------|---------------|------------------------| -| EventAttributeDistinctDelete | Name | {name string} | -| EventAttributeDistinctDelete | Value | {attribute value} | -| EventAttributeDistinctDelete | AttributeType | {attribute value type} | -| EventAttributeDistinctDelete | Owner | {owner address} | -| EventAttributeDistinctDelete | Account | {account address} | +| EventAttributeDistinctDelete | Name | \{name string\} | +| EventAttributeDistinctDelete | Value | \{attribute value\} | +| EventAttributeDistinctDelete | AttributeType | \{attribute value type\} | +| EventAttributeDistinctDelete | Owner | \{owner address\} | +| EventAttributeDistinctDelete | Account | \{account address\} | `provenance.attribute.v1.EventAttributeDistinctDelete` @@ -94,12 +94,12 @@ Fires when an attribute's expriration date/time has been reached and the attribu | Type | Attribute Key | Attribute Value | |-----------------------|---------------|------------------------| -| EventAttributeExpired | Name | {name string} | -| EventAttributeExpired | Value | {attribute value} | -| EventAttributeExpired | AttributeType | {attribute value type} | -| EventAttributeExpired | Account | {account address} | -| EventAttributeExpired | Owner | {owner address} | -| EventAttributeExpired | Expiration | {expiration date/time} | +| EventAttributeExpired | Name | \{name string\} | +| EventAttributeExpired | Value | \{attribute value\} | +| EventAttributeExpired | AttributeType | \{attribute value type\} | +| EventAttributeExpired | Account | \{account address\} | +| EventAttributeExpired | Owner | \{owner address\} | +| EventAttributeExpired | Expiration | \{expiration date/time\} | --- ## Account Data Updated @@ -108,4 +108,4 @@ Fires when account data is updated for an account. | Type | Attribute Key | Attribute Value | |-------------------------|---------------|------------------------| -| EventAccountDataUpdated | Account | {account address} | +| EventAccountDataUpdated | Account | \{account address\} | diff --git a/x/attribute/spec/README.md b/x/attribute/spec/README.md index 8399dc4d38..06051b9ad4 100644 --- a/x/attribute/spec/README.md +++ b/x/attribute/spec/README.md @@ -1,12 +1,12 @@ -# `Attribute` +# `x/attribute` ## Abstract -The purpose of the Attributes Module is to act as a registry that allows an Address to store pairs. +The purpose of the Attributes Module is to act as a registry that allows an Address to store `` pairs. Every Name must be registered by the Name Service, and a Name have multiple Values associated with it. Values are required to have a type, and they can be set or retrieved by Name. This feature provides the blockchain with the capability to store and retrieve values by Name. It plays a major -part in some of our components such as smart contract creation process. It allows an Address to create and store +part in some of our components such as smart contract creation process. It allows an Address to create and store a named smart contract on the blockchain. ## Contents diff --git a/x/exchange/spec/README.md b/x/exchange/spec/README.md index 74eb52792f..a51d8b0d34 100644 --- a/x/exchange/spec/README.md +++ b/x/exchange/spec/README.md @@ -1,4 +1,4 @@ -# `Exchange` +# `x/exchange` ## Overview diff --git a/x/hold/spec/README.md b/x/hold/spec/README.md index 65c503762c..4d157a23aa 100644 --- a/x/hold/spec/README.md +++ b/x/hold/spec/README.md @@ -1,4 +1,4 @@ -# `Hold` +# `x/hold` ## Overview diff --git a/x/ibchooks/README.md b/x/ibchooks/README.md index 879f5e9e48..b11976a1cf 100644 --- a/x/ibchooks/README.md +++ b/x/ibchooks/README.md @@ -1,4 +1,4 @@ -# ibchooks +# `x/ibchooks` ## Notice @@ -9,7 +9,7 @@ _Unfortunately the original version could not be directly used due to extensive ## Wasm Hooks The wasm hook is an IBC middleware which is used to allow ICS-20 token transfers to initiate contract calls. -This allows cross-chain contract calls, that involve token movement. +This allows cross-chain contract calls, that involve token movement. This is useful for a variety of usecases. One of primary importance is cross-chain swaps, which is an extremely powerful primitive. @@ -37,15 +37,15 @@ type MsgExecuteContract struct { So we detail where we want to get each of these fields from: -* Sender: We cannot trust the sender of an IBC packet, the counterparty chain has full ability to lie about it. +* Sender: We cannot trust the sender of an IBC packet, the counterparty chain has full ability to lie about it. We cannot risk this sender being confused for a particular user or module address on Osmosis. So we replace the sender with an account to represent the sender prefixed by the channel and a wasm module prefix. -This is done by setting the sender to `Bech32(Hash("ibc-wasm-hook-intermediary" || channelID || sender))`, where the channelId is the channel id on the local chain. +This is done by setting the sender to `Bech32(Hash("ibc-wasm-hook-intermediary" || channelID || sender))`, where the channelId is the channel id on the local chain. * Contract: This field should be directly obtained from the ICS-20 packet metadata * Msg: This field should be directly obtained from the ICS-20 packet metadata. * Funds: This field is set to the amount of funds being sent over in the ICS 20 packet. One detail is that the denom in the packet is the counterparty chains representation of the denom, so we have to translate it to Osmosis' representation. -> **_WARNING:_** Due to a [bug](https://twitter.com/SCVSecurity/status/1682329758020022272) in the packet forward middleware, we cannot trust the sender from chains that use PFM. Until that is fixed, we recommend chains to not trust the sender on contracts executed via IBC hooks. +> **_WARNING:_** Due to a [bug](https://twitter.com/SCVSecurity/status/1682329758020022272) in the packet forward middleware, we cannot trust the sender from chains that use PFM. Until that is fixed, we recommend chains to not trust the sender on contracts executed via IBC hooks. So our constructed cosmwasm message that we execute will look like: @@ -66,7 +66,7 @@ msg := MsgExecuteContract{ So given the details above, we propogate the implied ICS20 packet data structure. ICS20 is JSON native, so we use JSON for the memo format. -```json +```json { //... other ibc fields that we don't care about "data":{ @@ -126,20 +126,20 @@ In wasm hooks, post packet execution: ## Ack callbacks A contract that sends an IBC transfer, may need to listen for the ACK from that packet. To allow -contracts to listen on the ack of specific packets, we provide Ack callbacks. +contracts to listen on the ack of specific packets, we provide Ack callbacks. ### Design -The sender of an IBC transfer packet may specify a callback for when the ack of that packet is received in the memo -field of the transfer packet. +The sender of an IBC transfer packet may specify a callback for when the ack of that packet is received in the memo +field of the transfer packet. Crucially, _only_ the IBC packet sender can set the callback. ### Use case The crosschain swaps implementation sends an IBC transfer. If the transfer were to fail, we want to allow the sender -to be able to retrieve their funds (which would otherwise be stuck in the contract). To do this, we allow users to -retrieve the funds after the timeout has passed, but without the ack information, we cannot guarantee that the send +to be able to retrieve their funds (which would otherwise be stuck in the contract). To do this, we allow users to +retrieve the funds after the timeout has passed, but without the ack information, we cannot guarantee that the send hasn't failed (i.e.: returned an error ack notifying that the receiving change didn't accept it) ### Implementation @@ -194,30 +194,30 @@ IBC supports the ability to send an ack back to the sender of the packet asynchr cases where the packet is received, but the ack is not immediately known. For example, if the packet is being forwarded to another chain, the ack may not be known until the packet is received on the other chain. -Note this ACK does not imply full revertability. It is possible that unrevertable actions have occurred -even if there is an Ack Error. (This is distinct from the behavior of ICS-20 transfers). If you want to ensure +Note this ACK does not imply full revertability. It is possible that unrevertable actions have occurred +even if there is an Ack Error. (This is distinct from the behavior of ICS-20 transfers). If you want to ensure revertability, your contract should be implemented in a way that actions are not finalized until a success ack is received. #### Use case Async acks are useful in cases where the contract needs to wait for a response from another chain before -returning a result to the caller. +returning a result to the caller. For example, if you want to send tokens to another chain after the contract is executed you need to -add a new ibc packet and wait for its ack. +add a new ibc packet and wait for its ack. -In the synchronous acks case, the caller will receive an ack from the contract before the second packet -has been processed. This means that the caller will have to wait (and potentially track) if the second -packet has been processed successfully or not. +In the synchronous acks case, the caller will receive an ack from the contract before the second packet +has been processed. This means that the caller will have to wait (and potentially track) if the second +packet has been processed successfully or not. -With async acks, you contract can take this responsibility and only send an ack to the caller once the +With async acks, you contract can take this responsibility and only send an ack to the caller once the second packet has been processed #### Making contract Acks async To support this, we allow contracts to return an `IBCAsync` response from the function being executed when the -packet is received. That response specifies that the ack should be handled asynchronously. +packet is received. That response specifies that the ack should be handled asynchronously. Concretely the contract should return: @@ -229,17 +229,17 @@ pub struct OnRecvPacketAsyncResponse { ``` if `is_async_ack` is set to true, `OnRecvPacket` will return `nil` and the ack will not be written. Instead, the -contract wil be stored as the "ack actor" for the packet so that only that contract is allowed to send an ack +contract wil be stored as the "ack actor" for the packet so that only that contract is allowed to send an ack for it. -It is up to the contract developers to decide which conditions will trigger the ack to be sent. +It is up to the contract developers to decide which conditions will trigger the ack to be sent. #### Sending an async ack -To send the async ack, the contract needs to send the MsgEmitIBCAck message to the chain. This message will -then make a sudo call to the contract requesting the ack and write the ack to state. +To send the async ack, the contract needs to send the MsgEmitIBCAck message to the chain. This message will +then make a sudo call to the contract requesting the ack and write the ack to state. -That message can be specified in the contract as: +That message can be specified in the contract as: ```rust #[derive( @@ -304,7 +304,7 @@ pub enum IBCAck { Note: the sudo call is required to potentially allow anyone to send the MsgEmitIBCAck message. For now, however, this is artificially limited so that the message can only be send by the same contract. This could be expanded in -the future if needed. +the future if needed. # Testing strategy diff --git a/x/marker/spec/07_events.md b/x/marker/spec/07_events.md index c6cefd95f1..1e51eaf201 100644 --- a/x/marker/spec/07_events.md +++ b/x/marker/spec/07_events.md @@ -25,12 +25,12 @@ Fires when a marker is added using the Add Marker Msg. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| EventMarkerAdd | Denom | {denom string} | -| EventMarkerAdd | Address | {marker address} | -| EventMarkerAdd | Amount | {supply amount} | -| EventMarkerAdd | Manager | {admin account address} | -| EventMarkerAdd | Status | {current marker status} | -| EventMarkerAdd | MarkerType | {type of marker} | +| EventMarkerAdd | Denom | \{denom string\} | +| EventMarkerAdd | Address | \{marker address\} | +| EventMarkerAdd | Amount | \{supply amount\} | +| EventMarkerAdd | Manager | \{admin account address\} | +| EventMarkerAdd | Status | \{current marker status\} | +| EventMarkerAdd | MarkerType | \{type of marker\} | `provenance.marker.v1.EventMarkerAdd` @@ -41,9 +41,9 @@ Fires when administrative access is granted for a marker | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| EventMarkerAddAccess | Denom | {denom string} | -| EventMarkerAddAccess | Administrator | {admin account address} | -| EventMarkerAddAccess | Access | {access grant format} | +| EventMarkerAddAccess | Denom | \{denom string\} | +| EventMarkerAddAccess | Administrator | \{admin account address\} | +| EventMarkerAddAccess | Access | \{access grant format\} | `provenance.marker.v1.EventMarkerAddAccess` @@ -51,8 +51,8 @@ Fires when administrative access is granted for a marker | Attribute Key | Attribute Value | | --------------------- | ------------------------ | -| Address | {bech32 address string} | -| Permissions | {array of role names} | +| Address | \{bech32 address string\} | +| Permissions | \{array of role names\} | `provenance.marker.v1.EventMarkerAccess` @@ -63,9 +63,9 @@ Fires when all access grants are removed for a given address. | Type | Attribute Key | Attribute Value | | ------------------------ | --------------------- | ------------------------- | -| EventMarkerDeleteAccess | Denom | {denom string} | -| EventMarkerDeleteAccess | Administrator | {admin account address} | -| EventMarkerDeleteAccess | RemoveAddress | {address removed} | +| EventMarkerDeleteAccess | Denom | \{denom string\} | +| EventMarkerDeleteAccess | Administrator | \{admin account address\} | +| EventMarkerDeleteAccess | RemoveAddress | \{address removed\} | `provenance.marker.v1.EventMarkerDeleteAccess` @@ -76,8 +76,8 @@ Fires when a marker is finalized. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| EventMarkerFinalize | Denom | {denom string} | -| EventMarkerFinalize | Administrator | {admin account address} | +| EventMarkerFinalize | Denom | \{denom string\} | +| EventMarkerFinalize | Administrator | \{admin account address\} | `provenance.marker.v1.EventMarkerFinalize` @@ -88,8 +88,8 @@ Fires when a marker is activated. | Type | Attribute Key | Attribute Value | | ------------------------- | --------------------- | ------------------------- | -| EventMarkerActivate | Denom | {denom string} | -| EventMarkerActivate | Administrator | {admin account address} | +| EventMarkerActivate | Denom | \{denom string\} | +| EventMarkerActivate | Administrator | \{admin account address\} | `provenance.marker.v1.EventMarkerActivate` @@ -100,8 +100,8 @@ Fired when a marker is cancelled successfully. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| EventMarkerCancel | Denom | {denom string} | -| EventMarkerCancel | Administrator | {admin account address} | +| EventMarkerCancel | Denom | \{denom string\} | +| EventMarkerCancel | Administrator | \{admin account address\} | `provenance.marker.v1.EventMarkerCancel` @@ -112,8 +112,8 @@ Fires when a marker is marked as destroyed and ready for removal. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| EventMarkerDelete | Denom | {denom string} | -| EventMarkerDelete | Administrator | {admin account address} | +| EventMarkerDelete | Denom | \{denom string\} | +| EventMarkerDelete | Administrator | \{admin account address\} | `provenance.marker.v1.EventMarkerDelete` @@ -124,9 +124,9 @@ Fires when coins are minted for a marker. | Type | Attribute Key | Attribute Value | | ------------------ | --------------------- | ------------------------- | -| EventMarkerMint | Denom | {denom string} | -| EventMarkerMint | Amount | {supply amount} | -| EventMarkerMint | Administrator | {admin account address} | +| EventMarkerMint | Denom | \{denom string\} | +| EventMarkerMint | Amount | \{supply amount\} | +| EventMarkerMint | Administrator | \{admin account address\} | `provenance.marker.v1.EventMarkerMint` @@ -137,9 +137,9 @@ Fires when coins are burned from a marker account. | Type | Attribute Key | Attribute Value | | ------------------ | --------------------- | ------------------------- | -| EventMarkerBurn | Denom | {denom string} | -| EventMarkerBurn | Amount | {supply amount} | -| EventMarkerBurn | Administrator | {admin account address} | +| EventMarkerBurn | Denom | \{denom string\} | +| EventMarkerBurn | Amount | \{supply amount\} | +| EventMarkerBurn | Administrator | \{admin account address\} | `provenance.marker.v1.EventMarkerBurn` @@ -150,10 +150,10 @@ Fires when coin is removed from a marker account and transferred to another. | Type | Attribute Key | Attribute Value | | -------------------- | --------------------- | --------------------------- | -| EventMarkerWithdraw | Denom | {denom string} | -| EventMarkerWithdraw | Amount | {supply amount} | -| EventMarkerWithdraw | Administrator | {admin account address} | -| EventMarkerWithdraw | ToAddress | {recipient account address} | +| EventMarkerWithdraw | Denom | \{denom string\} | +| EventMarkerWithdraw | Amount | \{supply amount\} | +| EventMarkerWithdraw | Administrator | \{admin account address\} | +| EventMarkerWithdraw | ToAddress | \{recipient account address\} | `provenance.marker.v1.EventMarkerWithdraw` @@ -164,11 +164,11 @@ Fires when a facilitated transfer is performed of the marker's coin between acco | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | --------------------------- | -| EventMarkerTransfer | Denom | {denom string} | -| EventMarkerTransfer | Amount | {supply amount} | -| EventMarkerTransfer | Administrator | {admin account address} | -| EventMarkerTransfer | FromAddress | {source account address} | -| EventMarkerTransfer | ToAddress | {recipient account address} | +| EventMarkerTransfer | Denom | \{denom string\} | +| EventMarkerTransfer | Amount | \{supply amount\} | +| EventMarkerTransfer | Administrator | \{admin account address\} | +| EventMarkerTransfer | FromAddress | \{source account address\} | +| EventMarkerTransfer | ToAddress | \{recipient account address\} | `provenance.marker.v1.EventMarkerTransfer` @@ -178,13 +178,13 @@ Fires when the denom metadata is set for a marker | Type | Attribute Key | Attribute Value | | ----------------------------- | --------------------- | --------------------------- | -| EventMarkerSetDenomMetadata | MetadataBase | {marker's denom string} | -| EventMarkerSetDenomMetadata | MetadataDescription | {description string} | -| EventMarkerSetDenomMetadata | MetadataDisplay | {denom string} | -| EventMarkerSetDenomMetadata | MetadataName | {name string} | -| EventMarkerSetDenomMetadata | MetadataSymbol | {symbol string} | -| EventMarkerSetDenomMetadata | MetadataDenomUnits | {array of denom units} | -| EventMarkerSetDenomMetadata | Administrator | {admin account address} | +| EventMarkerSetDenomMetadata | MetadataBase | \{marker's denom string\} | +| EventMarkerSetDenomMetadata | MetadataDescription | \{description string\} | +| EventMarkerSetDenomMetadata | MetadataDisplay | \{denom string\} | +| EventMarkerSetDenomMetadata | MetadataName | \{name string\} | +| EventMarkerSetDenomMetadata | MetadataSymbol | \{symbol string\} | +| EventMarkerSetDenomMetadata | MetadataDenomUnits | \{array of denom units\} | +| EventMarkerSetDenomMetadata | Administrator | \{admin account address\} | `provenance.marker.v1.EventMarkerSetDenomMetadata` @@ -195,22 +195,22 @@ aliases for `uhash` might be `microhash` or `µhash` | Attribute Key | Attribute Value | | --------------------- | ------------------------ | -| Denom | {denom string} | -| Exponent | {uint} | -| Aliases | {array of denom strings} | +| Denom | \{denom string\} | +| Exponent | \{uint\} | +| Aliases | \{array of denom strings\} | `provenance.marker.v1.EventDenomUnit` ### Set Net Asset Value -Fires when a new NetAssetValue is add or updated for a marker. +Fires when a new NetAssetValue is add or updated for a marker. | Type | Attribute Key | Attribute Value | | ------------------------| --------------------- | ------------------------------------------------- | -| EventSetNetAssetValue | Denom | {marker's denom string} | -| EventSetNetAssetValue | Price | {token amount the marker is valued at for volume} | -| EventSetNetAssetValue | Volume | {total volume/shares associated with price} | -| EventSetNetAssetValue | Source | {source address of caller} | +| EventSetNetAssetValue | Denom | \{marker's denom string\} | +| EventSetNetAssetValue | Price | \{token amount the marker is valued at for volume\} | +| EventSetNetAssetValue | Volume | \{total volume/shares associated with price\} | +| EventSetNetAssetValue | Source | \{source address of caller\} | `provenance.marker.v1.EventSetNetAssetValue` diff --git a/x/marker/spec/README.md b/x/marker/spec/README.md index 899d791e7f..d723d39719 100644 --- a/x/marker/spec/README.md +++ b/x/marker/spec/README.md @@ -1,4 +1,4 @@ -# `Marker` +# `x/marker` ## Abstract diff --git a/x/metadata/spec/04_authz.md b/x/metadata/spec/04_authz.md index 00c5a1c669..21eb983ff8 100644 --- a/x/metadata/spec/04_authz.md +++ b/x/metadata/spec/04_authz.md @@ -46,17 +46,17 @@ $ provenanced tx authz revoke --from ``` -See [GenericAuthorization](https://docs.cosmos.network/master/architecture/adr-030-authz-module.html#genericauthorization) specification for more details. +See [GenericAuthorization](https://docs.cosmos.network/v0.47/build/modules/authz#genericauthorization) specification for more details. ## Special allowances -Some messages in the `metadata` module have hierarchies. A grant on a parent message type will also work for any of -its message subtypes, but not the other way around. Therefore, authorizations on these messages are `one way`. +Some messages in the `metadata` module have hierarchies. A grant on a parent message type will also work for any of +its message subtypes, but not the other way around. Therefore, authorizations on these messages are `one way`. - An authorization on `MsgWriteScopeRequest` works for any of the listed message subtypes: - `MsgAddScopeDataAccessRequest` - `MsgAddScopeDataAccessRequest` - - `MsgDeleteScopeDataAccessRequest` + - `MsgDeleteScopeDataAccessRequest` - `MsgAddScopeOwnerRequest` - `MsgDeleteScopeOwnerRequest` @@ -72,8 +72,8 @@ its message subtypes, but not the other way around. Therefore, authorizations on - An authorization on `MsgDeleteContractSpecificationRequest` works for any of the listed message subtypes: - `MsgDeleteRecordSpecificationRequest` - -Notes: -An authorization on a `Write` endpoint for an entry/spec will NOT work for its `Delete` endpoint. +Notes: + +An authorization on a `Write` endpoint for an entry/spec will NOT work for its `Delete` endpoint. diff --git a/x/metadata/spec/README.md b/x/metadata/spec/README.md index 9d8cc60be9..4b13b9ea9a 100644 --- a/x/metadata/spec/README.md +++ b/x/metadata/spec/README.md @@ -1,4 +1,4 @@ -# `metadata` +# `x/metadata` ## Overview diff --git a/x/msgfees/spec/README.md b/x/msgfees/spec/README.md index aeb6e97adc..24a813f21e 100644 --- a/x/msgfees/spec/README.md +++ b/x/msgfees/spec/README.md @@ -1,11 +1,9 @@ -# `msgfees` +# `x/msgfees` ## Overview The msg fees modules manages additional fees that can be applied to tx msgs specified through governance. - - ## Contents 1. **[Concepts](01_concepts.md)** diff --git a/x/name/spec/04_events.md b/x/name/spec/04_events.md index 651f98ded8..7860e0f52b 100644 --- a/x/name/spec/04_events.md +++ b/x/name/spec/04_events.md @@ -15,33 +15,33 @@ The name module emits the following events: | Type | Attribute Key | Attribute Value | | --------------------- | --------------------- | ------------------------- | -| name_bound | name | {NameRecord|Name} | -| name_bound | address | {NameRecord|Address} | -| name_bound | restricted | {NameRecord|Restricted} | +| name_bound | name | \{NameRecord|Name\} | +| name_bound | address | \{NameRecord|Address\} | +| name_bound | restricted | \{NameRecord|Restricted\} | ### MsgDeleteNameRequest | Type | Attribute Key | Attribute Value | | --------------------- | --------------------- | ------------------------- | -| name_unbound | name | {NameRecord|Name} | -| name_unbound | address | {NameRecord|Address} | -| name_unbound | restricted | {NameRecord|Restricted} | +| name_unbound | name | \{NameRecord|Name\} | +| name_unbound | address | \{NameRecord|Address\} | +| name_unbound | restricted | \{NameRecord|Restricted\} | ### MsgModifyNameRequest | Type | Attribute Key | Attribute Value | | --------------------- | --------------------- | ------------------------- | -| name_modify | authority | {String} | -| name_modify | name | {NameRecord|Name} | -| name_modify | address | {NameRecord|Address} | -| name_modify | restricted | {NameRecord|Restricted} | +| name_modify | authority | \{String\} | +| name_modify | name | \{NameRecord|Name\} | +| name_modify | address | \{NameRecord|Address\} | +| name_modify | restricted | \{NameRecord|Restricted\} | ### CreateRootNameProposal | Type | Attribute Key | Attribute Value | | --------------------- | --------------------- | ------------------------- | -| name_bound | name | {NameRecord|Name} | -| name_bound | address | {NameRecord|Address} | -| name_bound | restricted | {NameRecord|Restricted} | +| name_bound | name | \{NameRecord|Name\} | +| name_bound | address | \{NameRecord|Address\} | +| name_bound | restricted | \{NameRecord|Restricted\} | diff --git a/x/name/spec/README.md b/x/name/spec/README.md index c1ebd3fdbf..467dfa5e04 100644 --- a/x/name/spec/README.md +++ b/x/name/spec/README.md @@ -1,4 +1,4 @@ -# `name` +# `x/name` ## Overview diff --git a/x/oracle/spec/README.md b/x/oracle/spec/README.md index df3b1b1f54..f0b2672832 100644 --- a/x/oracle/spec/README.md +++ b/x/oracle/spec/README.md @@ -1,14 +1,17 @@ -# `oracle` +# `x/oracle` ## Overview + The oracle module provides the Provenance Blockchain with the capability to dynamically expose query endpoints through Interchain Queries (ICQ) One challenge that the Provenance Blockchain faces is supporting each Provenance Blockchain Zone with a unique set of queries. It is not feasible to create an evolving set of queries for each chain. Furthermore, it is not desirable for other parties to request Provenance to build these endpoints for them and then upgrade. This module resolves these issues by enabling Provenance Blockchain zones to manage their own oracle. ## Acknowledgements + We appreciate the substantial contributions made by Strangelove Ventures and Quasar Finance through their work on the [Async ICQ Module](https://github.com/cosmos/ibc-apps/tree/main/modules/async-icq) and [Interchain Query Demo](https://github.com/quasar-finance/interchain-query-demo). These resources were of paramount importance in informing the development of our oracle module. ## Contents + 1. **[Concepts](01_concepts.md)** 2. **[State](02_state.md)** 3. **[Messages](03_messages.md)** diff --git a/x/reward/spec/03_state_transitions.md b/x/reward/spec/03_state_transitions.md index e0daeb9532..08b57d4993 100644 --- a/x/reward/spec/03_state_transitions.md +++ b/x/reward/spec/03_state_transitions.md @@ -5,7 +5,7 @@ order: 3 # State Transitions This document describes the state transition operations involved in the rewards module. - + - [Reward Programs](#reward-programs) - [Pending ](#pending) @@ -28,26 +28,26 @@ A Reward Program can be `Pending`, `Started`, `Finished`, or `Expired`. A Reward #### Note A Reward Program creator may end a Reward Program early while it's in `Pending` or `Started` state. A Reward Program in the `Pending` state will be deleted and not progress through all the states. Any program that is ended after it's in the `Started` state will transition to the `Finished` state on the next `BeginBlock`. -### Pending -Reward program has *not* started. +### Pending +Reward program has *not* started. #### Note A user may force a Reward Program in this state to end with the `end-reward-program` transaction. In this case the Reward Program will be deleted and not progress. -### Started +### Started The Reward Program has started, and users can participate by performing qualifying actions. Participants can claim their rewards at the end of the claim period that the qualifying action was performed in. #### Note A user may force a Reward Program in this state to end with the `end-reward-program` transaction. The Reward Program will transition to the `Finished` state on the next `BeginBlock`. -### Finished +### Finished The Reward Program has ended, and participants can no longer make qualifying actions. Participants have a limited amount of time to collect their remaining rewards. ### Expired Reward program has passed its expiration date, and participants can no longer claim rewards. The remaining balance and any unclaimed rewards will be returned to the creator.

- +

## Reward Claims @@ -68,5 +68,5 @@ The reward has been granted and received by the participant. A reward cannot be The reward has been cleaned up and the participant can no longer claim it. The funds attached to the reward claim are refunded back to the program creator.

- +

diff --git a/x/reward/spec/06_events.md b/x/reward/spec/06_events.md index a1f01e934c..3190cb00b0 100644 --- a/x/reward/spec/06_events.md +++ b/x/reward/spec/06_events.md @@ -23,7 +23,7 @@ Fires when a reward program is created with the Create Reward Program Msg. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| RewardProgramCreated | reward_program_created| {ID string} | +| RewardProgramCreated | reward_program_created| \{ID string\} | --- ## Reward Program Started @@ -32,7 +32,7 @@ Fires when a reward program transitions to the STARTED state. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| RewardProgramStarted | reward_program_id | {ID string} | +| RewardProgramStarted | reward_program_id | \{ID string\} | --- ## Reward Program Finished @@ -41,7 +41,7 @@ Fires when a reward program transitions to the FINISHED state. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| RewardProgramFinished | reward_program_id | {ID string} | +| RewardProgramFinished | reward_program_id | \{ID string\} | --- ## Reward Program Expired @@ -50,7 +50,7 @@ Fires when a reward program transitions to the EXPIRED state. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| RewardProgramExpired | reward_program_id | {ID string} | +| RewardProgramExpired | reward_program_id | \{ID string\} | --- ## Reward Program Ended @@ -59,7 +59,7 @@ Fires when a reward program is ended with the End Reward Program Msg. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| RewardProgramEnded | reward_program_id | {ID string} | +| RewardProgramEnded | reward_program_id | \{ID string\} | --- ## Claim Rewards @@ -68,8 +68,8 @@ Fires when a participant claims a reward claim with Claim Reward Msg. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| ClaimRewards | reward_program_id | {ID string} | -| ClaimRewards | rewards_claim_address | {bech32address string} | +| ClaimRewards | reward_program_id | \{ID string\} | +| ClaimRewards | rewards_claim_address | \{bech32address string\} | This event will not fire if the user has no claims or if they have already claimed all their rewards. @@ -80,7 +80,7 @@ Fires when a participant claims all their reward claims with Claim Reward Msg. | Type | Attribute Key | Attribute Value | | ---------------------- | --------------------- | ------------------------- | -| ClaimAllRewards | rewards_claim_address | {bech32address string} | +| ClaimAllRewards | rewards_claim_address | \{bech32address string\} | This event will not fire if the user has no claims or if they have already claimed all their rewards. diff --git a/x/reward/spec/README.md b/x/reward/spec/README.md index f36d15b070..9a69632a36 100644 --- a/x/reward/spec/README.md +++ b/x/reward/spec/README.md @@ -1,4 +1,4 @@ -# `rewards` +# `x/rewards` ## Overview diff --git a/x/trigger/spec/README.md b/x/trigger/spec/README.md index 6e06a2ef2c..d27e075fa5 100644 --- a/x/trigger/spec/README.md +++ b/x/trigger/spec/README.md @@ -1,4 +1,4 @@ -# `trigger` +# `x/trigger` ## Overview