-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from onflow/testnet-deployment-followup
Testnet deployment followup
- Loading branch information
Showing
5 changed files
with
65 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import "EVM" | ||
|
||
import "FlowEVMBridgeConfig" | ||
import "FlowEVMBridgeUtils" | ||
|
||
access(all) | ||
fun main(coaHost: Address): String { | ||
let coa = getAuthAccount<auth(BorrowValue) &Account>(coaHost) | ||
.storage | ||
.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(from: /storage/evm) | ||
?? panic("Could not borrow CadenceOwnedAccount from host=".concat(coaHost.toString())) | ||
let res = coa.call( | ||
to: FlowEVMBridgeUtils.getBridgeFactoryEVMAddress(), | ||
data: EVM.encodeABIWithSignature("getRegistry()", []), | ||
gasLimit: FlowEVMBridgeConfig.gasLimit, | ||
value: EVM.Balance(attoflow: UInt(0)) | ||
) | ||
|
||
assert( | ||
res.status == EVM.Status.successful, | ||
message: "getRegistry call to FlowEVMBridgeFactory failed" | ||
) | ||
|
||
let decodedRes = EVM.decodeABI(types: [Type<EVM.EVMAddress>()], data: res.data) | ||
|
||
assert(decodedRes.length == 1, message: "Invalid response length") | ||
|
||
return (decodedRes[0] as! EVM.EVMAddress).toString() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import "USDCFlow" | ||
|
||
access(all) | ||
fun main() { | ||
let v <- USDCFlow.createEmptyVault(vaultType: Type<@USDCFlow.Vault>()) | ||
log("Vault creation successful") | ||
destroy v | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters