Skip to content
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

feat: End-to-end request via custom EVM Gateway.sol on Ethereum Local Network to custom Relayer to custom Secret contract on Localsecret with response back and then to NunyaBusiness.sol #33

Merged
merged 177 commits into from
Jan 3, 2025
Merged
Changes from 1 commit
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
7925a8a
wip submit pubkey
ltfschoen Oct 16, 2024
e718457
Merge branch 'main' into submit-pubkey
ltfschoen Oct 16, 2024
b3dbf1b
Merge branch 'main' into submit-pubkey
ltfschoen Oct 16, 2024
953c751
WIP
ltfschoen Oct 17, 2024
7dc92ca
change callbackSelector to upgradeHandler same as secret_ballz
ltfschoen Nov 2, 2024
0cf285d
WIP: Secret rust compiles
ltfschoen Nov 2, 2024
be6ae52
WIP: Secret rust compiles. Trying to deploy to testnet
ltfschoen Nov 3, 2024
3ec3302
merge latest main where fundGateway reduced to 100000
ltfschoen Nov 3, 2024
6d8999e
clean up txOptions
ltfschoen Nov 3, 2024
812394c
use optimized build
ltfschoen Nov 3, 2024
b7fc6e8
updates after trying with my-counter-contract
ltfschoen Nov 3, 2024
5327898
use secretjs beta whilst testnet being updated. fixes uploading Nunya…
ltfschoen Nov 3, 2024
2fd4616
WIP: separate instantiate from upload
ltfschoen Nov 6, 2024
cdcab0d
WIP
ltfschoen Nov 6, 2024
66bac52
move to cofig file
ltfschoen Nov 6, 2024
b0106bc
docs: Notes based on meeting with Mork
ltfschoen Nov 16, 2024
2cceac2
fix: Use correct address for Secret signer pubkey
ltfschoen Nov 17, 2024
aeda1b8
wip
ltfschoen Nov 17, 2024
bb547fe
wip: Add setGatewayAddressInfo
ltfschoen Nov 19, 2024
0cefaad
fix: Fixes and deploy
ltfschoen Nov 19, 2024
c96ce98
refactor: Add setEVMGatewayAddress and updated deployed Nunya.busines…
ltfschoen Nov 19, 2024
3b52e09
docs: Update readme
ltfschoen Nov 19, 2024
9289214
docs: Update readme rearranging order of deployment
ltfschoen Nov 19, 2024
124cebf
wip: trying to instantiate with secretjs 1.15.0-beta.1 but does not r…
ltfschoen Nov 19, 2024
45e8841
fix: Rename logs folder so logs all visible
ltfschoen Nov 19, 2024
4d6831c
fix: Change nunya_business_contract_address to Vec<u8>
ltfschoen Nov 19, 2024
f15b655
wip: tried changing typs but still instantiate error
ltfschoen Nov 19, 2024
263c370
wip
ltfschoen Nov 19, 2024
ca5f9a0
fix: Fix and deploy custom secret contract
ltfschoen Nov 22, 2024
23fde20
fix: Fix queryPubkey working
ltfschoen Nov 22, 2024
f14da2f
wip
ltfschoen Nov 25, 2024
30cd895
feat: runs some of generateKeys
ltfschoen Nov 25, 2024
775ed89
feat: debugging generateKeys
ltfschoen Nov 25, 2024
a8b5c33
submit runs but with issues
ltfschoen Nov 28, 2024
2c711a5
submit runs but no response from wait and cannot find tx on sepolia
ltfschoen Nov 29, 2024
1400efa
requestValue
ltfschoen Dec 1, 2024
7d6efe3
requestValue logs
ltfschoen Dec 1, 2024
24647dc
docs: Add steps to interact with deployed Gateway EVM contract on Sep…
ltfschoen Dec 2, 2024
38aae5c
fix: Various fixes
ltfschoen Dec 2, 2024
01a00f5
refactor: Move requestValue
ltfschoen Dec 2, 2024
cdb1356
fix: Fix scripts and redeploy but not response from requestValue
ltfschoen Dec 3, 2024
9c9c7a7
fix: Fixes unsafeSetSecretContractInfo
ltfschoen Dec 3, 2024
e60073b
feat: Paid Callback Fee Too Low error from requestValue in Gateway EV…
ltfschoen Dec 4, 2024
8aaf9a2
fix: Fix deploy NunyaBusiness and Gateway to EVM on localhost
ltfschoen Dec 4, 2024
b32578c
chore: remove disused abi file
ltfschoen Dec 5, 2024
e898d0e
feat: setEVMGatewayAddress on localhost works
ltfschoen Dec 5, 2024
531dea0
wip: Relayer
ltfschoen Dec 8, 2024
1b19e09
chore: copy of https://github.com/SecretSaturn/SecretPath/tree/main/T…
ltfschoen Dec 14, 2024
d83147f
fix: Separate files for Secret Gateway and Nunya contract with clean …
ltfschoen Dec 14, 2024
7f4aba3
feat: restore debug-print
ltfschoen Dec 14, 2024
302a714
fix: Capitalize Cargo.toml
ltfschoen Dec 14, 2024
8b48ff9
wip: Try get working debug-print
ltfschoen Dec 14, 2024
d9a2887
wip: Update docs with correct error
ltfschoen Dec 14, 2024
26c7273
debug: Add debugging to secret contracts
ltfschoen Dec 15, 2024
f544711
fix: Remove use of debug-print
ltfschoen Dec 15, 2024
431df57
fix so compiles
ltfschoen Dec 15, 2024
4120a3c
fix: Remove set_debug_handler. Add eprintln debugs instead
ltfschoen Dec 15, 2024
d13af64
fix: Fix wasm-opt to prevent error
ltfschoen Dec 15, 2024
87bc944
fix: Makefile consistent between nunya and gateway secret contracts
ltfschoen Dec 15, 2024
539d327
fix: Consistently name Docker container secretdev. sudo required for …
ltfschoen Dec 15, 2024
d463d96
fix: Fix permissions with using Docker and docker exec. Increase gas …
ltfschoen Dec 15, 2024
9a1be39
chore: Update to use newer version of localsecret Docker container
ltfschoen Dec 15, 2024
d9650d9
chore: Replace setting env vars for Makefile in bash script
ltfschoen Dec 15, 2024
b73b54d
chore: Change to use bash in script instead of dot
ltfschoen Dec 15, 2024
9f83587
fea: uploadGateway
ltfschoen Dec 15, 2024
ab769ba
wip: TypeScript alternative to upload Secret Gateway on localsecret
ltfschoen Dec 15, 2024
c27d97b
wip: Update TODO
ltfschoen Dec 15, 2024
ce63120
wip
ltfschoen Dec 16, 2024
d30901a
refactor: Updates after successful deployment of Secret Gateway on lo…
ltfschoen Dec 17, 2024
d70505f
docs: Show users to use Option A
ltfschoen Dec 17, 2024
0c91347
chore: Add mock values for public key of Secret Gateway deployed on L…
ltfschoen Dec 17, 2024
19d8dfe
chore: Updates after successful deployment of both Secret Gateway con…
ltfschoen Dec 17, 2024
5534452
wip: Try to resolve gas issue calling requestValue
ltfschoen Dec 17, 2024
bf8e268
wip: requestValue works but unable to set userKey since error if call…
ltfschoen Dec 17, 2024
078d1f8
feat: requestValue but temporarily not use userKey due to issue
ltfschoen Dec 17, 2024
3cef4f8
feat: run requestValue when relayer running and record logs
ltfschoen Dec 17, 2024
d96a784
wip: change from owner to msg.sender in requestValue. change callback…
ltfschoen Dec 17, 2024
239cd5e
fix: Change to owner instead of msg.sender so only NunyaBusiness can …
ltfschoen Dec 17, 2024
96282cb
fix: Change to msg.sender again since not an issue when using onlyOwner
ltfschoen Dec 17, 2024
1b0b47e
fix: Reuse encodeAddressToBase64 to avoid calling it too many times t…
ltfschoen Dec 17, 2024
e750cee
fix: Update local gateway address and other tweaks
ltfschoen Dec 18, 2024
227cfdd
docs: Update readme
ltfschoen Dec 19, 2024
2ca0fd6
update docs and improve debugging in Secret Gateway
ltfschoen Dec 19, 2024
6354b52
wip: improvements but relayer error Error parsing into type secret_ga…
ltfschoen Dec 20, 2024
3d72480
docs: Remove old issue now resolved
ltfschoen Dec 20, 2024
666cdce
wip
ltfschoen Dec 20, 2024
e7a1f98
fix: Error parsing into type secret_gateway::types::Payload: invalid …
ltfschoen Dec 20, 2024
89bce8b
fix: Fix syntax
ltfschoen Dec 20, 2024
2b81045
logs: Update logs Generic error: Only NunyaBusiness contract can call…
ltfschoen Dec 20, 2024
2650863
docs: Mention what msg.user_address is at Secret contract
ltfschoen Dec 20, 2024
e4f287b
fix: Add correct Secret logs to match Relayer logs
ltfschoen Dec 20, 2024
1446e7a
fix: Fix debugging
ltfschoen Dec 21, 2024
afb39d1
wip: Try to fix publickey error in Gateway
ltfschoen Dec 21, 2024
17851ce
fix: Fix so correct nunya evm address is stored in secret contract on…
ltfschoen Dec 21, 2024
eb4e1f8
wip: try to fix invalid contract error
ltfschoen Dec 21, 2024
6877731
docs: Add Message contains mismatched contract hash error
ltfschoen Dec 21, 2024
00a1e95
wip: verify the internal verification key matches the user address
ltfschoen Dec 21, 2024
105b4ec
wip: Calls try_handle but then public key error
ltfschoen Dec 21, 2024
d4eebff
wip: Still getting malformed public key error
ltfschoen Dec 21, 2024
e9e702a
wip: try to improve submitRequestValue
ltfschoen Dec 21, 2024
3602e83
fix: Update submitRequestValue to use the correct Localsecret public …
ltfschoen Dec 22, 2024
b8e822f
wip: Solves verify the internal verification key matches the user add…
ltfschoen Dec 22, 2024
4c6affd
wip: Use differerent values for user_pubkey and user_key in Execution…
ltfschoen Dec 22, 2024
b85e410
chore: Improve debugging for Secret Gateway to check why decryption n…
ltfschoen Dec 22, 2024
f3a818a
wip
ltfschoen Dec 22, 2024
1ffe977
fix Secret gateway decrypt debugging
ltfschoen Dec 22, 2024
e2907bb
wip
ltfschoen Dec 22, 2024
c99289b
docs: Error Message contains mismatched contract hash due to recent c…
ltfschoen Dec 22, 2024
ed6feb8
Revert "docs: Error Message contains mismatched contract hash due to …
ltfschoen Dec 22, 2024
b85d86e
Revert "wip"
ltfschoen Dec 22, 2024
0c80aca
Revert "fix Secret gateway decrypt debugging"
ltfschoen Dec 22, 2024
6488809
Revert "wip"
ltfschoen Dec 22, 2024
3bb25a9
Revert "chore: Improve debugging for Secret Gateway to check why decr…
ltfschoen Dec 22, 2024
5d218a8
wip
ltfschoen Dec 22, 2024
a1de0b9
wip: malformed public key
ltfschoen Dec 22, 2024
9774235
wip: Set admin of Secret Gateway to secret1glfedwlusunwly7q05umghzwl6…
ltfschoen Dec 22, 2024
4c0b913
wip
ltfschoen Dec 22, 2024
32f1a4b
wip
ltfschoen Dec 23, 2024
8fd4340
wip: Try to improve submitRequestValue
ltfschoen Dec 23, 2024
a5efc05
revert change to msg.rs in Secret Gateway until know why changes caus…
ltfschoen Dec 24, 2024
fa96c7e
improve debugging in Secret Gateway. update docs that need to update …
ltfschoen Dec 24, 2024
1a8e5d1
logs: Update logs after updating Secret Gateway with improved debugging
ltfschoen Dec 24, 2024
80c31a6
fix: Fix use of Secret Gateway ephemeral keys to generate user_pubkey…
ltfschoen Dec 24, 2024
30f451e
docs: Add fixme to use random nonce
ltfschoen Dec 24, 2024
482ed9a
update logs
ltfschoen Dec 24, 2024
730a13c
tweak Secret Nunya contract debugging
ltfschoen Dec 24, 2024
8857251
fix tweak Secret Nunya contract debugging
ltfschoen Dec 24, 2024
3ce2562
fix
ltfschoen Dec 24, 2024
c862dc2
fix: Fix gateway_key to Binary and use .as_slice like in ev-kv-store-…
ltfschoen Dec 24, 2024
cf17719
fix: Fix type of gateway_key to be Binary
ltfschoen Dec 25, 2024
db89019
fix: Fixes error Generic error: Invalid public key format
ltfschoen Dec 25, 2024
74b4674
debugging Nunya contract request_value
ltfschoen Dec 25, 2024
641f208
fix: Fix invalid type error in request_value
ltfschoen Dec 25, 2024
67e3211
attempt e2e submitRequestValue
ltfschoen Dec 25, 2024
9a9b476
fix: attempt e2e submitRequestValue
ltfschoen Dec 25, 2024
78fb554
fix: attempt e2e submitRequestValue
ltfschoen Dec 25, 2024
956c78b
fix: attempt e2e submitRequestValue
ltfschoen Dec 25, 2024
47fa5ec
fix: Finished getting submitRequestValue working e2e
ltfschoen Dec 25, 2024
7c040db
wip: Impossible to get requestValue to work so documented reasons why…
ltfschoen Dec 26, 2024
761d2d9
wip: Simplify
ltfschoen Dec 26, 2024
6a98984
wip: unsafeRequestValue request via NunyaBusiness to send in Gateway …
ltfschoen Dec 26, 2024
48fa26b
fix: Use correct contract for iface value
ltfschoen Dec 26, 2024
2a2e97a
refactor: Refactor to use common script to call requestValue and retr…
ltfschoen Dec 26, 2024
3cdcb6a
fixes
ltfschoen Dec 26, 2024
defa7e3
fix naming
ltfschoen Dec 26, 2024
f384a89
fix missing bracket
ltfschoen Dec 26, 2024
2780adb
fix: remove unsupported Solidity console.logs
ltfschoen Dec 26, 2024
cf51bfe
fix: Fix console.log function reference and rename file for consistency
ltfschoen Dec 26, 2024
d15eec4
refactor: Renamce deploy.ts to config.ts
ltfschoen Dec 26, 2024
ee238fd
feat: Combine uploadAndInstantiateGateway. Add bash scripts for end t…
ltfschoen Dec 26, 2024
bf8c8b4
wip: Add script for end to end
ltfschoen Dec 26, 2024
65537b5
wip: Permission denied error in script
ltfschoen Dec 27, 2024
92da978
feat: Quick start. Run it all using docker and systemctl with ./scrip…
ltfschoen Dec 27, 2024
60e692e
docs: Remote editing
ltfschoen Dec 27, 2024
11ee9d8
refactor: Combine upload and instantiate Nunya. Initial pseudo to dec…
ltfschoen Dec 28, 2024
f46e23e
wip: Modify config.ts to be updatable and change code to update it. T…
ltfschoen Dec 29, 2024
ef364e8
feat: Automated deployment config output to deployed.json with Relaye…
ltfschoen Dec 29, 2024
deaf080
wip
ltfschoen Dec 29, 2024
5a4ce61
fix: Fix path to script
ltfschoen Dec 29, 2024
1337597
fix: Tweaks to update relayer config
ltfschoen Dec 29, 2024
4d32f1a
fix: Fix set-relayer
ltfschoen Dec 29, 2024
0bf330b
fix: Fix to correct folder
ltfschoen Dec 29, 2024
fdce0f4
feat: Finish e2e automation to generate deployed YML file of deployed…
ltfschoen Dec 30, 2024
2291807
fix: Fix incorrectly assigned variable
ltfschoen Dec 30, 2024
4210968
fix
ltfschoen Dec 30, 2024
cb98c07
refactor: Improve configuration of environmental variables and use of…
ltfschoen Jan 1, 2025
137a8e7
Integrated Relayer as a Gitsubmodule. Updated quickstart guide
ltfschoen Jan 2, 2025
6211074
wip: Refactor broken. nunya wasm Error during static Wasm validation:…
ltfschoen Jan 2, 2025
5a399b9
fixed
ltfschoen Jan 2, 2025
2bf95f8
omit ip address
ltfschoen Jan 2, 2025
cad78e3
update Relayer Git Submodule commit being used
ltfschoen Jan 2, 2025
59e6248
update Relayer Git Submodule commit being used
ltfschoen Jan 2, 2025
e0cf0d5
lint: fix linting errors in CI
ltfschoen Jan 3, 2025
92ef298
lint: Fix lint error
ltfschoen Jan 3, 2025
04d84ec
chore: Add FIXME for nextjs ts errors
ltfschoen Jan 3, 2025
9cdc5a5
frontend placeholder to test existing submitRetrievePubkey functionality
ltfschoen Jan 3, 2025
ec1f5bb
chore: Reduce logs
ltfschoen Jan 3, 2025
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
Prev Previous commit
Next Next commit
  • Loading branch information
