Skip to content

Commit c3bc025

Browse files
authored
add executeCalls (#566)
* add executeCalls * bump version
1 parent 0834e89 commit c3bc025

File tree

4 files changed

+79
-63
lines changed

4 files changed

+79
-63
lines changed

package-lock.json

Lines changed: 61 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@daostack/arc.js",
3-
"version": "0.2.77",
3+
"version": "0.2.78",
44
"description": "",
55
"keywords": [],
66
"main": "dist/lib/index.js",

src/proposal.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,22 @@ export class Proposal implements IStateful<IProposalState> {
896896
return toIOperationObservable(observable)
897897
}
898898

899+
/**
900+
* [executeCalls description] execute the actual proposals call of a GenericScheme or
901+
* GenericSchemeMultiCall
902+
* @return an Operation
903+
*/
904+
public executeCalls(): Operation<boolean> {
905+
const observable = this.state().pipe(
906+
first(),
907+
concatMap((state) => {
908+
const transaction = (this.context.getContract(state.scheme.address)).methods.execute(this.id)
909+
return this.context.sendTransaction(transaction, () => true)
910+
})
911+
)
912+
return toIOperationObservable(observable)
913+
}
914+
899915
/**
900916
* calll the 'execute()' function on the votingMachine.
901917
* the main purpose of this function is to set the stage of the proposals

src/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const REDEEMER_CONTRACT_VERSIONS = [
99
export const REPUTATION_CONTRACT_VERSION = '0.0.1-rc.19'
1010
export const DAOTOKEN_CONTRACT_VERSION = '0.0.1-rc.19'
1111
// used for a workaround
12-
export const CONTRIBUTION_REWARD_DUMMY_VERSION = '0.0.1-rc.19'
12+
export const CONTRIBUTION_REWARD_DUMMY_VERSION = '0.0.1-rc.44'
1313

1414
// export const ABI_DIR = path.resolve('./node_modules/@daostack/migration/contracts-optimized')
1515
export const ABI_DIR = './abis'

0 commit comments

Comments
 (0)