Skip to content

Commit 422e63a

Browse files
committed
bridged tokens
1 parent 4a84c3a commit 422e63a

8 files changed

Lines changed: 51 additions & 134 deletions

File tree

flow.json

Lines changed: 35 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,31 @@
55
"aliases": {
66
"emulator": "f8d6e0586b0a20c7",
77
"testing": "0000000000000007",
8-
"testnet": "4c2ff9dd03ab442f"
8+
"testnet": "2ab6f469ee0dfbb6"
99
}
1010
},
1111
"DeFiActionsMathUtils": {
1212
"source": "./lib/TidalProtocol/DeFiActions/cadence/contracts/utils/DeFiActionsMathUtils.cdc",
1313
"aliases": {
1414
"emulator": "f8d6e0586b0a20c7",
1515
"testing": "0000000000000007",
16-
"testnet": "4c2ff9dd03ab442f"
16+
"testnet": "2ab6f469ee0dfbb6"
1717
}
1818
},
1919
"DeFiActionsUtils": {
2020
"source": "./lib/TidalProtocol/DeFiActions/cadence/contracts/utils/DeFiActionsUtils.cdc",
2121
"aliases": {
2222
"emulator": "f8d6e0586b0a20c7",
2323
"testing": "0000000000000007",
24-
"testnet": "4c2ff9dd03ab442f"
24+
"testnet": "2ab6f469ee0dfbb6"
25+
}
26+
},
27+
"DummyConnectors": {
28+
"source": "./lib/TidalProtocol/cadence/contracts/mocks/DummyConnectors.cdc",
29+
"aliases": {
30+
"emulator": "f8d6e0586b0a20c7",
31+
"testing": "0000000000000008",
32+
"testnet": "2ab6f469ee0dfbb6"
2533
}
2634
},
2735
"EVMAbiHelpers": {
@@ -36,18 +44,10 @@
3644
"source": "cadence/contracts/connectors/evm/EVMTokenConnectors.cdc",
3745
"aliases": {
3846
"emulator": "f8d6e0586b0a20c7",
39-
"testing": "0000000000000009"
47+
"testing": "0000000000000009",
4048
"testnet": "b88ba0e976146cd1"
4149
}
4250
},
43-
"DummyConnectors": {
44-
"source": "./lib/TidalProtocol/cadence/contracts/mocks/DummyConnectors.cdc",
45-
"aliases": {
46-
"emulator": "f8d6e0586b0a20c7",
47-
"testing": "0000000000000008",
48-
"testnet": "2ab6f469ee0dfbb6"
49-
}
50-
},
5151
"FungibleTokenConnectors": {
5252
"source": "./lib/TidalProtocol/DeFiActions/cadence/contracts/connectors/FungibleTokenConnectors.cdc",
5353
"aliases": {
@@ -107,7 +107,7 @@
107107
"TestHelpers": {
108108
"source": "./lib/TidalProtocol/cadence/contracts/mocks/TestHelpers.cdc",
109109
"aliases": {
110-
"testing": "0000000000000008"
110+
"testing": "0000000000000008",
111111
"testnet": "2ab6f469ee0dfbb6"
112112
}
113113
},
@@ -151,12 +151,20 @@
151151
"testnet": "2ab6f469ee0dfbb6"
152152
}
153153
},
154+
"TidalYieldStrategiesUSDC": {
155+
"source": "cadence/contracts/TidalYieldStrategiesUSDC.cdc",
156+
"aliases": {
157+
"emulator": "f8d6e0586b0a20c7",
158+
"testing": "0000000000000009",
159+
"testnet": "2ab6f469ee0dfbb6"
160+
}
161+
},
154162
"UniswapV3SwapConnectors": {
155163
"source": "./lib/TidalProtocol/DeFiActions/cadence/contracts/connectors/evm/UniswapV3SwapConnectors.cdc",
156164
"aliases": {
157165
"emulator": "f8d6e0586b0a20c7",
158166
"testing": "0000000000000007",
159-
"testnet": "46be98b71c0a9543"
167+
"testnet": "2ab6f469ee0dfbb6"
160168
}
161169
},
162170
"YieldToken": {
@@ -262,7 +270,7 @@
262270
},
263271
"FlowEVMBridgeCustomAssociations": {
264272
"source": "mainnet://1e4aa0b87d10b141.FlowEVMBridgeCustomAssociations",
265-
"hash": "984e237c8ea3a97a987b9b502e542b4f22fa55feb74ecc6aaee245a50b287fc4",
273+
"hash": "59366ff81d3e23cd96f362f1f1feb99f8d0cac66b6137926748e5f13f031a51c",
266274
"aliases": {
267275
"emulator": "f8d6e0586b0a20c7",
268276
"mainnet": "1e4aa0b87d10b141",
@@ -583,6 +591,14 @@
583591
"location": "local/test-user.pkey"
584592
}
585593
},
594+
"testnet-admin": {
595+
"address": "2ab6f469ee0dfbb6",
596+
"key": {
597+
"type": "google-kms",
598+
"hashAlgorithm": "SHA2_256",
599+
"resourceID": "projects/dl-flow-devex-staging/locations/us-central1/keyRings/tidal-keyring/cryptoKeys/tidal_admin_pk/cryptoKeyVersions/1"
600+
}
601+
},
586602
"testnet-deployer": {
587603
"address": "29242c62f18538c9",
588604
"key": {
@@ -595,67 +611,15 @@
595611
"key": {
596612
"type": "file",
597613
"location": "testnet-uniswapV3-connectors-deployer.pkey"
598-
}
599-
},
600-
"testnet-admin": {
601-
"address": "2ab6f469ee0dfbb6",
602-
"key": {
603-
"type": "google-kms",
604-
"hashAlgorithm": "SHA2_256",
605-
"resourceID": "projects/dl-flow-devex-staging/locations/us-central1/keyRings/tidal-keyring/cryptoKeys/tidal_admin_pk/cryptoKeyVersions/1"
606614
}
607615
}
608616
},
609617
"deployments": {
610618
"emulator": {
611619
"emulator-account": [
612-
{
613-
"name": "FlowEVMBridgeUtils",
614-
"args": [
615-
{
616-
"value": "0xbd6e7465e62808d9b7028e9e256d7742a6230f45",
617-
"type": "String"
618-
}
619-
]
620-
},
621-
"SerializeMetadata",
622-
"Serialize",
623-
"FlowEVMBridgeConfig",
624-
"FlowEVMBridgeHandlerInterfaces",
625-
"CrossVMNFT",
626-
"ICrossVMAsset",
627-
"ICrossVM",
628-
"IBridgePermissions",
629-
"IEVMBridgeNFTMinter",
630-
"IEVMBridgeTokenMinter",
631-
"IFlowEVMNFTBridge",
632-
"IFlowEVMTokenBridge",
633-
"CrossVMToken",
634-
"FlowEVMBridgeNFTEscrow",
635-
"FlowEVMBridgeTokenEscrow",
636-
"FlowEVMBridgeTemplates",
637-
{
638-
"name": "FlowEVMBridgeAccessor",
639-
"args": [
640-
{
641-
"value": "0xf8d6e0586b0a20c7",
642-
"type": "Address"
643-
}
644-
]
645-
},
646-
"FlowEVMBridgeHandlers",
647-
"CrossVMMetadataViews",
648-
"StringUtils",
649-
"ArrayUtils",
650-
"ScopedFTProviders",
651-
"FlowEVMBridgeResolver",
652-
"FlowEVMBridgeCustomAssociations",
653-
"FlowEVMBridgeCustomAssociationTypes",
654-
"FlowEVMBridge",
655620
"DeFiActionsMathUtils",
656621
"DeFiActionsUtils",
657622
"DeFiActions",
658-
"FlowStorageFees",
659623
"FungibleTokenConnectors",
660624
"SwapConnectors",
661625
{
@@ -711,13 +675,11 @@
711675
]
712676
},
713677
"testnet": {
714-
"testnet-deployer": [
715-
"EVMAbiHelpers"
716-
],
717-
"testnet-uniswapV3-connectors-deployer": [
718-
"UniswapV3SwapConnectors"
719-
},
720678
"testnet-admin": [
679+
"DeFiActionsMathUtils",
680+
"DeFiActionsUtils",
681+
"DeFiActions",
682+
"EVMAbiHelpers",
721683
"FlowStorageFees",
722684
"FungibleTokenConnectors",
723685
"SwapConnectors",

local/punchswap/punchswap.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ TOKENS_OWNER=0xC31A5268a1d311d992D637E8cE925bfdcCEB4310
3030
USDC_MINT=1000000000000
3131
WBTC_MINT=100000000000000
3232

33-
USDC_ADDR=0x85bf166c3b790c2373d67d8f5a3a2b7abcbcfb5e
34-
WBTC_ADDR=0x7d0dc024ff9893b59ca80b9a274567b99a9d4a2d
33+
USDC_ADDR=0xaCCF0c4EeD4438Ad31Cd340548f4211a465B6528
34+
WBTC_ADDR=0x374BF2423c6b67694c068C3519b3eD14d3B0C5d1
3535

3636
# how much to fund the helper (base units)
3737
# USDC_FUND=600000000 # 600k * 1e6

local/run_emulator.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
flow emulator --setup-vm-bridge=false &
1+
flow emulator --contracts &
22

33
# Port to check
44
PORT=8080

local/run_evm_gateway.sh

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
EMULATOR_COINBASE=FACF71692421039876a5BB4F10EF7A439D8ef61E
22
EMULATOR_COA_ADDRESS=e03daebed8ca0615
33
EMULATOR_COA_KEY=$(cat ./local/evm-gateway.pkey)
4+
PORT=8545
45

5-
cd ./lib/flow-evm-gateway/
66
rm -rf db/
7-
rm -rf metrics/data/
8-
CGO_ENABLED=1 go run cmd/main.go run \
9-
--flow-network-id=flow-emulator \
7+
8+
flow evm gateway \
9+
--flow-network-id=emulator \
10+
--evm-network-id=preview \
1011
--coinbase=$EMULATOR_COINBASE \
1112
--coa-address=$EMULATOR_COA_ADDRESS \
1213
--coa-key=$EMULATOR_COA_KEY \
13-
--wallet-api-key=2619878f0e2ff438d17835c2a4561cb87b4d24d72d12ec34569acd0dd4af7c21 \
14-
--gas-price=1 \
15-
--log-writer=console \
16-
--tx-state-validation=local-index \
17-
--profiler-enabled=true \
18-
--profiler-port=6060 \
19-
--ws-enabled=true &
20-
21-
# Port to check
22-
PORT=8545
23-
14+
--gas-price=0 \
15+
--rpc-port $PORT &
16+
#
2417
# Wait for port to be available
2518
echo "Waiting for port $PORT to be ready..."
2619
while ! nc -z localhost $PORT; do

local/setup_bridge.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

local/setup_bridged_tokens.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
flow transactions send ./lib/flow-evm-bridge/cadence/transactions/bridge/onboarding/onboard_by_evm_address.cdc 0xaCCF0c4EeD4438Ad31Cd340548f4211a465B6528 --signer emulator-account --gas-limit 9999
2+
3+
flow transactions send ./lib/flow-evm-bridge/cadence/transactions/bridge/onboarding/onboard_by_evm_address.cdc 0x374BF2423c6b67694c068C3519b3eD14d3B0C5d1 --signer emulator-account --gas-limit 9999

local/setup_wallets.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ flow accounts create --network "$FLOW_NETWORK" --key "$(cat $EVM_GATEWAY_PUBKEY_
88

99
flow transactions send ./cadence/transactions/mocks/add_gw_keys.cdc --signer evm-gateway
1010

11+
# evm-gateway
1112
flow transactions send "./cadence/transactions/flow-token/transfer_flow.cdc" 0xe03daebed8ca0615 1000.0

local/univ3_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ forge script ./solidity/script/01_DeployBridge.s.sol:DeployBridge \
1818
echo "Setup emulator"
1919
./local/setup_emulator.sh
2020

21-
./local/setup_bridge.sh
21+
./local/setup_bridged_tokens.sh
2222

2323
#
2424
# CODE_HEX=$(xxd -p -c 200000 ./cadence/contracts/PunchSwapV3Connector.cdc)

0 commit comments

Comments
 (0)