-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gas limit tweaks and EMP bytecode optimization (#1356)
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
- Loading branch information
1 parent
ed62317
commit 3eba0cf
Showing
6 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
core/contracts/financial-templates/implementation/ExpiringMultiPartyLib.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
pragma solidity ^0.6.0; | ||
pragma experimental ABIEncoderV2; | ||
|
||
import "./ExpiringMultiParty.sol"; | ||
|
||
|
||
/** | ||
* @title Provides convenient Expiring Multi Party contract utilities. | ||
* @dev Using this library to deploy EMP's allows calling contracts to avoid importing the full EMP bytecode. | ||
*/ | ||
library ExpiringMultiPartyLib { | ||
/** | ||
* @notice Returns address of new EMP deployed with given `params` configuration. | ||
* @dev Caller will need to register new EMP with the Registry to begin requesting prices. Caller is also | ||
* responsible for enforcing constraints on `params`. | ||
* @param params is a `ConstructorParams` object from ExpiringMultiParty. | ||
* @return address of the deployed ExpiringMultiParty contract | ||
*/ | ||
function deploy(ExpiringMultiParty.ConstructorParams memory params) public returns (address) { | ||
ExpiringMultiParty derivative = new ExpiringMultiParty(params); | ||
return address(derivative); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters