Skip to content

Commit

Permalink
Merge pull request #2540 from onflow/sainati/remove-pub-priv
Browse files Browse the repository at this point in the history
Remove `pub`, `priv` and `pub(set)` access modifiers
  • Loading branch information
dsainati1 authored Jun 22, 2023
2 parents 115c6c4 + 5a79182 commit 6fd0e01
Show file tree
Hide file tree
Showing 160 changed files with 6,362 additions and 5,309 deletions.
18 changes: 9 additions & 9 deletions encoding/ccf/ccf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12900,7 +12900,7 @@ func TestDeployedEvents(t *testing.T) {
}

func newFlowFeesFeesDeductedEventType() *cadence.EventType {
// pub event FeesDeducted(amount: UFix64, inclusionEffort: UFix64, executionEffort: UFix64)
// access(all) event FeesDeducted(amount: UFix64, inclusionEffort: UFix64, executionEffort: UFix64)

address, _ := common.HexToAddress("f919ee77447b7497")
location := common.NewAddressLocation(nil, address, "FlowFees")
Expand Down Expand Up @@ -12944,7 +12944,7 @@ func createFlowFeesFeesDeductedEvent() cadence.Event {
}

func newFlowFeesTokensWithdrawnEventType() *cadence.EventType {
// pub event TokensWithdrawn(amount: UFix64)
// access(all) event TokensWithdrawn(amount: UFix64)

address, _ := common.HexToAddress("f919ee77447b7497")
location := common.NewAddressLocation(nil, address, "FlowFees")
Expand Down Expand Up @@ -12976,7 +12976,7 @@ func createFlowFeesTokensWithdrawnEvent() cadence.Event {
}

func newFlowTokenTokensDepositedEventType() *cadence.EventType {
// pub event TokensDeposited(amount: UFix64, to: Address?)
// access(all) event TokensDeposited(amount: UFix64, to: Address?)

address, _ := common.HexToAddress("1654653399040a61")
location := common.NewAddressLocation(nil, address, "FlowToken")
Expand Down Expand Up @@ -13034,7 +13034,7 @@ func createFlowTokenTokensDepositedEvent() cadence.Event {
}

func newFlowTokenTokensMintedEventType() *cadence.EventType {
// pub event TokensMinted(amount: UFix64)
// access(all) event TokensMinted(amount: UFix64)

address, _ := common.HexToAddress("1654653399040a61")
location := common.NewAddressLocation(nil, address, "FlowToken")
Expand Down Expand Up @@ -13066,7 +13066,7 @@ func createFlowTokenTokensMintedEvent() cadence.Event {
}

func newFlowTokenTokensWithdrawnEventType() *cadence.EventType {
// pub event TokensWithdrawn(amount: UFix64, from: Address?)
// access(all) event TokensWithdrawn(amount: UFix64, from: Address?)

address, _ := common.HexToAddress("1654653399040a61")
location := common.NewAddressLocation(nil, address, "FlowToken")
Expand Down Expand Up @@ -13108,7 +13108,7 @@ func createFlowTokenTokensWithdrawnEvent() cadence.Event {
}

func newFlowIDTableStakingDelegatorRewardsPaidEventType() *cadence.EventType {
// pub event DelegatorRewardsPaid(nodeID: String, delegatorID: UInt32, amount: UFix64)
// access(all) event DelegatorRewardsPaid(nodeID: String, delegatorID: UInt32, amount: UFix64)

address, _ := common.HexToAddress("8624b52f9ddcd04a")
location := common.NewAddressLocation(nil, address, "FlowIDTableStaking")
Expand Down Expand Up @@ -13152,7 +13152,7 @@ func createFlowIDTableStakingDelegatorRewardsPaidEvent() cadence.Event {
}

func newFlowIDTableStakingEpochTotalRewardsPaidEventType() *cadence.EventType {
// pub event EpochTotalRewardsPaid(total: UFix64, fromFees: UFix64, minted: UFix64, feesBurned: UFix64)
// access(all) event EpochTotalRewardsPaid(total: UFix64, fromFees: UFix64, minted: UFix64, feesBurned: UFix64)

address, _ := common.HexToAddress("8624b52f9ddcd04a")
location := common.NewAddressLocation(nil, address, "FlowIDTableStaking")
Expand Down Expand Up @@ -13202,7 +13202,7 @@ func createFlowIDTableStakingEpochTotalRewardsPaidEvent() cadence.Event {
}

func newFlowIDTableStakingNewWeeklyPayoutEventType() *cadence.EventType {
// pub event NewWeeklyPayout(newPayout: UFix64)
// access(all) event NewWeeklyPayout(newPayout: UFix64)

address, _ := common.HexToAddress("8624b52f9ddcd04a")
location := common.NewAddressLocation(nil, address, "FlowIDTableStaking")
Expand Down Expand Up @@ -13234,7 +13234,7 @@ func createFlowIDTableStakingNewWeeklyPayoutEvent() cadence.Event {
}

func newFlowIDTableStakingRewardsPaidEventType() *cadence.EventType {
// pub event RewardsPaid(nodeID: String, amount: UFix64)
// access(all) event RewardsPaid(nodeID: String, amount: UFix64)

address, _ := common.HexToAddress("8624b52f9ddcd04a")
location := common.NewAddressLocation(nil, address, "FlowIDTableStaking")
Expand Down
4 changes: 2 additions & 2 deletions examples/quicksort.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// > Our version of quicksort is not the fastest possible,
/// > but it's one of the simplest.
///
pub fun quickSort(_ items: &[AnyStruct], isLess: ((Int, Int): Bool)) {
access(all) fun quickSort(_ items: &[AnyStruct], isLess: ((Int, Int): Bool)) {

fun quickSortPart(leftIndex: Int, rightIndex: Int) {

Expand Down Expand Up @@ -38,7 +38,7 @@ pub fun quickSort(_ items: &[AnyStruct], isLess: ((Int, Int): Bool)) {
)
}

pub fun main() {
access(all) fun main() {
let items = [5, 3, 7, 6, 2, 9]
quickSort(
&items as &[AnyStruct],
Expand Down
3 changes: 3 additions & 0 deletions go.cap
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
github.com/onflow/cadence ()

github.com/davecgh/go-spew/spew (file)
github.com/k0kubun/pp (file, runtime)
github.com/klauspost/cpuid/v2 (file, runtime)
github.com/mattn/go-colorable (file)
github.com/onflow/cadence/runtime/errors (runtime)
github.com/onflow/cadence/runtime/parser (file)
github.com/onflow/cadence/runtime/pretty (runtime)
github.com/stretchr/testify/assert (runtime, file, network)
github.com/stretchr/testify/require (network)
github.com/texttheater/golang-levenshtein/levenshtein (file)
github.com/zeebo/blake3/internal/consts (file)
golang.org/x/sys/unix (runtime, syscall)
golang.org/x/xerrors (runtime)
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ require (
require (
github.com/SaveTheRbtz/mph v0.1.2
github.com/bytecodealliance/wasmtime-go/v7 v7.0.0
github.com/k0kubun/pp v3.0.1+incompatible
github.com/k0kubun/pp/v3 v3.2.0
github.com/logrusorgru/aurora/v4 v4.0.0
)
Expand All @@ -41,6 +42,7 @@ require github.com/zeebo/xxh3 v1.0.2 // indirect
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fxamacker/circlehash v0.3.0 // indirect
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
github.com/klauspost/cpuid/v2 v2.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ github.com/go-test/deep v1.0.5 h1:AKODKU3pDH1RzZzm6YZu77YWtEAq6uh1rLIAQlay2qc=
github.com/go-test/deep v1.0.5/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM=
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw=
github.com/k0kubun/pp v3.0.1+incompatible h1:3tqvf7QgUnZ5tXO6pNAZlrvHgl6DvifjDrd9g2S9Z40=
github.com/k0kubun/pp v3.0.1+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg=
github.com/k0kubun/pp/v3 v3.2.0 h1:h33hNTZ9nVFNP3u2Fsgz8JXiF5JINoZfFq4SvKJwNcs=
github.com/k0kubun/pp/v3 v3.2.0/go.mod h1:ODtJQbQcIRfAD3N+theGCV1m/CBxweERz2dapdz1EwA=
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
Expand Down
Loading

0 comments on commit 6fd0e01

Please sign in to comment.