File tree Expand file tree Collapse file tree 2 files changed +8
-35
lines changed Expand file tree Collapse file tree 2 files changed +8
-35
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ contract DATAv2onPolygon is DATAv2 {
24
24
* Equal amount of tokens got locked in RootChainManager on the mainnet side
25
25
*/
26
26
function deposit (address user , bytes calldata depositData ) external {
27
- require (msg . sender == bridgeAddress, "error_onlyBridge " );
27
+ require (_msgSender () == bridgeAddress, "error_onlyBridge " );
28
28
uint256 amount = abi.decode (depositData, (uint256 ));
29
29
_mint (address (this ), amount);
30
30
transferAndCall (user, amount, depositData);
@@ -34,6 +34,6 @@ contract DATAv2onPolygon is DATAv2 {
34
34
* When returning to mainnet, it's enough to simply burn the tokens on the Polygon side
35
35
*/
36
36
function withdraw (uint256 amount ) external {
37
- _burn (msg . sender , amount);
37
+ _burn (_msgSender () , amount);
38
38
}
39
39
}
Original file line number Diff line number Diff line change 1
- /*global task, ethers */
2
-
3
1
require ( "@nomiclabs/hardhat-waffle" )
4
2
require ( "solidity-coverage" )
5
3
require ( "hardhat-gas-reporter" )
6
4
7
- //require("hardhat-erc1820") // this was for ERC777 token study, required for ERC777 tokens
8
-
9
- // This is a sample Hardhat task. To learn how to create your own go to
10
- // https://hardhat.org/guides/create-task.html
11
- task ( "accounts" , "Prints the list of accounts" , async ( ) => {
12
- const accounts = await ethers . getSigners ( )
13
-
14
- for ( const account of accounts ) {
15
- console . log ( account . address )
16
- }
17
- } )
18
-
19
5
// You need to export an object to set up your config
20
6
// Go to https://hardhat.org/config/ to learn more
21
7
@@ -27,29 +13,16 @@ module.exports = {
27
13
compilers : [
28
14
{
29
15
version : "0.8.6" ,
16
+ settings : {
17
+ optimizer : {
18
+ enabled : true ,
19
+ runs : 1000 ,
20
+ } ,
21
+ } ,
30
22
} ,
31
23
{
32
24
version : "0.4.11"
33
25
}
34
26
]
35
27
}
36
-
37
- // solidity: {
38
- // version: "0.8.3",
39
- // overrides: {
40
- // "contracts/CrowdsaleToken.sol": {
41
- // version: "0.4.8"
42
- // }
43
- // }
44
- // }
45
-
46
- // this seriously breaks things because lots of things don't wait for transactions, also there's no way to do that for HardhatProvider, apparently
47
- // networks: {
48
- // hardhat: {
49
- // mining: {
50
- // auto: false,
51
- // interval: 1000,
52
- // },
53
- // },
54
- // },
55
28
}
You can’t perform that action at this time.
0 commit comments