Skip to content

Commit

Permalink
recompile solidity from PR commit & replace bytecode values
Browse files Browse the repository at this point in the history
  • Loading branch information
sisyphusSmiling committed May 8, 2024
1 parent 19ee59c commit 6c4c835
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cadence/args/deploy-erc20-deployer-args.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cadence/args/deploy-erc721-deployer-args.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cadence/contracts/bridge/FlowEVMBridge.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ contract FlowEVMBridge : IFlowEVMNFTBridge, IFlowEVMTokenBridge {
///
access(all)
view fun typeRequiresOnboarding(_ type: Type): Bool? {
if !FlowEVMBridgeUtils.isValidFlowAsset(type: type) {
if !FlowEVMBridgeUtils.isValidCadenceAsset(type: type) {
return nil
}
return FlowEVMBridgeConfig.getEVMAddressAssociated(with: type) == nil &&
Expand Down Expand Up @@ -590,7 +590,7 @@ contract FlowEVMBridge : IFlowEVMNFTBridge, IFlowEVMTokenBridge {
access(self)
fun deployEVMContract(forAssetType: Type): FlowEVMBridgeUtils.EVMOnboardingValues {
pre {
FlowEVMBridgeUtils.isValidFlowAsset(type: forAssetType):
FlowEVMBridgeUtils.isValidCadenceAsset(type: forAssetType):
"Asset type is not supported by the bridge"
}
let isNFT = forAssetType.isSubtype(of: Type<@{NonFungibleToken.NFT}>())
Expand Down
12 changes: 6 additions & 6 deletions cadence/contracts/bridge/FlowEVMBridgeUtils.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ contract FlowEVMBridgeUtils {
/// @return True if the type is either an NFT or FT, false otherwise
///
access(all)
view fun isValidFlowAsset(type: Type): Bool {
let isFlowNFT = type.isSubtype(of: Type<@{NonFungibleToken.NFT}>())
let isFlowFungibleToken = type.isSubtype(of: Type<@{FungibleToken.Vault}>())
return isFlowNFT != isFlowToken
view fun isValidCadenceAsset(type: Type): Bool {
let isCadenceNFT = type.isSubtype(of: Type<@{NonFungibleToken.NFT}>())
let isCadenceFungibleToken = type.isSubtype(of: Type<@{FungibleToken.Vault}>())
return isCadenceNFT != isCadenceFungibleToken
}

/// Retrieves the bridge contract's COA EVMAddress
Expand All @@ -304,7 +304,7 @@ contract FlowEVMBridgeUtils {
access(all)
fun getCadenceOnboardingValues(forAssetType: Type): CadenceOnboardingValues {
pre {
self.isValidFlowAsset(type: forAssetType): "This type is not a supported Flow asset type."
self.isValidCadenceAsset(type: forAssetType): "This type is not a supported Flow asset type."
}
// If not an NFT, assumed to be fungible token.
let isNFT = forAssetType.isSubtype(of: Type<@{NonFungibleToken.NFT}>())
Expand Down Expand Up @@ -726,7 +726,7 @@ contract FlowEVMBridgeUtils {
///
access(all)
view fun deriveEscrowStoragePath(fromType: Type): StoragePath? {
if !self.isValidFlowAsset(type: fromType) {
if !self.isValidCadenceAsset(type: fromType) {
return nil
}
var prefix = ""
Expand Down
4 changes: 2 additions & 2 deletions cadence/tests/test_helpers.cdc

Large diffs are not rendered by default.

0 comments on commit 6c4c835

Please sign in to comment.