mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 09:02:28 +00:00
native: replace NEP-5 with NEP-17
This commit is contained in:
parent
a5914f89fa
commit
b97dfae8d8
27 changed files with 195 additions and 134 deletions
10
pkg/rpc/server/testdata/test_contract.go
vendored
10
pkg/rpc/server/testdata/test_contract.go
vendored
|
@ -15,11 +15,11 @@ func Init() bool {
|
|||
h := runtime.GetExecutingScriptHash()
|
||||
amount := totalSupply
|
||||
storage.Put(ctx, h, amount)
|
||||
runtime.Notify("transfer", []byte{}, h, amount)
|
||||
runtime.Notify("Transfer", []byte{}, h, amount)
|
||||
return true
|
||||
}
|
||||
|
||||
func Transfer(from, to []byte, amount int) bool {
|
||||
func Transfer(from, to []byte, amount int, data interface{}) bool {
|
||||
ctx := storage.GetContext()
|
||||
if len(from) != 20 {
|
||||
runtime.Log("invalid 'from' address")
|
||||
|
@ -54,7 +54,7 @@ func Transfer(from, to []byte, amount int) bool {
|
|||
toBalance += amount
|
||||
storage.Put(ctx, to, toBalance)
|
||||
|
||||
runtime.Notify("transfer", from, to, amount)
|
||||
runtime.Notify("Transfer", from, to, amount)
|
||||
|
||||
return true
|
||||
}
|
||||
|
@ -74,10 +74,6 @@ func BalanceOf(addr []byte) int {
|
|||
return amount
|
||||
}
|
||||
|
||||
func Name() string {
|
||||
return "Rubl"
|
||||
}
|
||||
|
||||
func Symbol() string {
|
||||
return "RUB"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue