generated from aragon/osx-plugin-template-hardhat
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
259 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
import { MyPluginContext } from '../context'; | ||
import { ClientCore } from '@aragon/sdk-client-common'; | ||
import { MyPluginContext } from "../context"; | ||
import { ClientCore } from "@aragon/sdk-client-common"; | ||
import { | ||
IMyPluginClientDecoding, | ||
IMyPluginClientEncoding, | ||
IMyPluginClientEstimation, | ||
IMyPluginClientMethods, | ||
} from "./interfaces"; | ||
import { | ||
MyPluginClientDecoding, | ||
MyPluginClientEncoding, | ||
MyPluginClientEstimation, | ||
MyPluginClientMethods, | ||
} from "./modules"; | ||
|
||
export class MyPluginClientCore extends ClientCore { | ||
public myPluginPluginAddress: string; | ||
public myPluginRepoAddress: string; | ||
export class StandardSpaceClientCore extends ClientCore { | ||
public methods: IMyPluginClientMethods; | ||
public encoding: IMyPluginClientEncoding; | ||
public decoding: IMyPluginClientDecoding; | ||
public estimation: IMyPluginClientEstimation; | ||
|
||
constructor(pluginContext: MyPluginContext) { | ||
super(pluginContext); | ||
this.myPluginPluginAddress = pluginContext.myPluginPluginAddress; | ||
this.myPluginRepoAddress = pluginContext.myPluginRepoAddress; | ||
|
||
this.methods = new MyPluginClientMethods(pluginContext); | ||
this.encoding = new MyPluginClientEncoding(pluginContext); | ||
this.decoding = new MyPluginClientDecoding(pluginContext); | ||
this.estimation = new MyPluginClientEstimation(pluginContext); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import { MyPluginClientCore } from '../core'; | ||
import { IMyPluginClientDecoding } from '../interfaces'; | ||
import { MyPlugin__factory } from '@aragon/simple-storage-ethers'; | ||
import { ClientCore } from "@aragon/sdk-client-common"; | ||
// import { MyPluginContext } from "../../context"; | ||
import { IMyPluginClientDecoding } from "../interfaces"; | ||
import { MyPlugin__factory } from "@aragon/simple-storage-ethers"; | ||
|
||
export class MyPluginClientDecoding | ||
extends MyPluginClientCore | ||
implements IMyPluginClientDecoding | ||
{ | ||
export class MyPluginClientDecoding extends ClientCore | ||
implements IMyPluginClientDecoding { | ||
public storeNumberAction(data: Uint8Array): bigint { | ||
const iface = MyPlugin__factory.createInterface(); | ||
const res = iface.decodeFunctionData('storeNumber', data); | ||
const res = iface.decodeFunctionData("storeNumber", data); | ||
return BigInt(res[0]); | ||
} | ||
} |
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
Oops, something went wrong.