Skip to content

Commit

Permalink
revert non-cadence doc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dsainati1 committed Jun 23, 2023
1 parent 6920d01 commit 57ef4df
Show file tree
Hide file tree
Showing 48 changed files with 426 additions and 426 deletions.
14 changes: 7 additions & 7 deletions docs/concepts/core-contracts/03-flow-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Event that is emitted when the contract gets created.
- Testnet event: `A.7e60df042a9c0868.FlowToken.TokensInitialized`

```cadence
access(all) event TokensInitialized(initialSupply: UFix64)
pub event TokensInitialized(initialSupply: UFix64)
```

| Field | Type | Description |
Expand All @@ -72,7 +72,7 @@ Event that is emitted when tokens get withdrawn from a Vault.
- Testnet event: `A.7e60df042a9c0868.FlowToken.TokensWithdrawn`

```cadence
access(all) event TokensWithdrawn(amount: UFix64, from: Address?)
pub event TokensWithdrawn(amount: UFix64, from: Address?)
```

| Field | Type | Description |
Expand All @@ -90,7 +90,7 @@ Event that is emitted when tokens get deposited to a Vault.
- Testnet event: `A.7e60df042a9c0868.FlowToken.TokensDeposited`

```cadence
access(all) event TokensDeposited(amount: UFix64, to: Address?)
pub event TokensDeposited(amount: UFix64, to: Address?)
```

| Field | Type | Description |
Expand All @@ -107,7 +107,7 @@ Event that is emitted when new tokens gets minted.
- Testnet event: `A.7e60df042a9c0868.FlowToken.TokensMinted`

```cadence
access(all) event TokensMinted(amount: UFix64)
pub event TokensMinted(amount: UFix64)
```

| Field | Type | Description |
Expand All @@ -123,7 +123,7 @@ Event that is emitted when tokens get destroyed.
- Testnet event: `A.7e60df042a9c0868.FlowToken.TokensBurned`

```cadence
access(all) event TokensBurned(amount: UFix64)
pub event TokensBurned(amount: UFix64)
```

| Field | Type | Description |
Expand All @@ -140,7 +140,7 @@ Event that is emitted when a new minter resource gets created.
- Testnet event: `A.7e60df042a9c0868.FlowToken.MinterCreated`

```cadence
access(all) event MinterCreated(allowedAmount: UFix64)
pub event MinterCreated(allowedAmount: UFix64)
```

| Field | Type | Description |
Expand All @@ -156,7 +156,7 @@ Event that is emitted when a new burner Resource gets created.
- Testnet event: `A.7e60df042a9c0868.FlowToken.BurnerCreated`

```cadence
access(all) event BurnerCreated()
pub event BurnerCreated()
```

### Staking Events
Expand Down
42 changes: 21 additions & 21 deletions docs/concepts/core-contracts/06-staking-contract-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,31 @@ The `FlowIDTableStaking` contract emits an event whenever an important action oc
See the [staking events Documentation](../staking/07-staking-scripts-events.md) for more information about each event.

