Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions packages/cli/src/__tests__/e2e/build.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,25 @@ describe("e2e tests for build command", () => {
})

describe("Local strategy", () => {

// Local strategy runs `yarn` by default, so we need to ensure that we clean up lockfiles
Comment thread
nerfZael marked this conversation as resolved.
const cleanupYarnLockfiles = async () => {
for (let i = 0; i < testCases.length; i++) {
const yarnLockfile = path.join(getTestCaseDir(0), "yarn.lock");
if(fs.existsSync(yarnLockfile)){
await fs.promises.unlink(yarnLockfile);
}
}
};

beforeAll(async () => {
await cleanupYarnLockfiles();
Comment thread
nerfZael marked this conversation as resolved.
});

afterAll(async () => {
await cleanupYarnLockfiles();
});

it("Builds for assemblyscript", async () => {
const { exitCode: code, stdout: output } = await runCLI({
args: ["build", "-v", "-s", "local"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@ signMessage(
): String!
```

### signMessageBytes

```graphql
signMessageBytes(
bytes: Bytes!
connection: Ethereum_Connection
): String!
```

### solidityKeccak256

```graphql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ type Ethereum_Module @imported(
connection: Ethereum_Connection
): String!

signMessageBytes(
bytes: Bytes!
connection: Ethereum_Connection
): String!

sendRPC(
method: String!
params: [String!]!
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ interface Ethereum_Module_Args_signMessage {
connection?: Types.Ethereum_Connection | null;
}

/* URI: "ens/ethereum.polywrap.eth" */
interface Ethereum_Module_Args_signMessageBytes {
bytes: Types.Bytes;
connection?: Types.Ethereum_Connection | null;
}

/* URI: "ens/ethereum.polywrap.eth" */
interface Ethereum_Module_Args_sendRPC {
method: Types.String;
Expand Down Expand Up @@ -641,6 +647,17 @@ export const Ethereum_Module = {
});
},

signMessageBytes: async (
args: Ethereum_Module_Args_signMessageBytes,
client: CoreClient
): Promise<InvokeResult<Types.String>> => {
return client.invoke<Types.String>({
uri: "ens/ethereum.polywrap.eth",
method: "signMessageBytes",
args: (args as unknown) as Record<string, unknown>,
});
},

sendRPC: async (
args: Ethereum_Module_Args_sendRPC,
client: CoreClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,48 @@ export const manifest: WrapManifest = {
},
"type": "Method"
},
{
"arguments": [
{
"kind": 34,
"name": "bytes",
"required": true,
"scalar": {
"kind": 4,
"name": "bytes",
"required": true,
"type": "Bytes"
},
"type": "Bytes"
},
{
"kind": 34,
"name": "connection",
"object": {
"kind": 8192,
"name": "connection",
"type": "Ethereum_Connection"
},
"type": "Ethereum_Connection"
}
],
"kind": 64,
"name": "signMessageBytes",
"required": true,
"return": {
"kind": 34,
"name": "signMessageBytes",
"required": true,
"scalar": {
"kind": 4,
"name": "signMessageBytes",
"required": true,
"type": "String"
},
"type": "String"
},
"type": "Method"
},
{
"arguments": [
{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ interface Ethereum_Module_Args_signMessage {
connection?: Types.Ethereum_Connection | null;
}

/* URI: "ens/ethereum.polywrap.eth" */
interface Ethereum_Module_Args_signMessageBytes {
bytes: Types.Bytes;
connection?: Types.Ethereum_Connection | null;
}

/* URI: "ens/ethereum.polywrap.eth" */
interface Ethereum_Module_Args_sendRPC {
method: Types.String;
Expand Down Expand Up @@ -641,6 +647,17 @@ export const Ethereum_Module = {
});
},

signMessageBytes: async (
args: Ethereum_Module_Args_signMessageBytes,
client: CoreClient
): Promise<InvokeResult<Types.String>> => {
return client.invoke<Types.String>({
uri: "ens/ethereum.polywrap.eth",
method: "signMessageBytes",
args: (args as unknown) as Record<string, unknown>,
});
},

sendRPC: async (
args: Ethereum_Module_Args_sendRPC,
client: CoreClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,48 @@ export const manifest: WrapManifest = {
},
"type": "Method"
},
{
"arguments": [
{
"kind": 34,
"name": "bytes",
"required": true,
"scalar": {
"kind": 4,
"name": "bytes",
"required": true,
"type": "Bytes"
},
"type": "Bytes"
},
{
"kind": 34,
"name": "connection",
"object": {
"kind": 8192,
"name": "connection",
"type": "Ethereum_Connection"
},
"type": "Ethereum_Connection"
}
],
"kind": 64,
"name": "signMessageBytes",
"required": true,
"return": {
"kind": 34,
"name": "signMessageBytes",
"required": true,
"scalar": {
"kind": 4,
"name": "signMessageBytes",
"required": true,
"type": "String"
},
"type": "String"
},
"type": "Method"
},
{
"arguments": [
{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ interface Ethereum_Module_Args_signMessage {
connection?: Types.Ethereum_Connection | null;
}

/* URI: "ens/ethereum.polywrap.eth" */
interface Ethereum_Module_Args_signMessageBytes {
bytes: Types.Bytes;
connection?: Types.Ethereum_Connection | null;
}

/* URI: "ens/ethereum.polywrap.eth" */
interface Ethereum_Module_Args_sendRPC {
method: Types.String;
Expand Down Expand Up @@ -641,6 +647,17 @@ export const Ethereum_Module = {
});
},

signMessageBytes: async (
args: Ethereum_Module_Args_signMessageBytes,
client: CoreClient
): Promise<InvokeResult<Types.String>> => {
return client.invoke<Types.String>({
uri: "ens/ethereum.polywrap.eth",
method: "signMessageBytes",
args: (args as unknown) as Record<string, unknown>,
});
},

sendRPC: async (
args: Ethereum_Module_Args_sendRPC,
client: CoreClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,48 @@ export const manifest: WrapManifest = {
},
"type": "Method"
},
{
"arguments": [
{
"kind": 34,
"name": "bytes",
"required": true,
"scalar": {
"kind": 4,
"name": "bytes",
"required": true,
"type": "Bytes"
},
"type": "Bytes"
},
{
"kind": 34,
"name": "connection",
"object": {
"kind": 8192,
"name": "connection",
"type": "Ethereum_Connection"
},
"type": "Ethereum_Connection"
}
],
"kind": 64,
"name": "signMessageBytes",
"required": true,
"return": {
"kind": 34,
"name": "signMessageBytes",
"required": true,
"scalar": {
"kind": 4,
"name": "signMessageBytes",
"required": true,
"type": "String"
},
"type": "String"
},
"type": "Method"
},
{
"arguments": [
{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ interface Ethereum_Module_Args_signMessage {
connection?: Types.Ethereum_Connection | null;
}

/* URI: "ens/ethereum.polywrap.eth" */
interface Ethereum_Module_Args_signMessageBytes {
bytes: Types.Bytes;
connection?: Types.Ethereum_Connection | null;
}

/* URI: "ens/ethereum.polywrap.eth" */
interface Ethereum_Module_Args_sendRPC {
method: Types.String;
Expand Down Expand Up @@ -641,6 +647,17 @@ export const Ethereum_Module = {
});
},

signMessageBytes: async (
args: Ethereum_Module_Args_signMessageBytes,
client: CoreClient
): Promise<InvokeResult<Types.String>> => {
return client.invoke<Types.String>({
uri: "ens/ethereum.polywrap.eth",
method: "signMessageBytes",
args: (args as unknown) as Record<string, unknown>,
});
},

sendRPC: async (
args: Ethereum_Module_Args_sendRPC,
client: CoreClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,48 @@ export const manifest: WrapManifest = {
},
"type": "Method"
},
{
"arguments": [
{
"kind": 34,
"name": "bytes",
"required": true,
"scalar": {
"kind": 4,
"name": "bytes",
"required": true,
"type": "Bytes"
},
"type": "Bytes"
},
{
"kind": 34,
"name": "connection",
"object": {
"kind": 8192,
"name": "connection",
"type": "Ethereum_Connection"
},
"type": "Ethereum_Connection"
}
],
"kind": 64,
"name": "signMessageBytes",
"required": true,
"return": {
"kind": 34,
"name": "signMessageBytes",
"required": true,
"scalar": {
"kind": 4,
"name": "signMessageBytes",
"required": true,
"type": "String"
},
"type": "String"
},
"type": "Method"
},
{
"arguments": [
{
Expand Down