Skip to content

Commit

Permalink
Merge pull request #38 from securesecrets/mint/sscrt_to_shade_minting
Browse files Browse the repository at this point in the history
Mint/sscrt to shade minting
  • Loading branch information
FloppyDisck authored Aug 11, 2021
2 parents 65ed0ee + 7efb346 commit 013eeda
Show file tree
Hide file tree
Showing 16 changed files with 334 additions and 78 deletions.
153 changes: 153 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/compiled/checksum/mint.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
02404f16eddfbb6aee763267f8e48061
f65b887bcc5bd6bedee459969c167818
2 changes: 1 addition & 1 deletion contracts/compiled/checksum/mock_band.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8382e8e8f905f9a0dabf8079ff5ee47a
581bb67ce7144b7993190b46ece45893
2 changes: 1 addition & 1 deletion contracts/compiled/checksum/oracle.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3fdc7dfd0d219cba0a571f6042510980
ef8dc00f91dbedbff4f39fcb7161146c
2 changes: 1 addition & 1 deletion contracts/compiled/contractlib/contractlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class PreInstantiatedContract:
def __init__(self, contract_id, address, code_hash):
def __init__(self, address, code_hash):
self.address = address
self.code_hash = code_hash

Expand Down
11 changes: 9 additions & 2 deletions contracts/compiled/contractlib/mintlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@


class Mint(Contract):
def __init__(self, label, silk, oracle, contract='mint.wasm.gz', admin='a', uploader='a', gas='10000000',
def __init__(self, label, silk, shade, oracle, contract='mint.wasm.gz', admin='a', uploader='a', gas='10000000',
backend='test', instantiated_contract=None, code_id=None):
init_msg = json.dumps(
{"silk": {"address": silk.address, "code_hash": silk.code_hash},
"shade": {"address": shade.address, "code_hash": shade.code_hash},
"oracle": {"address": oracle.address, "code_hash": oracle.code_hash}})
super().__init__(contract, init_msg, label, admin, uploader, gas, backend,
instantiated_contract=instantiated_contract, code_id=code_id)
Expand All @@ -34,7 +35,7 @@ def migrate(self, label, code_id, code_hash):
new_mint.code_hash = code_hash
return new_mint

def update_config(self, owner=None, silk=None, oracle=None):
def update_config(self, owner=None, silk=None, shade=None, oracle=None):
"""
Updates the minting contract's config
:param owner: New admin
Expand All @@ -51,6 +52,12 @@ def update_config(self, owner=None, silk=None, oracle=None):
"code_hash": silk.code_hash
}
raw_msg["update_config"]["silk"] = contract
if shade is not None:
contract = {
"address": shade.address,
"code_hash": shade.code_hash
}
raw_msg["update_config"]["shade"] = contract
if oracle is not None:
contract = {
"address": oracle.address,
Expand Down
2 changes: 1 addition & 1 deletion contracts/compiled/contractlib/secretlib/secretlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Presetup some commands
query_list_code = ['secretcli', 'query', 'compute', 'list-code']
MAX_RETRY = 10
MAX_TRIES = 10


def run_command(command, wait=6):
Expand Down
Binary file modified contracts/compiled/mint.wasm.gz
Binary file not shown.
Binary file modified contracts/compiled/mock_band.wasm.gz
Binary file not shown.
Binary file modified contracts/compiled/oracle.wasm.gz
Binary file not shown.
Loading

0 comments on commit 013eeda

Please sign in to comment.