from iconservice import *


class SampleLinkScoreSend(IconScoreBase):
    _SCORE_ADDR = 'score_addr'

    @eventlog(indexed=1)
    def Changed(self, value: int):
        pass

    def __init__(self, db: IconScoreDatabase) ->None:
        super().__init__(db)
        self._value = VarDB('value', db, value_type=int)
        self._addr_score = VarDB(self._SCORE_ADDR, db, value_type=Address)

    def on_install(self, value: int=0) ->None:
        super().on_install()
        self._value.set(value)

    def on_update(self) ->None:
        super().on_update()

    @external(readonly=False)
    def add_score_func(self, score_addr: Address) ->None:
        self._addr_score.set(score_addr)

    @payable
    def fallback(self) ->None:
        amount = self.msg.value
        addr = self._addr_score.get()
        if not self.icx.send(addr, amount):
            self.revert('This is not payable')

c2b5462f035ee5a706d678e2baed4a62f23c3204
<mask token>


class SampleLinkScoreSend(IconScoreBase):
    <mask token>
    <mask token>
    <mask token>

    def on_install(self, value: int=0) ->None:
        super().on_install()
        self._value.set(value)

    def on_update(self) ->None:
        super().on_update()

    @external(readonly=False)
    def add_score_func(self, score_addr: Address) ->None:
        self._addr_score.set(score_addr)
    <mask token>

<mask token>


class SampleLinkScoreSend(IconScoreBase):
    <mask token>

    @eventlog(indexed=1)
    def Changed(self, value: int):
        pass
    <mask token>

    def on_install(self, value: int=0) ->None:
        super().on_install()
        self._value.set(value)

    def on_update(self) ->None:
        super().on_update()

    @external(readonly=False)
    def add_score_func(self, score_addr: Address) ->None:
        self._addr_score.set(score_addr)

    @payable
    def fallback(self) ->None:
        amount = self.msg.value
        addr = self._addr_score.get()
        if not self.icx.send(addr, amount):
            self.revert('This is not payable')

<mask token>


class SampleLinkScoreSend(IconScoreBase):
    <mask token>

    @eventlog(indexed=1)
    def Changed(self, value: int):
        pass

    def __init__(self, db: IconScoreDatabase) ->None:
        super().__init__(db)
        self._value = VarDB('value', db, value_type=int)
        self._addr_score = VarDB(self._SCORE_ADDR, db, value_type=Address)

    def on_install(self, value: int=0) ->None:
        super().on_install()
        self._value.set(value)

    def on_update(self) ->None:
        super().on_update()

    @external(readonly=False)
    def add_score_func(self, score_addr: Address) ->None:
        self._addr_score.set(score_addr)

    @payable
    def fallback(self) ->None:
        amount = self.msg.value
        addr = self._addr_score.get()
        if not self.icx.send(addr, amount):
            self.revert('This is not payable')

from iconservice import *


class SampleLinkScoreSend(IconScoreBase):
    _SCORE_ADDR = 'score_addr'

    @eventlog(indexed=1)
    def Changed(self, value: int):
        pass

    def __init__(self, db: IconScoreDatabase) ->None:
        super().__init__(db)
        self._value = VarDB('value', db, value_type=int)
        self._addr_score = VarDB(self._SCORE_ADDR, db, value_type=Address)

    def on_install(self, value: int=0) ->None:
        super().on_install()
        self._value.set(value)

    def on_update(self) ->None:
        super().on_update()

    @external(readonly=False)
    def add_score_func(self, score_addr: Address) ->None:
        self._addr_score.set(score_addr)

    @payable
    def fallback(self) ->None:
        amount = self.msg.value
        addr = self._addr_score.get()
        if not self.icx.send(addr, amount):
            self.revert('This is not payable')