```cadence
access(all) event NewEpoch(totalStaked: UFix64, totalRewardPayout: UFix64)
pub event NewEpoch(totalStaked: UFix64, totalRewardPayout: UFix64)
/// Node Events
access(all) event NewNodeCreated(nodeID: String, role: UInt8, amountCommitted: UFix64)
access(all) event TokensCommitted(nodeID: String, amount: UFix64)
access(all) event TokensStaked(nodeID: String, amount: UFix64)
access(all) event TokensUnstaking(nodeID: String, amount: UFix64)
access(all) event TokensUnstaked(nodeID: String, amount: UFix64)
access(all) event NodeRemovedAndRefunded(nodeID: String, amount: UFix64)
access(all) event RewardsPaid(nodeID: String, amount: UFix64)
access(all) event UnstakedTokensWithdrawn(nodeID: String, amount: UFix64)
access(all) event RewardTokensWithdrawn(nodeID: String, amount: UFix64)
pub event NewNodeCreated(nodeID: String, role: UInt8, amountCommitted: UFix64)
pub event TokensCommitted(nodeID: String, amount: UFix64)
pub event TokensStaked(nodeID: String, amount: UFix64)
pub event TokensUnstaking(nodeID: String, amount: UFix64)
pub event TokensUnstaked(nodeID: String, amount: UFix64)
pub event NodeRemovedAndRefunded(nodeID: String, amount: UFix64)
pub event RewardsPaid(nodeID: String, amount: UFix64)
pub event UnstakedTokensWithdrawn(nodeID: String, amount: UFix64)
pub event RewardTokensWithdrawn(nodeID: String, amount: UFix64)
/// Delegator Events
access(all) event NewDelegatorCreated(nodeID: String, delegatorID: UInt32)
access(all) event DelegatorTokensCommitted(nodeID: String, delegatorID: UInt32, amount: UFix64)
access(all) event DelegatorTokensStaked(nodeID: String, delegatorID: UInt32, amount: UFix64)
access(all) event DelegatorTokensUnstaking(nodeID: String, delegatorID: UInt32, amount: UFix64)
access(all) event DelegatorTokensUnstaked(nodeID: String, delegatorID: UInt32, amount: UFix64)
access(all) event DelegatorRewardsPaid(nodeID: String, delegatorID: UInt32, amount: UFix64)
access(all) event DelegatorUnstakedTokensWithdrawn(nodeID: String, delegatorID: UInt32, amount: UFix64)
access(all) event DelegatorRewardTokensWithdrawn(nodeID: String, delegatorID: UInt32, amount: UFix64)
pub event NewDelegatorCreated(nodeID: String, delegatorID: UInt32)
pub event DelegatorTokensCommitted(nodeID: String, delegatorID: UInt32, amount: UFix64)
pub event DelegatorTokensStaked(nodeID: String, delegatorID: UInt32, amount: UFix64)
pub event DelegatorTokensUnstaking(nodeID: String, delegatorID: UInt32, amount: UFix64)
pub event DelegatorTokensUnstaked(nodeID: String, delegatorID: UInt32, amount: UFix64)
pub event DelegatorRewardsPaid(nodeID: String, delegatorID: UInt32, amount: UFix64)
pub event DelegatorUnstakedTokensWithdrawn(nodeID: String, delegatorID: UInt32, amount: UFix64)
pub event DelegatorRewardTokensWithdrawn(nodeID: String, delegatorID: UInt32, amount: UFix64)
/// Contract Field Change Events
access(all) event NewDelegatorCutPercentage(newCutPercentage: UFix64)
access(all) event NewWeeklyPayout(newPayout: UFix64)
access(all) event NewStakingMinimums(newMinimums: {UInt8: UFix64})
pub event NewDelegatorCutPercentage(newCutPercentage: UFix64)
pub event NewWeeklyPayout(newPayout: UFix64)
pub event NewStakingMinimums(newMinimums: {UInt8: UFix64})
```
32 changes: 16 additions & 16 deletions docs/concepts/core-contracts/10-nft-storefront.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ For NFT listings in marketplaces which don't require commission, commission rece

```cadence
resource interface ListingPublic {
access(all) fun borrowNFT(): &NonFungibleToken.NFT?
access(all) fun purchase(
pub fun borrowNFT(): &NonFungibleToken.NFT?
pub fun purchase(
payment: @FungibleToken.Vault,
commissionRecipient: Capability<&{FungibleToken.Receiver}>?,
): @NonFungibleToken.NFT
access(all) fun getDetails(): ListingDetail
access(all) fun getAllowedCommissionReceivers(): [Capability<&{FungibleToken.Receiver}>]?
pub fun getDetails(): ListingDetail
pub fun getAllowedCommissionReceivers(): [Capability<&{FungibleToken.Receiver}>]?
}
```
An interface providing a useful public interface to a Listing.
Expand Down Expand Up @@ -199,7 +199,7 @@ If it returns `nil` then commission is up to grab by anyone.

```cadence
resource Storefront {
access(all) fun createListing(
pub fun createListing(
nftProviderCapability: Capability<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>,
nftType: Type,
nftID: UInt64,
Expand All @@ -210,11 +210,11 @@ resource Storefront {
commissionAmount: UFix64,
expiry: UInt64
): UInt64
access(all) fun removeListing(listingResourceID: UInt64)
access(all) fun getListingIDs(): [UInt64]
access(all) fun getDuplicateListingIDs(nftType: Type, nftID: UInt64, listingID: UInt64): [UInt64]
access(all) fun cleanupExpiredListings(fromIndex: UInt64, toIndex: UInt64)
access(all) fun borrowListing(listingResourceID: UInt64): &Listing{ListingPublic}?
pub fun removeListing(listingResourceID: UInt64)
pub fun getListingIDs(): [UInt64]
pub fun getDuplicateListingIDs(nftType: Type, nftID: UInt64, listingID: UInt64): [UInt64]
pub fun cleanupExpiredListings(fromIndex: UInt64, toIndex: UInt64)
pub fun borrowListing(listingResourceID: UInt64): &Listing{ListingPublic}?
}
```
A resource that allows its owner to manage a list of Listings, and anyone to interact with them
Expand Down Expand Up @@ -297,12 +297,12 @@ Returns a read-only view of the listing for the given listingID if it is contain

