Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FortaBridged contract #11

Merged
merged 35 commits into from
Nov 28, 2021
Merged

Add FortaBridged contract #11

merged 35 commits into from
Nov 28, 2021

Conversation

frangio
Copy link
Collaborator

@frangio frangio commented Oct 29, 2021

The FORT token needs to be bridged over to Polygon, where the system will operate and staking will happen.

We'll use the Polygon PoS Bridge. The token on Polygon will use the same code that was originally deployed to Ethereum Mainnet, extended with the functions required by the PoS Bridge (deposit and withdraw), and with the ability to mint removed.

The roles of the token will be initially assigned to a Gnosis Safe deployed to Polygon with the same set of signers.

@frangio frangio requested a review from Amxx October 29, 2021 02:28
contracts/vesting/VestingWalletV2.sol Outdated Show resolved Hide resolved
contracts/vesting/VestingWalletV2.sol Outdated Show resolved Hide resolved
hardhat.config.js Show resolved Hide resolved
contracts/components/escrow/StakingEscrowFactory.sol Outdated Show resolved Hide resolved
contracts/components/escrow/StakingEscrowFactory.sol Outdated Show resolved Hide resolved
contracts/components/escrow/StakingEscrowFactory.sol Outdated Show resolved Hide resolved
contracts/components/escrow/StakingEscrow.sol Outdated Show resolved Hide resolved
contracts/components/escrow/StakingEscrow.sol Outdated Show resolved Hide resolved
contracts/components/escrow/StakingEscrow.sol Outdated Show resolved Hide resolved
contracts/components/escrow/StakingEscrow.sol Outdated Show resolved Hide resolved
contracts/vesting/VestingWallet.sol Show resolved Hide resolved
contracts/vesting/VestingWalletV2.sol Outdated Show resolved Hide resolved
contracts/vesting/VestingWalletV2.sol Outdated Show resolved Hide resolved
contracts/vesting/VestingWalletV2.sol Outdated Show resolved Hide resolved
contracts/vesting/VestingWalletV2.sol Outdated Show resolved Hide resolved
Amxx and others added 4 commits November 25, 2021 16:24
test/components/staking.test.js Outdated Show resolved Hide resolved
@@ -43,7 +47,7 @@ function prepare() {
this.token .connect(this.accounts.admin).grantRole(this.roles.WHITELISTER, this.accounts.whitelister.address),
this.otherToken.connect(this.accounts.admin).grantRole(this.roles.MINTER, this.accounts.minter.address ),
this.otherToken.connect(this.accounts.admin).grantRole(this.roles.WHITELISTER, this.accounts.whitelister.address),
].map(txPromise => txPromise.then(tx => tx.wait())));
].map(txPromise => txPromise.then(tx => tx.wait()).catch(() => {})));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is catch necessary?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a like that is expected to revert in some case: When simulating L2, there is no MINTER role setup on the Forta (which is a FortaBridged)

I thought this was the simplest way to discard this errors ... maybe not the safest but here we don't really care.

test/components/stakingescrow.test.js Outdated Show resolved Hide resolved
@@ -74,7 +74,7 @@ describe('Dispatcher', function () {
expect(await this.dispatch.scannerHash(this.SCANNER_ID)).to.not.be.deep.equal(hashBefore);
});

it('gas estimation', async function () {
it.skip('gas estimation', async function () {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be removed?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is slow to run, and not relevant to security. We realized that gas restrictions for rpc view function calls is not an issue

@frangio frangio marked this pull request as ready for review November 26, 2021 23:55
@frangio
Copy link
Collaborator Author

frangio commented Nov 26, 2021

I think this is good to merge!

@frangio frangio merged commit 93f48a2 into master Nov 28, 2021
@frangio frangio deleted the polygon branch November 28, 2021 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants