Skip to content

Commit

Permalink
fix tests by updating EVM contract in lates CLI release
Browse files Browse the repository at this point in the history
  • Loading branch information
sisyphusSmiling committed Apr 13, 2024
1 parent 4d45b10 commit f60b5f1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
31 changes: 28 additions & 3 deletions cadence/contracts/standards/EVM.cdc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Crypto
import "NonFungibleToken"
import "FungibleToken"
import "FlowToken"
import NonFungibleToken from 0x0000000000000001
import FungibleToken from 0x0000000000000002
import FlowToken from 0x0000000000000003

access(all)
contract EVM {
Expand Down Expand Up @@ -532,6 +532,31 @@ contract EVM {
)
}

/// Block returns information about the latest executed block.
access(all)
struct EVMBlock {
access(all)
let height: UInt64

access(all)
let hash: String

access(all)
let totalSupply: Int

init(height: UInt64, hash: String, totalSupply: Int) {
self.height = height
self.hash = hash
self.totalSupply = totalSupply
}
}

/// Returns the latest executed block.
access(all)
fun getLatestBlock(): EVMBlock {
return InternalEVM.getLatestBlock() as! EVMBlock
}

/// Interface for a resource which acts as an entrypoint to the VM bridge
access(all)
resource interface BridgeAccessor {
Expand Down
Loading

0 comments on commit f60b5f1

Please sign in to comment.