Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Cadence 1.0 Core Contracts Changes #319

Merged
merged 136 commits into from
Jun 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
d7330c3
update to view functions for stable cadence
joshuahannan Nov 2, 2022
bebb19d
Update to newest Stable Cadence Preview (#371)
dsainati1 Jul 5, 2023
a9e9e5d
remove casting and fix conflicts
joshuahannan Jul 10, 2023
253f985
integrate ft and nft stable cadence changes, use access, view, and en…
joshuahannan Jul 18, 2023
d5d3fc2
use v2 ft and nft
joshuahannan Jul 18, 2023
58bfcfb
use string for nft import
joshuahannan Jul 18, 2023
d9d2614
update token deps
joshuahannan Jul 18, 2023
9b8c764
update token deps
joshuahannan Jul 18, 2023
5044e1d
update nft dependecy
joshuahannan Jul 18, 2023
07c8c7b
update nft dep
joshuahannan Jul 18, 2023
99f47a0
update ft dep
joshuahannan Jul 18, 2023
aa0d30b
add more view
joshuahannan Jul 19, 2023
69e65bd
update FlowToken contract getter to explicitly use metadata views
joshuahannan Jul 19, 2023
a94c565
implement new standard methods
joshuahannan Jul 19, 2023
90cd889
update nft dependency
joshuahannan Jul 19, 2023
8217b15
update ft dep
joshuahannan Jul 19, 2023
7a4a112
fix FungibleToken.Vault types and imports
joshuahannan Jul 19, 2023
dc499b4
remove view from copy
joshuahannan Jul 19, 2023
3e0bd42
add correct vault type
joshuahannan Jul 19, 2023
e642b90
remove views and update balances
joshuahannan Jul 19, 2023
9f786d5
use vault interface type
joshuahannan Jul 19, 2023
a3ad792
remove restricted types
joshuahannan Jul 26, 2023
0bd0969
remove AnyStruct
joshuahannan Jul 26, 2023
40fdc45
remove type restrictions
joshuahannan Jul 26, 2023
bceaf1d
fix view modifiers in epoch contracts
joshuahannan Jul 27, 2023
d6f1c62
remove view for dkgCompleted
joshuahannan Jul 27, 2023
00f3f53
remove non-view methods from pre-conditions
joshuahannan Jul 27, 2023
d258883
use setter methods in QC
joshuahannan Jul 27, 2023
334b5ef
remove pub from QC
joshuahannan Jul 27, 2023
088c4f1
add fun keyword
joshuahannan Jul 27, 2023
186f352
use setters for fields and use getBalance
joshuahannan Jul 27, 2023
eaf04f6
use view keyword
joshuahannan Jul 27, 2023
4a593e6
remove restricted types from flow epoch
joshuahannan Jul 27, 2023
f82c0bd
use setters in FlowEpoch
joshuahannan Jul 27, 2023
1e42943
correct metadata types
joshuahannan Jul 27, 2023
b6eea49
use UInt64 in NodeVersionBeacon
joshuahannan Jul 27, 2023
234488b
dont use restricted types in locked tokens and staking collection
joshuahannan Jul 27, 2023
32ee36b
make LockedTokens compatible with FungibleToken
joshuahannan Jul 28, 2023
3e7e66c
use entitlement for manager
joshuahannan Jul 28, 2023
81673c1
correct entitlement syntax
joshuahannan Jul 28, 2023
3366647
fix entitlement issues with locked tokens
joshuahannan Jul 28, 2023
ae14189
fix entitlement issues with staking collection
joshuahannan Jul 28, 2023
98e669c
fix entitlement return types
joshuahannan Jul 28, 2023
d03de9a
add withdrawable to machine account functions
joshuahannan Jul 28, 2023
20bc88d
replace addresses and fix transactions and scripts
joshuahannan Aug 2, 2023
f00e74c
fixes to epoch tests
joshuahannan Aug 8, 2023
8a95802
update to latest token standards and update locked tokens transactions
joshuahannan Aug 22, 2023
90028cb
Update contracts
SupunS Sep 8, 2023
5624221
Update more contracts
SupunS Sep 11, 2023
a146eb7
Update contracts
SupunS Sep 11, 2023
47c7323
Update contarcts and transactions
SupunS Sep 12, 2023
7f6a9cf
go mod tidy
SupunS Sep 12, 2023
006692d
Update flow-sdk
SupunS Sep 12, 2023
20bf827
Update more contracts
SupunS Sep 12, 2023
f90b7db
Update ft/nft deps
SupunS Sep 13, 2023
3e4a8d7
Generate assets
SupunS Sep 13, 2023
148f186
Update more cadence codes
SupunS Sep 13, 2023
5287d71
Update staking collection
SupunS Sep 13, 2023
82e83fc
Update go mods
SupunS Sep 13, 2023
6e65aab
Fix typo
SupunS Sep 14, 2023
071589b
Replace get()+borrow() with borrow()
SupunS Sep 14, 2023
8bf41b7
Refactor code
SupunS Sep 14, 2023
36b3a40
Update go-sdk and flow-nft versions
SupunS Sep 15, 2023
a14bfc3
Fix publish_voter transaction
SupunS Sep 18, 2023
1a47522
Update to Cadence v1.0.0-preview.1
SupunS Sep 21, 2023
7f0ae3d
Apply suggestions from code review
SupunS Sep 21, 2023
222d143
Refactor code
SupunS Sep 22, 2023
889e103
fix and improve syntax
turbolent Sep 22, 2023
0e44d6d
use optional chaining and nil-coaelescing instead of force-unwrapping
turbolent Sep 22, 2023
2ba8ec1
Update get_total_balance.cdc
SupunS Sep 26, 2023
5d361b6
Merge remote-tracking branch 'origin/master' into stable-cadence
joshuahannan Nov 21, 2023
b41a334
make sure epoch contracts work with capability controllers and entitl…
joshuahannan Nov 22, 2023
f8dfacb
update dependencies and add public burn tokens method
joshuahannan Dec 4, 2023
69a42be
fix go.mod conflict from merge from master
joshuahannan Dec 11, 2023
e45ba2b
remove view from getRandomSourceHistoryPage and use account.storage
joshuahannan Dec 11, 2023
37cbe45
remove custom destructors and fix entitlement usage
joshuahannan Dec 12, 2023
965521c
merge from master and update dependencies
joshuahannan Jan 2, 2024
5f2af20
get all go tests passing for cadence 1.0
joshuahannan Jan 2, 2024
93317bc
make ci
joshuahannan Jan 2, 2024
6eb32e7
make ci
joshuahannan Jan 2, 2024
b29775f
update random source transactions
joshuahannan Jan 2, 2024
1c546c6
update cli version for CI
joshuahannan Jan 2, 2024
cb90b89
update go version
joshuahannan Jan 3, 2024
c0c5250
Update Cadence version (#406)
SupunS Jan 23, 2024
77b4a62
update Withdrawable and createEmptyVault
joshuahannan Jan 23, 2024
1036e08
merge from origin
joshuahannan Jan 23, 2024
8d58eb4
update createEmpty in staking
joshuahannan Jan 24, 2024
7204ba8
use Burner and update dependencies
joshuahannan Jan 25, 2024
9289bdc
update to SDK v1.0.0-M1
turbolent Jan 25, 2024
1a178d6
update NFT contracts, remove replace statements
turbolent Jan 25, 2024
edbd26e
update to Cadence v1.0.0-M3
turbolent Jan 25, 2024
df76aaf
update to Cadence v1.0.0-M3 and SDK v1.0.0-M1
turbolent Jan 25, 2024
b7a9513
remove getBalance, add isAvailableToWithdraw
joshuahannan Jan 25, 2024
e3aada3
update ft and nft deps
joshuahannan Feb 1, 2024
1984b08
merge from master
joshuahannan Feb 1, 2024
5f44be4
update emulator dependencies and get tests passing
joshuahannan Feb 1, 2024
80dacce
use FungibleToken.Balance instead of FlowToken.Vault
joshuahannan Feb 1, 2024
89c4b73
use correct public path types
joshuahannan Feb 5, 2024
e489275
update imports
joshuahannan Feb 6, 2024
7af9d5b
go mod tidy
joshuahannan Feb 6, 2024
b75941c
add fungible token switchboard
joshuahannan Feb 6, 2024
928bf99
fix switchboard
joshuahannan Feb 6, 2024
098fbb0
update error messages for ledger transactions
joshuahannan Feb 7, 2024
439755c
add updated manifests with new account, FT, and NFT transactions and …
joshuahannan Feb 9, 2024
b403661
update account transactions to use simple arguments
joshuahannan Feb 12, 2024
7d800d5
update manifest to include both styles of token transfer transactions:
joshuahannan Feb 13, 2024
46d7685
update emulator dependency
joshuahannan Feb 13, 2024
439c5aa
use string args for NFT contracts
joshuahannan Feb 14, 2024
f5053a4
update collection machine account transactions to not use keylist entry
joshuahannan Feb 15, 2024
a7b73af
Update contract getter methods to use env (#410)
joshuahannan Feb 27, 2024
fda9bc2
get address replacement working in tests and add event emission restr…
joshuahannan Feb 27, 2024
d81e0c3
update to latest emulator, cadence, and token standards versions
joshuahannan Mar 5, 2024
6f9e0a9
Update README
joshuahannan Mar 7, 2024
bcf77ee
Don't copy dictionary in getEpochMetadata (#413)
janezpodhostnik Mar 22, 2024
4352c32
update NFT contracts
joshuahannan Mar 26, 2024
10241ff
update ft dependency
joshuahannan Mar 27, 2024
f410947
update token standard dependencies
joshuahannan Apr 2, 2024
9004857
make ci
joshuahannan Apr 2, 2024
77f7eae
fix algorithm typo and test names
joshuahannan Apr 8, 2024
826099b
update nft transactions
joshuahannan Apr 9, 2024
d40b890
fix typos in transactions
joshuahannan Apr 15, 2024
486ea68
update nft dependencies
joshuahannan Apr 15, 2024
1b20b4d
update RandomBeaconHistory to Cadence 1.0
joshuahannan Apr 16, 2024
272832a
Add entitlement for locked account creator (#423)
joshuahannan Apr 24, 2024
50821c3
update ft dependencies
joshuahannan Apr 24, 2024
93d97ed
remove optional chaining in FlowStakingCollection
joshuahannan Apr 24, 2024
0fc367f
remove optional chaining
joshuahannan Apr 24, 2024
e696a8e
update nft imports and remove unnecessary Burner import from FlowToken
joshuahannan Apr 29, 2024
af808a6
update dependencies
joshuahannan May 7, 2024
7cecccd
Improve random distribution (#428)
tarakby May 9, 2024
fa79414
address PR comments and add entitlements to LockedTokens.TokenManager
joshuahannan May 9, 2024
4f23668
remove UseTokens entitlement
joshuahannan May 9, 2024
9490f1d
use view more and update nft deps
joshuahannan May 17, 2024
47a27af
make ci
joshuahannan May 17, 2024
228d291
add view modifiers
joshuahannan Jun 6, 2024
437cc82
update dependencies
joshuahannan Jun 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix entitlement issues with locked tokens
joshuahannan committed Jul 28, 2023
commit 336664701a32d207ff127b8396129afcf6fa67cc
6 changes: 3 additions & 3 deletions contracts/LockedTokens.cdc
Original file line number Diff line number Diff line change
@@ -309,7 +309,7 @@ access(all) contract LockedTokens {
}

/// Utility function to borrow a reference to the LockedTokenManager object
access(account) fun borrowTokenManager(): &LockedTokenManager {
access(account) fun borrowTokenManager(): auth(FungibleToken.Withdrawable) &LockedTokenManager {
return self.tokenManager.borrow()!
}

@@ -423,7 +423,7 @@ access(all) contract LockedTokens {

access(self) var tokenManager: Capability<auth(FungibleToken.Withdrawable) &LockedTokenManager>

init(tokenManager: Capability<&LockedTokenManager>) {
init(tokenManager: Capability<auth(FungibleToken.Withdrawable) &LockedTokenManager>) {
pre {
tokenManager.borrow() != nil: "Invalid token manager capability"
}
@@ -551,7 +551,7 @@ access(all) contract LockedTokens {

access(self) var tokenManager: Capability<auth(FungibleToken.Withdrawable) &LockedTokenManager>

init(tokenManager: Capability<&LockedTokenManager>) {
init(tokenManager: Capability<auth(FungibleToken.Withdrawable) &LockedTokenManager>) {
pre {
tokenManager.borrow() != nil: "Invalid LockedTokenManager capability"
}
6 changes: 3 additions & 3 deletions lib/go/contracts/internal/assets/assets.go