//go:build !tinygo // Package dchain provides stub implementations for non-TinyGo builds. // These allow go build / IDEs to compile contract code without TinyGo. // The stubs panic at runtime — they are never executed in production. package dchain // ArgStr returns the idx-th call argument as a string. func ArgStr(idx int, maxLen int) string { panic("dchain: ArgStr requires TinyGo (tinygo build -target wasip1)") } // ArgU64 returns the idx-th call argument as a uint64. func ArgU64(idx int) uint64 { panic("dchain: ArgU64 requires TinyGo") } // GetState reads a value from contract state. func GetState(key string) []byte { panic("dchain: GetState requires TinyGo") } // GetStateStr reads a contract state value as a string. func GetStateStr(key string) string { panic("dchain: GetStateStr requires TinyGo") } // SetState writes a value to contract state. func SetState(key string, value []byte) { panic("dchain: SetState requires TinyGo") } // SetStateStr writes a string value to contract state. func SetStateStr(key, value string) { panic("dchain: SetStateStr requires TinyGo") } // GetU64 reads a uint64 from contract state. func GetU64(key string) uint64 { panic("dchain: GetU64 requires TinyGo") } // PutU64 stores a uint64 in contract state. func PutU64(key string, val uint64) { panic("dchain: PutU64 requires TinyGo") } // Caller returns the hex pubkey of the transaction sender. func Caller() string { panic("dchain: Caller requires TinyGo") } // BlockHeight returns the current block height. func BlockHeight() uint64 { panic("dchain: BlockHeight requires TinyGo") } // Treasury returns the contract's ownerless treasury address. func Treasury() string { panic("dchain: Treasury requires TinyGo") } // Balance returns the token balance of a hex pubkey in µT. func Balance(pubKey string) uint64 { panic("dchain: Balance requires TinyGo") } // Transfer sends amount µT from one address to another. func Transfer(from, to string, amount uint64) bool { panic("dchain: Transfer requires TinyGo") } // CallContract executes a method on another deployed contract. func CallContract(contractID, method, argsJSON string) bool { panic("dchain: CallContract requires TinyGo") } // Log writes a message to the contract log. func Log(msg string) { panic("dchain: Log requires TinyGo") }