-
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.
- Loading branch information
1 parent
efed0c6
commit c434e24
Showing
679 changed files
with
111,115 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[submodule "lib/forge-std"] | ||
path = lib/forge-std | ||
[submodule "./soliditylib/forge-std"] | ||
path = ./solidity/lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std | ||
[submodule "lib/openzeppelin-contracts"] | ||
path = lib/openzeppelin-contracts | ||
[submodule "./solidity/lib/openzeppelin-contracts"] | ||
path = ./solidity/lib/openzeppelin-contracts | ||
url = https://github.com/OpenZeppelin/openzeppelin-contracts |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,18 @@ | ||
import "EVM" | ||
|
||
import "FlowEVMBridgeUtils" | ||
|
||
access(all) fun main(coaHost: Address, contractAddressHex: String): String { | ||
let coa: &EVM.BridgedAccount = getAuthAccount<auth(BorrowValue) &Account>(coaHost).storage.borrow<&EVM.BridgedAccount>( | ||
from: /storage/evm | ||
)! | ||
let calldata: [UInt8] = FlowEVMBridgeUtils.encodeABIWithSignature("name()", []) | ||
let response: [UInt8] = coa.call( | ||
to: FlowEVMBridgeUtils.getEVMAddressFromHexString(address: contractAddressHex)!, | ||
data: calldata, | ||
gasLimit: 15000000, | ||
value: EVM.Balance(flow: 0.0) | ||
) | ||
let decodedResponse: [AnyStruct] = EVM.decodeABI(types: [Type<String>()], data: response) | ||
return decodedResponse[0] as! String | ||
} |
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,18 @@ | ||
import "EVM" | ||
|
||
import "FlowEVMBridgeUtils" | ||
|
||
access(all) fun main(coaHost: Address, id: UInt256, contractAddressHex: String): EVM.EVMAddress { | ||
let coa: &EVM.BridgedAccount = getAuthAccount<auth(BorrowValue) &Account>(coaHost).storage.borrow<&EVM.BridgedAccount>( | ||
from: /storage/evm | ||
)! | ||
let calldata: [UInt8] = FlowEVMBridgeUtils.encodeABIWithSignature("ownerOf(uint256)", [id]) | ||
let response: [UInt8] = coa.call( | ||
to: FlowEVMBridgeUtils.getEVMAddressFromHexString(address: contractAddressHex)!, | ||
data: calldata, | ||
gasLimit: 15000000, | ||
value: EVM.Balance(flow: 0.0) | ||
) | ||
let decodedResponse: [AnyStruct] = EVM.decodeABI(types: [Type<EVM.EVMAddress>()], data: response) | ||
return decodedResponse[0] as! EVM.EVMAddress | ||
} |
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,18 @@ | ||
import "EVM" | ||
|
||
import "FlowEVMBridgeUtils" | ||
|
||
access(all) fun main(coaHost: Address, tokenID: UInt256, contractAddressHex: String): String { | ||
let coa: &EVM.BridgedAccount = getAuthAccount<auth(BorrowValue) &Account>(coaHost).storage.borrow<&EVM.BridgedAccount>( | ||
from: /storage/evm | ||
)! | ||
let calldata: [UInt8] = FlowEVMBridgeUtils.encodeABIWithSignature("tokenURI(uint256)", [tokenID]) | ||
let response: [UInt8] = coa.call( | ||
to: FlowEVMBridgeUtils.getEVMAddressFromHexString(address: contractAddressHex)!, | ||
data: calldata, | ||
gasLimit: 15000000, | ||
value: EVM.Balance(flow: 0.0) | ||
) | ||
let decodedResponse: [AnyStruct] = EVM.decodeABI(types: [Type<String>()], data: response) | ||
return decodedResponse[0] as! String | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
[profile.default] | ||
src = "src" | ||
out = "out" | ||
libs = ["lib"] | ||
eth_rpc_url = "http://127.0.0.1:9000" | ||
src = "./solidity/src" | ||
out = "./solidity/out" | ||
libs = ["./solidity/lib"] | ||
script = "./solidity/script" | ||
test = "./solidity/test" | ||
eth_rpc_url = "http://127.0.0.1:8545" | ||
|
||
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options |
Submodule forge-std
deleted from
2f1126
Submodule openzeppelin-contracts
deleted from
a4b98b
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ | ||
ds-test/=lib/forge-std/lib/ds-test/src/ | ||
erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/ | ||
forge-std/=lib/forge-std/src/ | ||
openzeppelin-contracts/=lib/openzeppelin-contracts/ | ||
@openzeppelin/contracts/=solidity/lib/openzeppelin-contracts/contracts/ | ||
ds-test/=solidity/lib/forge-std/lib/ds-test/src/ | ||
erc4626-tests/=solidity/lib/openzeppelin-contracts/lib/erc4626-tests/ | ||
forge-std/=solidity/lib/forge-std/src/ | ||
openzeppelin-contracts/=solidity/lib/openzeppelin-contracts/ |
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
Oops, something went wrong.