-
Notifications
You must be signed in to change notification settings - Fork 52
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
34 changed files
with
289 additions
and
122 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
4 changes: 2 additions & 2 deletions
4
packages/cli/src/lib/defaults/infra-modules/eth-ens-ipfs/docker-compose.yaml
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
8 changes: 0 additions & 8 deletions
8
packages/cli/src/lib/defaults/infra-modules/eth-ens-ipfs/eth/Dockerfile
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
packages/cli/src/lib/defaults/language-overrides/app/python/index.ts
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,27 @@ | ||
import { CodegenOverrides } from "../../../../codegen"; | ||
import { PolywrapProject } from "../../../../project"; | ||
|
||
import fs from "fs"; | ||
import path from "path"; | ||
|
||
export function getCodegenOverrides(): CodegenOverrides { | ||
return { | ||
getSchemaBindConfig: async (project: PolywrapProject) => { | ||
const manifestPath = project.getManifestPath(); | ||
const manifestDir = path.dirname(manifestPath); | ||
const pyprojectPath = path.join(manifestDir, "pyproject.toml"); | ||
|
||
const pyproject = fs.readFileSync(pyprojectPath, "utf8"); | ||
const match = pyproject.match(/name = "([A-Za-z0-9-]+)"/); | ||
if (!match || !match[1]) { | ||
return {}; | ||
} | ||
|
||
const codegenDir = path.join(manifestDir, match[1], "wrap"); | ||
|
||
return { | ||
codegenDir, | ||
}; | ||
}, | ||
}; | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
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 @@ | ||
v18.15.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "templates-app-python", | ||
"description": "Polywrap App Python Template", | ||
"private": true, | ||
"version": "0.11.1", | ||
"scripts": { | ||
"build": "npx polywrap codegen", | ||
"test": "poetry run python -m sample" | ||
}, | ||
"dependencies": { | ||
"@polywrap/client-js": "~0.12.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "18.15.0", | ||
"polywrap": "0.11.2", | ||
"ts-node": "10.9.1", | ||
"typescript": "4.9.5" | ||
} | ||
} |
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 @@ | ||
#import * into EthersUtils from "wrapscan.io/polywrap/ethers-utils@1" |
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,6 @@ | ||
format: 0.4.0 | ||
project: | ||
name: Sample | ||
type: app/python | ||
source: | ||
schema: ./polywrap.graphql |
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,13 @@ | ||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
name = "sample" | ||
version = "0.1.0" | ||
description = "Polywrap Python SDK" | ||
authors = ["Cesar <[email protected]>", "Niraj <[email protected]>"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
polywrap = "^0.1.0b7" |
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,5 @@ | ||
from .wrap import EthersUtils | ||
|
||
__all__ = [ | ||
"EthersUtils", | ||
] |
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,14 @@ | ||
from .wrap import EthersUtils | ||
|
||
|
||
if __name__ == "__main__": | ||
eth = EthersUtils() | ||
|
||
print("Invoking: EthersUtils.encodeParams(...)") | ||
|
||
result = eth.encode_params({ | ||
"types": ["address", "uint256"], | ||
"values": ["0xB1B7586656116D546033e3bAFF69BFcD6592225E", "500"] | ||
}) | ||
|
||
print(f"EthersUtils.encodeParams:\n{result}") |
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 +1 @@ | ||
v17.9.1 | ||
v18.15.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
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.