Skip to content

Commit

Permalink
fix: changed interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
wellitongervickas committed Nov 20, 2023
1 parent a0812da commit 4ffb582
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion contracts/Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract Bridge is IBridge, AccessManaged {
}

/// @inheritdoc IBridge
function transferERC721(
function bridgeERC721(
uint256 toChain_,
address receiver_,
address token_,
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ interface IBridge {
* @param token_ token address of collection
* @param tokenId_ token id to transfer
*/
function transferERC721(uint256 toChain_, address receiver_, address token_, uint256 tokenId_) external payable;
function bridgeERC721(uint256 toChain_, address receiver_, address token_, uint256 tokenId_) external payable;

/**
* @notice receive NFT transfers
Expand Down
14 changes: 7 additions & 7 deletions test/bridge/Bridge.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('Bridge', function () {
const nativeChainId = 137

await expect(
bridge.transferERC721(
bridge.bridgeERC721(
nativeChainId,
receiver.address,
fakeNFTAddress,
Expand Down Expand Up @@ -121,7 +121,7 @@ describe('Bridge', function () {
await mockNFT.approve(bridgeAddress, tokenId)

await expect(
bridge.transferERC721(
bridge.bridgeERC721(
nativeChainId,
receiver.address,
mockNFTAddress,
Expand Down Expand Up @@ -150,7 +150,7 @@ describe('Bridge', function () {
await mockNFT.mint(tokenId)
await mockNFT.approve(bridgeAddress, tokenId)

await bridge.transferERC721(
await bridge.bridgeERC721(
nativeChainId,
receiver.address,
mockNFTAddress,
Expand All @@ -161,7 +161,7 @@ describe('Bridge', function () {
expect(nftOwner).to.be.equal(bridgeAddress)
})

it('should receive NFT on transferERC721', async function () {
it('should receive NFT on bridgeERC721', async function () {
const [receiver] = await getSigners()

const { mockNFT, mockNFTAddress } = await loadFixture(deployMockNFTFixture)
Expand All @@ -181,7 +181,7 @@ describe('Bridge', function () {
await mockNFT.mint(tokenId)
await mockNFT.approve(bridgeAddress, tokenId)

await bridge.transferERC721(
await bridge.bridgeERC721(
nativeChainId,
receiver.address,
mockNFTAddress,
Expand All @@ -193,7 +193,7 @@ describe('Bridge', function () {
})

/// todo: implement burn for wrapped NFTs
// it('should burn NFT on transferERC721 when wrapped', async function () {})
// it('should burn NFT on bridgeERC721 when wrapped', async function () {})

it('should emit event when NFT is transferred to bridge contract', async function () {
const [receiver] = await getSigners()
Expand Down Expand Up @@ -228,7 +228,7 @@ describe('Bridge', function () {
)

await expect(
bridge.transferERC721(
bridge.bridgeERC721(
nativeChainId,
receiver.address,
mockNFTAddress,
Expand Down

0 comments on commit 4ffb582

Please sign in to comment.