-
Notifications
You must be signed in to change notification settings - Fork 14
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
Upgrade to Arc v58, Rinkeby contract addresses #382
Changes from 14 commits
f6478c4
e68525f
873d542
82c03e2
e6f604e
2a86298
7075f48
15fd775
6f70438
846f450
7b6c138
6a35f0a
5eca83a
0b06c42
3190eb2
b2d047c
a5d6e87
f1cc82f
e2a6497
db7df38
9b7e637
df40a87
173eb10
f80dc77
3710429
949b54c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,7 @@ export class ContributionRewardWrapper extends ProposalGeneratorBase { | |
: Promise<ArcTransactionProposalResult> { | ||
|
||
const defaults = { | ||
descriptionIsHashed: false, | ||
ethReward: "0", | ||
externalToken: "", // must have a value for solidity | ||
externalTokenReward: "0", | ||
|
@@ -154,7 +155,7 @@ export class ContributionRewardWrapper extends ProposalGeneratorBase { | |
eventContext, | ||
this.contract.proposeContributionReward, | ||
[options.avatar, | ||
Utils.SHA3(options.description), | ||
options.descriptionIsHashed ? options.description : Utils.SHA3(options.description), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes a bit more sense to me to pass in whether you Arc.js to hash or not, so by default it would not be hashed, but this is ok too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tibetsprague I did it this way to avoid creating a breaking change. For what it is worth, it has the most convenient option as the default. |
||
reputationChange, | ||
[nativeTokenReward, ethReward, externalTokenReward, options.periodLength, options.numberOfPeriods], | ||
options.externalToken, | ||
|
@@ -539,17 +540,16 @@ export class ContributionRewardWrapper extends ProposalGeneratorBase { | |
|
||
private convertProposalPropsArrayToObject(propsArray: Array<any>, proposalId: Hash): ContributionProposal { | ||
return { | ||
beneficiaryAddress: propsArray[6], | ||
contributionDescriptionHash: propsArray[0], | ||
ethReward: propsArray[3], | ||
executionTime: propsArray[9], | ||
externalToken: propsArray[4], | ||
externalTokenReward: propsArray[5], | ||
nativeTokenReward: propsArray[1], | ||
numberOfPeriods: propsArray[8], | ||
periodLength: propsArray[7], | ||
beneficiaryAddress: propsArray[5], | ||
ethReward: propsArray[2], | ||
executionTime: propsArray[8], | ||
externalToken: propsArray[3], | ||
externalTokenReward: propsArray[4], | ||
nativeTokenReward: propsArray[0], | ||
numberOfPeriods: propsArray[7], | ||
periodLength: propsArray[6], | ||
proposalId, | ||
reputationChange: propsArray[2], | ||
reputationChange: propsArray[1], | ||
}; | ||
} | ||
} | ||
|
@@ -587,7 +587,6 @@ export interface NewContributionProposalEventResult { | |
export interface ContributionProposal { | ||
proposalId: Hash; | ||
beneficiaryAddress: Address; | ||
contributionDescriptionHash: Hash; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why does this get removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tibetsprague I forgot about that. I've added it to the list of breaking changes above. That property was removed from the contract as part of this PR: https://github.com/daostack/arc/pull/561/files |
||
ethReward: BigNumber; | ||
executionTime: number; | ||
externalToken: Address; | ||
|
@@ -747,6 +746,11 @@ export interface ProposeContributionRewardParams { | |
* beneficiary address | ||
*/ | ||
beneficiaryAddress: string; | ||
/** | ||
* True if description is a hashed, false if not and in which case Arc.js will hash it. | ||
* The default is false. | ||
*/ | ||
descriptionIsHashed?: boolean; | ||
} | ||
|
||
export interface ContributionRewardRedeemParams { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is private ? what the diff from ganache ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private is the name used for networks with an unknown id. ganache is a special case for a network running with a particular network id that arc.js supplies. So, for example, the user might have ganache running with a unknown network id, but arc.js can't know that it is in fact ganache, so will name it "private".
BTW, "private" is the name used by the migrations package and web3.