Skip to content

Commit

Permalink
Merge branch 'master' into bastian/3135-move-crypto-contract-onchain
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed Oct 18, 2024
2 parents 009255f + 0b1fc2b commit 7f1b6fb
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 1,025 deletions.
705 changes: 49 additions & 656 deletions compat/main.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion compat/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ coloredlogs==14.0
dacite==1.5.1
PyYAML==5.4
typing-extensions==3.7.4.3
tabulate==0.8.7
130 changes: 0 additions & 130 deletions compat/suite/flow-core-contracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,133 +7,3 @@ branch: master
go_tests:
- path: lib/go/test
command: make test
files:
- path: contracts/FlowToken.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../../flow-ft/contracts/FungibleToken.cdc").resolve()}"'
)
- path: contracts/FlowFees.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../../flow-ft/contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import FlowToken from 0xFLOWTOKENADDRESS',
f'import FlowToken from "{Path("FlowToken.cdc").resolve()}"'
)
- path: contracts/FlowIDTableStaking.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../../flow-ft/contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import FlowToken from 0xFLOWTOKENADDRESS',
f'import FlowToken from "{Path("FlowToken.cdc").resolve()}"'
)
- path: contracts/FlowStorageFees.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../../flow-ft/contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import FlowToken from 0xFLOWTOKENADDRESS',
f'import FlowToken from "{Path("FlowToken.cdc").resolve()}"'
)
- path: contracts/FlowServiceAccount.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../../flow-ft/contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import FlowToken from 0xFLOWTOKENADDRESS',
f'import FlowToken from "{Path("FlowToken.cdc").resolve()}"'
)
replace(
'import FlowFees from 0xFLOWFEESADDRESS',
f'import FlowFees from "{Path("FlowFees.cdc").resolve()}"'
)
replace(
'import FlowStorageFees from 0xFLOWSTORAGEFEESADDRESS',
f'import FlowStorageFees from "{Path("FlowStorageFees.cdc").resolve()}"'
)
- path: contracts/StakingProxy.cdc

- path: contracts/LockedTokens.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FlowToken from 0xFLOWTOKENADDRESS',
f'import FlowToken from "{Path("FlowToken.cdc").resolve()}"'
)
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../../flow-ft/contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import FlowIDTableStaking from 0xFLOWIDTABLESTAKINGADDRESS',
f'import FlowIDTableStaking from "{Path("FlowIDTableStaking.cdc").resolve()}"'
)
replace(
'import FlowStorageFees from 0xFLOWSTORAGEFEESADDRESS',
f'import FlowStorageFees from "{Path("FlowStorageFees.cdc").resolve()}"'
)
replace(
'import StakingProxy from 0xSTAKINGPROXYADDRESS',
f'import StakingProxy from "{Path("StakingProxy.cdc").resolve()}"'
)
- path: contracts/FlowStakingCollection.cdc
member_account_access:
- 'LockedTokens.cdc'
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../../flow-ft/contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import FlowToken from 0xFLOWTOKENADDRESS',
f'import FlowToken from "{Path("FlowToken.cdc").resolve()}"'
)
replace(
'import FlowIDTableStaking from 0xFLOWIDTABLESTAKINGADDRESS',
f'import FlowIDTableStaking from "{Path("FlowIDTableStaking.cdc").resolve()}"'
)
replace(
'import LockedTokens from 0xLOCKEDTOKENSADDRESS',
f'import LockedTokens from "{Path("LockedTokens.cdc").resolve()}"'
)
replace(
'import FlowStorageFees from 0xFLOWSTORAGEFEESADDRESS',
f'import FlowStorageFees from "{Path("FlowStorageFees.cdc").resolve()}"'
)
79 changes: 0 additions & 79 deletions compat/suite/flow-ft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,82 +7,3 @@ branch: master
go_tests:
- path: lib/go/test
command: make test
files:
- path: contracts/FungibleToken.cdc
- path: contracts/utilityContracts/TokenForwarding.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../FungibleToken.cdc").resolve()}"'
)
- path: contracts/ExampleToken.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("FungibleToken.cdc").resolve()}"'
)
- path: transactions/transfer_tokens.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import ExampleToken from 0xTOKENADDRESS',
f'import ExampleToken from "{Path("../contracts/ExampleToken.cdc").resolve()}"'
)
- path: transactions/setup_account.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import ExampleToken from 0xTOKENADDRESS',
f'import ExampleToken from "{Path("../contracts/ExampleToken.cdc").resolve()}"'
)
- path: transactions/mint_tokens.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import ExampleToken from 0xTOKENADDRESS',
f'import ExampleToken from "{Path("../contracts/ExampleToken.cdc").resolve()}"'
)
- path: transactions/burn_tokens.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import ExampleToken from 0xTOKENADDRESS',
f'import ExampleToken from "{Path("../contracts/ExampleToken.cdc").resolve()}"'
)
54 changes: 0 additions & 54 deletions compat/suite/flow-nft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,3 @@ branch: master
go_tests:
- path: lib/go/test
command: make test
files:
- path: contracts/NonFungibleToken.cdc
- path: contracts/ExampleNFT.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import NonFungibleToken from 0x02',
f'import NonFungibleToken from "{Path("NonFungibleToken.cdc").resolve()}"'
)
- path: transactions/mint_nft.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import NonFungibleToken from 0xNFTADDRESS',
f'import NonFungibleToken from "{Path("../contracts/NonFungibleToken.cdc").resolve()}"'
)
replace(
'import ExampleNFT from 0xNFTCONTRACTADDRESS',
f'import ExampleNFT from "{Path("../contracts/ExampleNFT.cdc").resolve()}"'
)
- path: transactions/setup_account.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import NonFungibleToken from 0xNFTADDRESS',
f'import NonFungibleToken from "{Path("../contracts/NonFungibleToken.cdc").resolve()}"'
)
replace(
'import ExampleNFT from 0xNFTCONTRACTADDRESS',
f'import ExampleNFT from "{Path("../contracts/ExampleNFT.cdc").resolve()}"'
)
- path: transactions/transfer_nft.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import NonFungibleToken from 0xNFTADDRESS',
f'import NonFungibleToken from "{Path("../contracts/NonFungibleToken.cdc").resolve()}"'
)
replace(
'import ExampleNFT from 0xNFTCONTRACTADDRESS',
f'import ExampleNFT from "{Path("../contracts/ExampleNFT.cdc").resolve()}"'
)
81 changes: 0 additions & 81 deletions compat/suite/nba-smart-contracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,84 +7,3 @@ branch: master
go_tests:
- path: lib/go/test
command: make test
files:
- path: contracts/TopShot.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import NonFungibleToken from 0xNFTADDRESS',
f'import NonFungibleToken from "{Path("../../flow-nft/contracts/NonFungibleToken.cdc").resolve()}"'
)
- path: contracts/MarketTopShot.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../../flow-ft/contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import NonFungibleToken from 0xNFTADDRESS',
f'import NonFungibleToken from "{Path("../../flow-nft/contracts/NonFungibleToken.cdc").resolve()}"'
)
replace(
'import TopShot from 0xTOPSHOTADDRESS',
f'import TopShot from "{Path("TopShot.cdc").resolve()}"'
)
- path: contracts/TopShotMarketV2.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import FungibleToken from 0xFUNGIBLETOKENADDRESS',
f'import FungibleToken from "{Path("../../flow-ft/contracts/FungibleToken.cdc").resolve()}"'
)
replace(
'import NonFungibleToken from 0xNFTADDRESS',
f'import NonFungibleToken from "{Path("../../flow-nft/contracts/NonFungibleToken.cdc").resolve()}"'
)
replace(
'import TopShot from 0xTOPSHOTADDRESS',
f'import TopShot from "{Path("TopShot.cdc").resolve()}"'
)
- path: contracts/TopShotShardedCollection.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import NonFungibleToken from 0xNFTADDRESS',
f'import NonFungibleToken from "{Path("../../flow-nft/contracts/NonFungibleToken.cdc").resolve()}"'
)
replace(
'import TopShot from 0xTOPSHOTADDRESS',
f'import TopShot from "{Path("TopShot.cdc").resolve()}"'
)
- path: contracts/TopshotAdminReceiver.cdc
# language=Python prefix="replace: Callable[[str, str], None]\n"
prepare: |
from pathlib import Path
replace(
'import TopShotShardedCollection from 0xSHARDEDADDRESS',
f'import TopShotShardedCollection from "{Path("TopShotShardedCollection.cdc").resolve()}"'
)
replace(
'import TopShot from 0xTOPSHOTADDRESS',
f'import TopShot from "{Path("TopShot.cdc").resolve()}"'
)
2 changes: 1 addition & 1 deletion npm-packages/cadence-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onflow/cadence-parser",
"version": "1.0.0-preview.52",
"version": "1.1.0-preview.52",
"description": "The Cadence parser",
"homepage": "https://github.com/onflow/cadence",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion tools/storage-explorer/addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/onflow/flow-go/cmd/util/ledger/util/registers"

"github.com/onflow/cadence/common"
"github.com/onflow/cadence/runtime/common"
)

func addressesJSON(registersByAccount *registers.ByAccount) ([]byte, error) {
Expand Down
4 changes: 1 addition & 3 deletions tools/storage-explorer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22

require (
github.com/gorilla/mux v1.8.1
github.com/onflow/atree v0.8.0-rc.6
github.com/onflow/atree v0.8.0
github.com/onflow/cadence v1.0.0-preview.52
github.com/onflow/flow-go v0.37.10
github.com/rs/zerolog v1.32.0
Expand Down Expand Up @@ -214,5 +214,3 @@ require (
lukechampine.com/blake3 v1.3.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/onflow/cadence => ../..
Loading

0 comments on commit 7f1b6fb

Please sign in to comment.