```cadence
resource interface StorefrontPublic {
access(all) fun getListingIDs(): [UInt64]
access(all) fun getDuplicateListingIDs(nftType: Type, nftID: UInt64, listingID: UInt64): [UInt64]
access(all) fun cleanupExpiredListings(fromIndex: UInt64, toIndex: UInt64)
access(all) fun borrowListing(listingResourceID: UInt64): &Listing{ListingPublic}?
access(all) fun cleanupPurchasedListings(listingResourceID: UInt64)
access(all) fun getExistingListingIDs(nftType: Type, nftID: UInt64): [UInt64]
pub fun getListingIDs(): [UInt64]
pub fun getDuplicateListingIDs(nftType: Type, nftID: UInt64, listingID: UInt64): [UInt64]
pub fun cleanupExpiredListings(fromIndex: UInt64, toIndex: UInt64)
pub fun borrowListing(listingResourceID: UInt64): &Listing{ListingPublic}?
pub fun cleanupPurchasedListings(listingResourceID: UInt64)
pub fun getExistingListingIDs(nftType: Type, nftID: UInt64): [UInt64]
}
```

Expand Down
10 changes: 5 additions & 5 deletions docs/concepts/core-contracts/11-staking-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ to be interacted with using the Staking Collection API.
The `StakingCollection` contract emits an event whenever an important action occurs.

```cadence
access(all) event NodeAddedToStakingCollection(nodeID: String, role: UInt8, amountCommitted: UFix64, address: Address?)
access(all) event DelegatorAddedToStakingCollection(nodeID: String, delegatorID: UInt32, amountCommitted: UFix64, address: Address?)
pub event NodeAddedToStakingCollection(nodeID: String, role: UInt8, amountCommitted: UFix64, address: Address?)
pub event DelegatorAddedToStakingCollection(nodeID: String, delegatorID: UInt32, amountCommitted: UFix64, address: Address?)
access(all) event NodeRemovedFromStakingCollection(nodeID: String, role: UInt8, address: Address?)
access(all) event DelegatorRemovedFromStakingCollection(nodeID: String, delegatorID: UInt32, address: Address?)
pub event NodeRemovedFromStakingCollection(nodeID: String, role: UInt8, address: Address?)
pub event DelegatorRemovedFromStakingCollection(nodeID: String, delegatorID: UInt32, address: Address?)
access(all) event MachineAccountCreated(nodeID: String, role: UInt8, address: Address)
pub event MachineAccountCreated(nodeID: String, role: UInt8, address: Address)
```
2 changes: 1 addition & 1 deletion docs/concepts/flow-token/wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `FlowToken` contract emits a `FlowToken.TokensDeposited` event whenever toke
move between accounts.

```cadence
access(all) event TokensDeposited(amount: UFix64, to: Address?)
pub event TokensDeposited(amount: UFix64, to: Address?)
```