ltfschoen committed Dec 14, 2024
commit 1b19e09ac0187124b3862ceb002a75cd63e4c70e
46 changes: 41 additions & 5 deletions _SETUP.md
Original file line number Diff line number Diff line change
@@ -206,7 +206,7 @@ Run smart contract test with `yarn hardhat:test`
secretcli --help
```

##### Localhost
##### Deploy Gateway and Relayer of SecretPath on Localhost

* Connect to Linode. Note: Replace the IP address with the address of your remote server.
```
@@ -252,11 +252,34 @@ AzBzrKqSZp3YXMzITB8ZAqYysO0YCjtV
word twist toast cloth movie predict advance crumble escape whale sail such angry muffin balcony keen move employ cook valve hurt glimpse breeze brick
```

### Deploy Gateway of SecretPath on Localhost
Deploy Relayer of SecretPath on Localhost

###### Deploy Gateway of SecretPath on Localhost

* Note: An example of the Gateway to be deployed on Secret Network is here https://github.com/SecretSaturn/SecretPath/tree/main/TNLS-Gateways/secret. This example was used to create github/svub/nunya/packages/secret-contracts/secret-gateway

* Connect to Linode
```
ssh root@172.105.188.31
```

* Clone the Github repo containing the Secret Gateway and initialise the submodules
```
mkdir -p SecretSaturn && cd SecretSaturn
git clone https://github.com/SecretSaturn/SecretPath
cd SecretPath/TNLS-Gateways/secret
git submodule update --init --recursive
```

* [Compile](https://docs.scrt.network/secret-network-documentation/development/readme-1/compile-and-deploy#compile-the-code). Note: Outputs contract.wasm or contract.wasm.gz file in the root directory being the ./SecretPath/TNLS-Gateways/secret/ folder. Using `make build-mainnet-reproducible` will remove contract.wasm so only the optimised contract.wasm.gz remains. Warning: If you only run `make build-mainnet` then you will get this error https://github.com/svub/nunya/issues/8 when deploying.

* TODO - deploy and customize
* Secret Gateway Contract
```
make build
```
* Note: Use `make build-mainnet-reproducible` to deploy to Testnet

### Deploy Relayer of SecretPath on Localhost
###### Deploy Relayer of SecretPath on Localhost

* Reference: https://docs.scrt.network/secret-network-documentation/confidential-computing-layer/ethereum-evm-developer-toolkit/basics/cross-chain-messaging/secretpath/how-to-deploy-secretpath-on-your-chain

@@ -349,7 +372,7 @@ git submodule update --init --recursive
privateKey: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
```

