Skip to content

Commit

Permalink
Add option to pass value when calling governance.
Browse files Browse the repository at this point in the history
  • Loading branch information
JINWOO-J committed Oct 31, 2023
1 parent ccdb95e commit 51086f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions BUILD_ARGS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

--build-arg BASE_IMAGE=python:3.9.13-slim-buster
--build-arg BUILD_DATE=2023-09-05T11:20:51UTC
--build-arg BUILD_DATE=2023-10-31T09:17:15UTC
--build-arg DOCKER_BUILD_OPTION=--no-cache --rm=true
--build-arg ECHO_OPTION=
--build-arg GIT_USER=JINWOO-J
Expand All @@ -11,4 +11,4 @@
--build-arg REPO_HUB=jinwoo
--build-arg SED_OPTION=''
--build-arg UNAME_S=Darwin
--build-arg VERSION=1.0.27
--build-arg VERSION=1.0.29
2 changes: 1 addition & 1 deletion pawnlib/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__title__ = 'pawnlib'
__description__ = 'pawnlib is a collection of libraries for IaC.'
__url__ = 'https://github.com/jinwoo-j/pawnlib'
__version__ = '1.0.28'
__version__ = '1.0.29'
__author__ = 'Jinwoo Jeong'
__author_email__ = 'jinwoo@parametacorp.com'
__license__ = 'MIT'
Expand Down
5 changes: 3 additions & 2 deletions pawnlib/utils/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ def _make_governance_payload(self, method, params):
)
return _request_payload

def governance_call(self, url=None, method=None, params={}, governance_address=None, sign=None, store_request_payload=True, is_wait=True):
def governance_call(self, url=None, method=None, params={}, governance_address=None,
sign=None, store_request_payload=True, is_wait=True, value="0x0"):
if governance_address:
self.governance_address = governance_address
else:
Expand All @@ -616,7 +617,7 @@ def governance_call(self, url=None, method=None, params={}, governance_address=N

if self._can_be_signed:
# if _request_payload['params'].get('value', None):
_request_payload['params']['value'] = "0x0"
_request_payload['params']['value'] = value
self.sign_tx(payload=_request_payload)
response = self.sign_send(is_wait=is_wait)
return response
Expand Down

0 comments on commit 51086f8

Please sign in to comment.