You can query for this event to detect when tokens are deposited into a user's account.
Expand Down
12 changes: 6 additions & 6 deletions docs/concepts/hybrid-custody/guides/account-model.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ This script will return `true` if a `HybridCustody.Manager` is stored and `false
```cadence get_child_addresses.cdc
import "HybridCustody"
access(all) fun main(parent: Address): Bool {
pub fun main(parent: Address): Bool {
let acct = getAuthAccount(parent)
if let manager = acct.borrow<&HybridCustody.Manager>(from: HybridCustody.ManagerStoragePath) {
return manager.getAddresses().length > 0
Expand All @@ -188,7 +188,7 @@ address.
```cadence get_child_addresses.cdc
import "HybridCustody"
access(all) fun main(parent: Address): [Address] {
pub fun main(parent: Address): [Address] {
let acct = getAuthAccount(parent)
let manager = acct.borrow<&HybridCustody.Manager>(from: HybridCustody.ManagerStoragePath)
?? panic("manager not found")
Expand All @@ -213,7 +213,7 @@ import "HybridCustody"
/// Returns resolved Display from given address at specified path for each ID or nil if ResolverCollection is not found
///
access(all) fun getViews(_ address: Address, _ resolverCollectionPath: PublicPath): {UInt64: MetadataViews.Display} {
pub fun getViews(_ address: Address, _ resolverCollectionPath: PublicPath): {UInt64: MetadataViews.Display} {
let account: PublicAccount = getAccount(address)
let views: {UInt64: MetadataViews.Display} = {}
Expand All @@ -234,7 +234,7 @@ access(all) fun getViews(_ address: Address, _ resolverCollectionPath: PublicPat
/// Queries MetadataViews.Display for each NFT across all associated accounts from Collections at the provided
/// PublicPath
///
access(all) fun main(address: Address, resolverCollectionPath: PublicPath): {Address: {UInt64: MetadataViews.Display}} {
pub fun main(address: Address, resolverCollectionPath: PublicPath): {Address: {UInt64: MetadataViews.Display}} {
let allViews: {Address: {UInt64: MetadataViews.Display}} = {address: getViews(address, resolverCollectionPath)}
let seen: [Address] = [address]
Expand Down Expand Up @@ -280,7 +280,7 @@ import "HybridCustody"
/// Returns a mapping of balances indexed on the Type of resource containing the balance
///
access(all) fun getAllBalancesInStorage(_ address: Address): {Type: UFix64} {
pub fun getAllBalancesInStorage(_ address: Address): {Type: UFix64} {
// Get the account
let account: AuthAccount = getAuthAccount(address)
// Init for return value
Expand Down Expand Up @@ -310,7 +310,7 @@ access(all) fun getAllBalancesInStorage(_ address: Address): {Type: UFix64} {
/// Queries for FT.Vault balance of all FT.Vaults in the specified account and all of its associated accounts
///
access(all) fun main(address: Address): {Address: {Type: UFix64}} {
pub fun main(address: Address): {Address: {Type: UFix64}} {
// Get the balance for the given address
let balances: {Address: {Type: UFix64}} = { address: getAllBalancesInStorage(address) }
Expand Down
20 changes: 10 additions & 10 deletions docs/concepts/mobile/monster-maker.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ To view the NFT from an wallet address, first and foremost, we highly recommend
import MonsterMaker from 0xMonsterMaker
import MetadataViews from 0xMetadataViews

access(all) struct Monster {
access(all) let name: String
access(all) let description: String
access(all) let thumbnail: String
access(all) let itemID: UInt64
access(all) let resourceID: UInt64
access(all) let owner: Address
access(all) let component: MonsterMaker.MonsterComponent
pub struct Monster {
pub let name: String
pub let description: String
pub let thumbnail: String
pub let itemID: UInt64
pub let resourceID: UInt64
pub let owner: Address
pub let component: MonsterMaker.MonsterComponent

init(
name: String,
Expand All @@ -178,7 +178,7 @@ To view the NFT from an wallet address, first and foremost, we highly recommend
}
}

access(all) fun getMonsterById(address: Address, itemID: UInt64): Monster? {
pub fun getMonsterById(address: Address, itemID: UInt64): Monster? {

if let collection = getAccount(address).getCapability<&MonsterMaker.Collection{NonFungibleToken.CollectionPublic, MonsterMaker.MonsterMakerCollectionPublic}>(MonsterMaker.CollectionPublicPath).borrow() {

Expand All @@ -204,7 +204,7 @@ To view the NFT from an wallet address, first and foremost, we highly recommend
return nil
}

access(all) fun main(address: Address): [Monster] {
pub fun main(address: Address): [Monster] {
let account = getAccount(address)
let collectionRef = account.getCapability(MonsterMaker.CollectionPublicPath)!.borrow<&{NonFungibleToken.CollectionPublic}>()
?? panic("Could not borrow capability from public collection")
Expand Down
8 changes: 4 additions & 4 deletions docs/concepts/mobile/react-native-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default function App() {
cadence: `
import Profile from 0xProfile
access(all) fun main(address: Address): Profile.ReadOnly? {
pub fun main(address: Address): Profile.ReadOnly? {
return Profile.read(address)
}
`,
Expand Down Expand Up @@ -283,7 +283,7 @@ await fcl.query({
cadence: `
import Profile from 0xProfile
access(all) fun main(address: Address): Profile.ReadOnly? {
pub fun main(address: Address): Profile.ReadOnly? {
return Profile.read(address)
}
`,
Expand Down Expand Up @@ -367,7 +367,7 @@ export default function App() {
cadence: `
import Profile from 0xProfile
access(all) fun main(address: Address): Profile.ReadOnly? {
pub fun main(address: Address): Profile.ReadOnly? {
return Profile.read(address)
}
`,
Expand Down Expand Up @@ -504,7 +504,7 @@ export default function App() {
cadence: `
import Profile from 0xProfile
access(all) fun main(address: Address): Profile.ReadOnly? {
pub fun main(address: Address): Profile.ReadOnly? {
return Profile.read(address)
}
`,
Expand Down
Loading

0 comments on commit 57ef4df

Please sign in to comment.