Skip to content

Commit 1f955ae

Browse files
committed
feat: upgraded FP contract to include burn-extension
1 parent 5e193bf commit 1f955ae

File tree

5 files changed

+724
-101
lines changed

5 files changed

+724
-101
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ npx hardhat --network beam setupOFT --target-network ethereum --local-contract M
143143
# Ethereum
144144
npx hardhat --network ethereum setupOFT --target-network beam --local-contract MyUsdcProxyOFT --remote-contract MyUsdcOFT
145145

146-
# important: add "--skip-adapter true" when _not_ using upgradeable contracts
146+
# important: add "--skip-adapter true" to the `setupOFT` command when *NOT* using upgradeable contracts (non-upgradeable contracts don't have this method)
147147
```
148148

149149
All done, let's test our bridge by transferring 20 USDC from Ethereum to Beam:
@@ -255,12 +255,12 @@ npx hardhat --network avalanche etherscan-verify
255255

256256
## Supported networks
257257

258-
The LayerZero protocol is active on a wide selection of [test](https://docs.layerzero.network/v1/developers/technical-reference/testnet/testnet-addresses)- and
259-
[mainnets](https://docs.layerzero.network/v1/developers/technical-reference/mainnet/mainnet-addresses), though not all chains are interconnected by default.
258+
The LayerZero protocol is active on a wide selection of [test](https://docs.layerzero.network/v1/developers/evm/technical-reference/testnet/testnet-addresses)- and
259+
[mainnets](https://docs.layerzero.network/v1/developers/evm/technical-reference/mainnet/mainnet-addresses), though not all chains are interconnected by default.
260260

261261
Currently, both Beam test- and mainnet connect to
262262

263-
- Ethereum (Goerli & Sepolia on testnet)
263+
- Ethereum (Sepolia on testnet)
264264
- Avalanche C-Chain
265265
- BNB Smart Chain
266266
- Fantom

contracts/contracts-upgradable/examples/OFTPermit.sol

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,32 @@ pragma solidity ^0.8.18;
55
import "../token/oft/v2/fee/OFTWithFeePermitUpgradeable.sol";
66
import "../token/oft/v2/fee/ProxyOFTWithFeeUpgradeable.sol";
77

8-
contract ForgottenPlaylandOFT is OFTWithFeePermitUpgradeable {}
8+
contract ForgottenPlaylandOFT is OFTWithFeePermitUpgradeable {
9+
/**
10+
* @dev Destroys `amount` tokens from the caller.
11+
*
12+
* See {ERC20-_burn}.
13+
*/
14+
function burn(uint amount) public virtual {
15+
_burn(_msgSender(), amount);
16+
}
17+
18+
/**
19+
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
20+
* allowance.
21+
*
22+
* See {ERC20-_burn} and {ERC20-allowance}.
23+
*
24+
* Requirements:
25+
*
26+
* - the caller must have allowance for ``accounts``'s tokens of at least
27+
* `amount`.
28+
*/
29+
function burnFrom(address account, uint amount) public virtual {
30+
_spendAllowance(account, _msgSender(), amount);
31+
_burn(account, amount);
32+
}
33+
}
934

1035
contract ForgottenPlaylandProxyOFT is ProxyOFTWithFeeUpgradeable {}
1136

@@ -16,3 +41,15 @@ contract CastleOfBlackwaterProxyOFT is ProxyOFTWithFeeUpgradeable {}
1641
contract BeamcatOFT is OFTWithFeePermitUpgradeable {}
1742

1843
contract BeamcatProxyOFT is ProxyOFTWithFeeUpgradeable {}
44+
45+
contract UfoOFT is OFTWithFeePermitUpgradeable {}
46+
47+
contract UfoProxyOFT is ProxyOFTWithFeeUpgradeable {}
48+
49+
contract GoldOFT is OFTWithFeePermitUpgradeable {
50+
function decimals() public view virtual override returns (uint8) {
51+
return 6;
52+
}
53+
}
54+
55+
contract GoldProxyOFT is ProxyOFTWithFeeUpgradeable {}

deployments/beam/ForgottenPlaylandOFT.json

Lines changed: 33 additions & 11 deletions
Large diffs are not rendered by default.

deployments/beam/ForgottenPlaylandOFT_Implementation.json

Lines changed: 122 additions & 85 deletions
Large diffs are not rendered by default.

deployments/beam/solcInputs/4294eef7f5b8b1fd06861779b874f36b.json

Lines changed: 527 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)