* TODO
* TODO - is this necessary? why not just use the default account?

* Transfer some Localhost Secret tokens from a default account that is shown when running Secret Localhost to that Secret wallet address.
* Reference: https://docs.scrt.network/secret-network-documentation/infrastructure/secret-cli/configuration
@@ -376,13 +399,26 @@ git submodule update --init --recursive
Error: failed to convert address field to address: key with address secret1ap26qrlp8mcq2pg6r47w43l0y8zkqm8a450s03 not found: key not found [scrtlabs/cosmos-sdk@v0.50.10-secret.2/crypto/keyring/keyring.go:538]
```

* TODO - is this necessary? why not just use the default account?

* QUESTION - do i need to add both addresses into the keyring? but if i do that it asks me to provide the account's mnemonic phrase and then doesn't add the correct secret network account address to keyring, see how below the address should be `secret1u9....`. is it possible to provide the private key instead so it adds the correct secret network account address to the keyring. it appears that it is necessary to even add the default accounts `a`, `b`, `c`, and `d`, as required to the keyring.

```
a_mnemonic="grant rice replace explain federal release fix clever romance raise often wild taxi quarter soccer fiber love must tape steak together observe swap guitar"
echo $a_mnemonic | secretcli keys add account --recover
secretcli keys show account

# it should output `secret1ap26qrlp8mcq2pg6r47w43l0y8zkqm8a450s03`

b_mnemonic="jelly shadow frog dirt dragon use armed praise universe win jungle close inmate rain oil canvas beauty pioneer chef soccer icon dizzy thunder meadow"
echo $b_mnemonic | secretcli keys add account2 --recover
secretcli keys show account2

# it should output `secret1fc3fzy78ttp0lwuujw7e52rhspxn8uj52zfyne`
```

TODO - is the below necessary? why not just add the default accounts to the keyring above?
```
custom_mnemonic="<INSERT_MNEMONIC_PHRASE>"
echo $custom_mnemonic | secretcli keys add custom --hd-path="m/44'/60'/0'/0" --recover
secretcli keys show custom
4 changes: 4 additions & 0 deletions packages/secret-contracts/secret-gateway/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[alias]
# unit-test = "test --lib --features backtraces"
unit-test = "test --lib"
schema = "run --example schema"
22 changes: 22 additions & 0 deletions packages/secret-contracts/secret-gateway/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Build results
/target
Cargo.lock

# Cargo+Git helper file (https://github.com/rust-lang/cargo/blob/0.44.1/src/cargo/sources/git/utils.rs#L320-L327)
.cargo-ok

# Text file backups
**/*.rs.bk

# node modules
/tests/node_modules

# IDEs
.vscode

# misc
/.notes
.env

contract.wasm.gz
contract.wasm
54 changes: 54 additions & 0 deletions packages/secret-contracts/secret-gateway/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[package]
name = "secret_gateway"
version = "0.1.0"
authors = ["leor,kent-3,SecretSaturn"]
edition = "2021"
exclude = [
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
"contract.wasm",
"hash.txt",
]

[lib]
crate-type = ["cdylib", "rlib"]

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[features]
default = ["contract"]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
schema = ["cosmwasm-schema"]
# disable contract feature to disable all instantiate/execute/query exports
contract = []

[dependencies]
cosmwasm-schema = { version = "1.1.0", optional = true }
cosmwasm-std = { package = "secret-cosmwasm-std", version = "1.1.11" }
cosmwasm-storage = { package = "secret-cosmwasm-storage", version = "1.1.11" }
schemars = "0.8.11"
serde = { version = "1.0.144", default-features = false, features = ["derive"] }
serde-json-wasm = "0.5.0"
base64 = "0.21.0"
hex = "0.4.3"
sha3 = "0.10.8"
sha2 = "0.10.8"
secp256k1 = { version = "0.26.0", features = ["serde", "recovery"] }
chacha20poly1305 = "0.9.1"
secret-toolkit = { version = "0.10.0", default-features = false, features = ["crypto", "utils", "serialization", "storage"] }
secret-toolkit-crypto = { version = "0.10.0", features = ["hash", "rand", "ecc-secp256k1"] }
secret-toolkit-serialization = { version = "0.10.0", features = ["base64"] }

[[bin]]
name = "schema"
required-features = ["schema"]
202 changes: 202 additions & 0 deletions packages/secret-contracts/secret-gateway/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading